aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu
diff options
context:
space:
mode:
Diffstat (limited to 'src/gpu')
-rw-r--r--src/gpu/GrContext.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/gpu/GrContext.cpp b/src/gpu/GrContext.cpp
index 1f1927ed2e..bade6e341c 100644
--- a/src/gpu/GrContext.cpp
+++ b/src/gpu/GrContext.cpp
@@ -1070,6 +1070,8 @@ bool GrContextPriv::readSurfacePixels2(GrSurfaceContext* src, int left, int top,
if (canvas2DFastPath) {
tempCtx = this->drawingManager()->makeRenderTargetContext(std::move(tempProxy), nullptr,
nullptr);
+ SkASSERT(tempCtx->asRenderTargetContext());
+ tempCtx->asRenderTargetContext()->discard();
} else {
tempCtx = this->drawingManager()->makeTextureContext(
std::move(tempProxy), src->colorSpaceInfo().refColorSpace());