Index: include/gpu/GrContext.h |
diff --git a/include/gpu/GrContext.h b/include/gpu/GrContext.h |
index 4d0a94e4cda92682d59c1d83a6f23bb08805857b..195ab72a7f377f71174ec7c092851e10077cad8a 100644 |
--- a/include/gpu/GrContext.h |
+++ b/include/gpu/GrContext.h |
@@ -899,6 +899,17 @@ public: |
GrPathRendererChain::DrawType drawType = GrPathRendererChain::kColor_DrawType, |
GrPathRendererChain::StencilSupport* stencilSupport = NULL); |
+ /** |
+ * Stores a custom resource in the cache, based on the specified key. |
+ */ |
+ void addResourceToCache(const GrResourceKey&, GrCacheable*); |
+ |
+ /** |
+ * Finds a resource in the cache, based on the specified key. This is intended for use in |
+ * conjunction with addResourceToCache(). The return value will be NULL if not found. The |
+ * caller must balance with a call to unref(). |
+ */ |
+ GrCacheable* findAndRefCachedResource(const GrResourceKey&); |
#if GR_CACHE_STATS |
void printCacheStats() const; |