Chromium Code Reviews| Index: src/core/SkImageCacherator.h |
| diff --git a/src/core/SkImageCacherator.h b/src/core/SkImageCacherator.h |
| index dc6b0f2c1a0cfcadc867124a7253e8e5510f29af..6812c72fccb092b1b0172d6f251f37cbc0bb0d19 100644 |
| --- a/src/core/SkImageCacherator.h |
| +++ b/src/core/SkImageCacherator.h |
| @@ -14,6 +14,7 @@ |
| class GrContext; |
| class SkBitmap; |
| +class SkImage; |
| /* |
| * Internal class to manage caching the output of an ImageGenerator. |
| @@ -29,16 +30,22 @@ public: |
| /** |
| * On success (true), bitmap will point to the pixels for this generator. If this returns |
| * false, the bitmap will be reset to empty. |
| + * |
| + * If not NULL, the client will be notified (->notifyAddedToCache()) when resources are |
| + * added to the cache on its behalf. |
| */ |
| - bool lockAsBitmap(SkBitmap*); |
| + bool lockAsBitmap(SkBitmap*, const SkImage* client); |
|
mtklein
2015/09/18 14:32:36
I think I'm having trouble catching up on our new
f(malita)
2015/09/18 15:00:40
Sounds about right to me.
|
| /** |
| * Returns a ref() on the texture produced by this generator. The caller must call unref() |
| * when it is done. Will return nullptr on failure. |
| * |
| + * If not NULL, the client will be notified (->notifyAddedToCache()) when resources are |
| + * added to the cache on its behalf. |
| + * |
| * The caller is responsible for calling texture->unref() when they are done. |
| */ |
| - GrTexture* lockAsTexture(GrContext*, SkImageUsageType); |
| + GrTexture* lockAsTexture(GrContext*, SkImageUsageType, const SkImage* client); |
| /** |
| * If the underlying src naturally is represented by an encoded blob (in SkData), this returns |
| @@ -50,7 +57,7 @@ private: |
| SkImageCacherator(SkImageGenerator*, const SkImageInfo&, const SkIPoint&, uint32_t uniqueID); |
| bool generateBitmap(SkBitmap*); |
| - bool tryLockAsBitmap(SkBitmap*); |
| + bool tryLockAsBitmap(SkBitmap*, const SkImage*); |
| class ScopedGenerator { |
| SkImageCacherator* fCacher; |