diff options
Diffstat (limited to 'src/gpu/gl/GrGLGpu.cpp')
-rw-r--r-- | src/gpu/gl/GrGLGpu.cpp | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/gpu/gl/GrGLGpu.cpp b/src/gpu/gl/GrGLGpu.cpp index d5c3cc3de2..58aad4d18e 100644 --- a/src/gpu/gl/GrGLGpu.cpp +++ b/src/gpu/gl/GrGLGpu.cpp @@ -3975,7 +3975,11 @@ GrBackendTexture GrGLGpu::createTestingOnlyBackendTexture(const void* pixels, in // unbind the texture from the texture unit to avoid asserts GL_CALL(BindTexture(info.fTarget, 0)); - return GrBackendTexture(w, h, mipMapped, info); + GrBackendTexture beTex = GrBackendTexture(w, h, mipMapped, info); + // Lots of tests don't go through Skia's public interface which will set the config so for + // testing we make sure we set a config here. + beTex.setPixelConfig(config); + return beTex; } bool GrGLGpu::isTestingOnlyBackendTexture(const GrBackendTexture& tex) const { @@ -4069,7 +4073,11 @@ GrBackendRenderTarget GrGLGpu::createTestingOnlyBackendRenderTarget(int w, int h return {}; } auto stencilBits = SkToInt(this->glCaps().stencilFormats()[sFormatIdx].fStencilBits); - return {w, h, 1, stencilBits, config, info}; + GrBackendRenderTarget beRT = GrBackendRenderTarget(w, h, 1, stencilBits, info); + // Lots of tests don't go through Skia's public interface which will set the config so for + // testing we make sure we set a config here. + beRT.setPixelConfig(config); + return beRT; } void GrGLGpu::deleteTestingOnlyBackendRenderTarget(const GrBackendRenderTarget& backendRT) { |