Chromium Code Reviews| Index: include/gpu/GrContext.h |
| diff --git a/include/gpu/GrContext.h b/include/gpu/GrContext.h |
| index 4d0a94e4cda92682d59c1d83a6f23bb08805857b..07eea293ce1364bc7d5a562dd8c89e5d2a1edb40 100644 |
| --- a/include/gpu/GrContext.h |
| +++ b/include/gpu/GrContext.h |
| @@ -899,6 +899,15 @@ public: |
| GrPathRendererChain::DrawType drawType = GrPathRendererChain::kColor_DrawType, |
| GrPathRendererChain::StencilSupport* stencilSupport = NULL); |
| + /** |
| + * Client code can store custom resources in the cache using |
| + * addResourceToCache() and findCachedResource(). findCachedResource() does |
| + * not modify the object's ref count, so the caller does not need to call |
| + * unref(). |
|
bsalomon
2014/04/30 20:19:52
I think this has to ref the object to be safe. Wha
Chris Dalton
2014/04/30 21:11:29
Right, that wording is confusing come to think of
|
| + */ |
| + void addResourceToCache(const GrResourceKey&, GrCacheable*); |
| + GrCacheable* findCachedResource(const GrResourceKey& key); |
| + |
| #if GR_CACHE_STATS |
| void printCacheStats() const; |