diff options
author | Greg Daniel <egdaniel@google.com> | 2018-04-23 10:57:37 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2018-04-23 15:18:40 +0000 |
commit | 4231401dba47ff6e671b7cf1e9d193aa3feac754 (patch) | |
tree | dedc2015d773b0907b0e4e16dd4a393c7f005cf0 /src/gpu/GrContext.cpp | |
parent | c90b4dbec5b6891fc257945aa95c0e39cd5f7a7c (diff) |
Fixes in ReadPixels2 and yuv_texture gm to fix Vulkan validation issues.
Bug: skia:
Change-Id: Idfccdec9106bdc79a690da0e173a232a0cbe51a9
Reviewed-on: https://skia-review.googlesource.com/122955
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
Diffstat (limited to 'src/gpu/GrContext.cpp')
-rw-r--r-- | src/gpu/GrContext.cpp | 2 |
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()); |