diff options
author | Brian Salomon <bsalomon@google.com> | 2018-03-14 10:21:40 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2018-03-14 14:50:42 +0000 |
commit | 8a37583af573e7da83d8a07d17fca81caa87123b (patch) | |
tree | fbc99208bc3d7e19cfdccf213b7cfd0d2e878d66 /src/gpu/gl/GrGLGpu.cpp | |
parent | 253258419b01675a43a80f5f04eb1013d9f2b6d5 (diff) |
Ensure that GrGpu state tracking is initialized before making a backend RT/Tex in tests
Change-Id: Ie5692d97678705306f514d5911bf331f784e7a40
Reviewed-on: https://skia-review.googlesource.com/114288
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
Diffstat (limited to 'src/gpu/gl/GrGLGpu.cpp')
-rw-r--r-- | src/gpu/gl/GrGLGpu.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/gpu/gl/GrGLGpu.cpp b/src/gpu/gl/GrGLGpu.cpp index bcea5160e3..9a9f90c04e 100644 --- a/src/gpu/gl/GrGLGpu.cpp +++ b/src/gpu/gl/GrGLGpu.cpp @@ -4348,6 +4348,7 @@ void GrGLGpu::xferBarrier(GrRenderTarget* rt, GrXferBarrierType type) { GrBackendTexture GrGLGpu::createTestingOnlyBackendTexture(const void* pixels, int w, int h, GrPixelConfig config, bool /*isRT*/, GrMipMapped mipMapped) { + this->handleDirtyContext(); if (!this->caps()->isConfigTexturable(config)) { return GrBackendTexture(); // invalid } @@ -4440,6 +4441,7 @@ void GrGLGpu::deleteTestingOnlyBackendTexture(const GrBackendTexture& tex) { GrBackendRenderTarget GrGLGpu::createTestingOnlyBackendRenderTarget(int w, int h, GrColorType colorType, GrSRGBEncoded srgbEncoded) { + this->handleDirtyContext(); auto config = GrColorTypeToPixelConfig(colorType, srgbEncoded); GrGLenum colorBufferFormat; if (!this->glCaps().getRenderbufferFormat(config, &colorBufferFormat)) { |