diff options
-rw-r--r-- | gm/imagefromyuvtextures.cpp | 2 | ||||
-rw-r--r-- | src/gpu/GrContext.cpp | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/gm/imagefromyuvtextures.cpp b/gm/imagefromyuvtextures.cpp index 4db805d60e..a6aa000f1f 100644 --- a/gm/imagefromyuvtextures.cpp +++ b/gm/imagefromyuvtextures.cpp @@ -118,6 +118,8 @@ protected: return; } + context->flush(); + gpu->testingOnly_flushGpuAndSync(); for (int i = 0; i < 3; ++i) { if (yuvTextures[i].isValid()) { gpu->deleteTestingOnlyBackendTexture(yuvTextures[i]); 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()); |