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

Unified Diff: include/gpu/GrGpuResource.h

Issue 481443002: Add GrResourceCache2. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: fix leaks 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/GrContext.h ('k') | src/gpu/GrClipMaskCache.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/gpu/GrGpuResource.h
diff --git a/include/gpu/GrGpuResource.h b/include/gpu/GrGpuResource.h
index 127f64b903027732436e2898c9c832eca9ec2867..8b162823bf6e65f3f6904bc4d20d391559b8d220 100644
--- a/include/gpu/GrGpuResource.h
+++ b/include/gpu/GrGpuResource.h
@@ -12,6 +12,7 @@
#include "SkTInternalLList.h"
class GrResourceCacheEntry;
+class GrResourceCache2;
class GrGpu;
class GrContext;
@@ -118,12 +119,13 @@ private:
static uint32_t CreateUniqueID();
- // We're in an internal doubly linked list
+ // We're in an internal doubly linked list owned by GrResourceCache2
SK_DECLARE_INTERNAL_LLIST_INTERFACE(GrGpuResource);
- GrGpu* fGpu; // not reffed. The GrGpu can be deleted while there
- // are still live GrGpuResources. It will call
- // release() on all such objects in its destructor.
+ // This is not ref'ed but abandon() or release() will be called before the GrGpu object
+ // is destroyed. Those calls set will this to NULL.
+ GrGpu* fGpu;
+
enum Flags {
/**
* This object wraps a GPU object given to us by the user.
« no previous file with comments | « include/gpu/GrContext.h ('k') | src/gpu/GrClipMaskCache.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698