diff options
author | Greg Daniel <egdaniel@google.com> | 2018-07-02 16:47:38 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2018-07-03 13:41:13 +0000 |
commit | ff2181e62e79ffd2ce628fc8c05b5457d4f54163 (patch) | |
tree | 5185ca093986d1ee49dd3abfa93a00991c77ac7a /src/gpu/gl/GrGLGpu.cpp | |
parent | 94d57c477fe122c146a034c625cebb6c44ef21b0 (diff) |
Remove setting/use of GrPixelConfig in GrBackendTex/RT ctors.
Bug: skia:
Change-Id: I1466668e3502cd1e6e1f6aed4105e0f626d293dd
Reviewed-on: https://skia-review.googlesource.com/138987
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
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) { |