diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/gpu/GrContext.h | 3 | ||||
-rw-r--r-- | include/gpu/GrGpuResource.h | 10 |
2 files changed, 9 insertions, 4 deletions
diff --git a/include/gpu/GrContext.h b/include/gpu/GrContext.h index d6245100d6..4f9b642b23 100644 --- a/include/gpu/GrContext.h +++ b/include/gpu/GrContext.h @@ -35,6 +35,7 @@ class GrPath; class GrPathRenderer; class GrResourceEntry; class GrResourceCache; +class GrResourceCache2; class GrStencilBuffer; class GrTestTarget; class GrTextContext; @@ -926,6 +927,7 @@ public: GrDrawTarget* getTextTarget(); const GrIndexBuffer* getQuadIndexBuffer() const; GrAARectRenderer* getAARectRenderer() { return fAARectRenderer; } + GrResourceCache2* getResourceCache2() { return fResourceCache2; } // Called by tests that draw directly to the context via GrDrawTarget void getTestTarget(GrTestTarget*); @@ -973,6 +975,7 @@ private: GrDrawState* fDrawState; GrResourceCache* fResourceCache; + GrResourceCache2* fResourceCache2; GrFontCache* fFontCache; SkAutoTDelete<GrLayerCache> fLayerCache; diff --git a/include/gpu/GrGpuResource.h b/include/gpu/GrGpuResource.h index 127f64b903..8b162823bf 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. |