Index: src/gpu/vk/GrVkGpu.cpp |
diff --git a/src/gpu/vk/GrVkGpu.cpp b/src/gpu/vk/GrVkGpu.cpp |
index ca6ccde67a7166c5f86c45f5015801baab9f0480..e5d24fc5806ff8044a55da6416b311f9c9bcb8f3 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); |