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

Unified Diff: src/gpu/GrGpu.cpp

Issue 2104353002: Add discard support to Vulkan (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: nit 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 | src/gpu/vk/GrVkCaps.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrGpu.cpp
diff --git a/src/gpu/GrGpu.cpp b/src/gpu/GrGpu.cpp
index 0a2592d38046085131bc9e3a41c96e3f6fa6e0a1..d82a062c3b9bbbdb307ef292ecde68785b948e1a 100644
--- a/src/gpu/GrGpu.cpp
+++ b/src/gpu/GrGpu.cpp
@@ -178,6 +178,11 @@ GrTexture* GrGpu::createTexture(const GrSurfaceDesc& origDesc, SkBudgeted budget
fStats.incTextureUploads();
}
}
+ if (isRT && texels.empty()) {
bsalomon 2016/06/30 13:47:31 I imagine that this is not going to be a long term
+ GrRenderTarget* rt = tex->asRenderTarget();
+ SkASSERT(rt);
+ rt->discard();
+ }
}
return tex;
}
« no previous file with comments | « no previous file | src/gpu/vk/GrVkCaps.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698