Index: src/core/SkImageCacherator.h |
diff --git a/src/core/SkImageCacherator.h b/src/core/SkImageCacherator.h |
index 3be69a5785686e811e2a0c2e4c151d6cbeeaf95c..2d9e94cc4d7f9bc7b1e3a439f69eebe3a636b800 100644 |
--- a/src/core/SkImageCacherator.h |
+++ b/src/core/SkImageCacherator.h |
@@ -68,7 +68,18 @@ public: |
int srcX, int srcY); |
private: |
- SkImageCacherator(SkImageGenerator*, const SkImageInfo&, const SkIPoint&, uint32_t uniqueID); |
+ struct Validator { |
+ Validator(SkImageGenerator*, const SkIRect* subset); |
+ |
+ operator bool() const { return fGenerator.get(); } |
+ |
+ std::unique_ptr<SkImageGenerator> fGenerator; |
+ SkImageInfo fInfo; |
+ SkIPoint fOrigin; |
+ uint32_t fUniqueID; |
+ }; |
+ |
+ SkImageCacherator(Validator*); |
bool generateBitmap(SkBitmap*); |
bool tryLockAsBitmap(SkBitmap*, const SkImage*, SkImage::CachingHint); |
@@ -100,6 +111,8 @@ private: |
const uint32_t fUniqueID; |
friend class GrImageTextureMaker; |
+ friend class SkImage; |
+ friend class SkImage_Generator; |
}; |
#endif |