diff options
author | egdaniel <egdaniel@google.com> | 2016-06-28 13:38:26 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-06-28 13:38:26 -0700 |
commit | d66110f5972169dbcda8932c3a9a001adff23df4 (patch) | |
tree | f22f9ca272e16db03354ee1adcfa9428ed785dcf /src | |
parent | 0a0f67ececbdf1a7f81296ed0d2cb9e3bc00e4dc (diff) |
Fix vulkan onGetWritePixelsInfo
When the configs are the same in Vulkan we know we can do write pixels,
but the caller may need to do a draw, so make sure we set up the
tempDrawInfo before returning.
BUG=skia:5461, skia:5458
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2108873003
Review-Url: https://codereview.chromium.org/2108873003
Diffstat (limited to 'src')
-rw-r--r-- | src/gpu/vk/GrVkGpu.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/gpu/vk/GrVkGpu.cpp b/src/gpu/vk/GrVkGpu.cpp index ca6ccde67a..e5d24fc580 100644 --- a/src/gpu/vk/GrVkGpu.cpp +++ b/src/gpu/vk/GrVkGpu.cpp @@ -252,10 +252,6 @@ bool GrVkGpu::onGetWritePixelsInfo(GrSurface* dstSurface, int width, int height, return false; } - if (dstSurface->config() == srcConfig) { - return true; - } - GrRenderTarget* renderTarget = dstSurface->asRenderTarget(); // Start off assuming no swizzling @@ -271,6 +267,10 @@ bool GrVkGpu::onGetWritePixelsInfo(GrSurface* dstSurface, int width, int height, tempDrawInfo->fTempSurfaceDesc.fSampleCnt = 0; tempDrawInfo->fTempSurfaceDesc.fOrigin = kTopLeft_GrSurfaceOrigin; + if (dstSurface->config() == srcConfig) { + return true; + } + if (renderTarget && this->vkCaps().isConfigRenderable(renderTarget->config(), false)) { ElevateDrawPreference(drawPreference, kRequireDraw_DrawPreference); |