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

Unified Diff: src/gpu/GrGpuResource.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/GrGpu.cpp ('k') | src/gpu/GrGpuResourceCacheAccess.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrGpuResource.cpp
diff --git a/src/gpu/GrGpuResource.cpp b/src/gpu/GrGpuResource.cpp
index 8dbbd83ef58ad5a561d74bf0b52594262b0f5464..cc24335184c2b98662e5f9133c4459d179ac3a76 100644
--- a/src/gpu/GrGpuResource.cpp
+++ b/src/gpu/GrGpuResource.cpp
@@ -128,6 +128,13 @@ void GrGpuResource::setScratchKey(const GrResourceKey& scratchKey) {
fScratchKey = scratchKey;
}
+void GrGpuResource::removeScratchKey() {
+ if (!this->wasDestroyed() && !fScratchKey.isNullScratch()) {
+ get_resource_cache2(fGpu)->resourceAccess().willRemoveScratchKey(this);
+ fScratchKey = GrResourceKey::NullScratchKey();
+ }
+}
+
uint32_t GrGpuResource::CreateUniqueID() {
static int32_t gUniqueID = SK_InvalidUniqueID;
uint32_t id;
« no previous file with comments | « src/gpu/GrGpu.cpp ('k') | src/gpu/GrGpuResourceCacheAccess.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698