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

Unified Diff: src/gpu/GrGpuResource.cpp

Issue 504313002: Make GrGpuResources register with GrResourceCache2 after fully constructed. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Fix insertion for GlyphPathRange. Created 6 years, 4 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 | « include/gpu/GrGpuResource.h ('k') | src/gpu/GrPathRange.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 7a19c25e46dcf5806db47955b7f22818d75f95a5..a0a72785d9c74c0385e52d1b08da7beeac4eca99 100644
--- a/src/gpu/GrGpuResource.cpp
+++ b/src/gpu/GrGpuResource.cpp
@@ -28,6 +28,9 @@ GrGpuResource::GrGpuResource(GrGpu* gpu, bool isWrapped)
} else {
fFlags = 0;
}
+}
+
+void GrGpuResource::registerWithCache() {
get_resource_cache2(fGpu)->insertResource(this);
}
@@ -37,7 +40,7 @@ GrGpuResource::~GrGpuResource() {
SkASSERT(this->wasDestroyed());
}
-void GrGpuResource::release() {
+void GrGpuResource::release() {
if (NULL != fGpu) {
this->onRelease();
get_resource_cache2(fGpu)->removeResource(this);
« no previous file with comments | « include/gpu/GrGpuResource.h ('k') | src/gpu/GrPathRange.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698