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

Unified Diff: src/gpu/GrResourceCache2.cpp

Issue 747043004: Use scratch keys for stencil buffers. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Address comment Created 6 years, 1 month 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 | « src/gpu/GrResourceCache2.h ('k') | src/gpu/GrStencilBuffer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrResourceCache2.cpp
diff --git a/src/gpu/GrResourceCache2.cpp b/src/gpu/GrResourceCache2.cpp
index d30397337fcd96a0abaa7a3d3f4587857bfdc3cc..39181554d23705bc863e5f0ad4c3d0b1dc88dd77 100644
--- a/src/gpu/GrResourceCache2.cpp
+++ b/src/gpu/GrResourceCache2.cpp
@@ -218,6 +218,11 @@ GrGpuResource* GrResourceCache2::findAndRefScratchResource(const GrResourceKey&
return resource;
}
+void GrResourceCache2::willRemoveScratchKey(const GrGpuResource* resource) {
+ SkASSERT(resource->cacheAccess().isScratch());
+ fScratchMap.remove(resource->cacheAccess().getScratchKey(), resource);
+}
+
bool GrResourceCache2::didSetContentKey(GrGpuResource* resource) {
SkASSERT(!fPurging);
SkASSERT(resource);
« no previous file with comments | « src/gpu/GrResourceCache2.h ('k') | src/gpu/GrStencilBuffer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698