aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--src/gpu/vk/GrVkGpu.cpp8
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);