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

Unified Diff: src/gpu/GrResourceCache2.cpp

Issue 705413002: Remove GrResourceKey from GrResourceCache (Closed) Base URL: https://skia.googlesource.com/skia.git@content
Patch Set: update 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
Index: src/gpu/GrResourceCache2.cpp
diff --git a/src/gpu/GrResourceCache2.cpp b/src/gpu/GrResourceCache2.cpp
index 65e522aafbae13b310600138b4fee6f229bdce98..664231919263afbefb133c4883485891e89a2a04 100644
--- a/src/gpu/GrResourceCache2.cpp
+++ b/src/gpu/GrResourceCache2.cpp
@@ -95,6 +95,7 @@ GrGpuResource* GrResourceCache2::findAndRefScratchResource(const GrResourceKey&
return SkSafeRef(fScratchMap.find(scratchKey, AvailableForScratchUse(false)));
}
+#if 0
void GrResourceCache2::willRemoveContentKey(const GrGpuResource* resource) {
SkASSERT(resource);
SkASSERT(resource->getContentKey());
@@ -103,10 +104,12 @@ void GrResourceCache2::willRemoveContentKey(const GrGpuResource* resource) {
fContentHash.remove(*resource->getContentKey());
}
+#endif
-bool GrResourceCache2::didAddContentKey(GrGpuResource* resource) {
+bool GrResourceCache2::didSetContentKey(GrGpuResource* resource) {
SkASSERT(resource);
SkASSERT(resource->getContentKey());
+ SkASSERT(!resource->getContentKey()->isScratch());
GrGpuResource* res = fContentHash.find(*resource->getContentKey());
if (NULL != res) {

Powered by Google App Engine
This is Rietveld 408576698