Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2)

Unified Diff: src/gpu/vk/GrVkGpu.cpp

Issue 2108873003: Fix vulkan onGetWritePixelsInfo (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698