Index: include/core/SkPixelRef.h |
diff --git a/include/core/SkPixelRef.h b/include/core/SkPixelRef.h |
index 5d1aef7dd064e8b6ff789f551ee575ba4a0a74b8..0d9182aae1bf41964771f6b196c04bc18a6a7c95 100644 |
--- a/include/core/SkPixelRef.h |
+++ b/include/core/SkPixelRef.h |
@@ -265,6 +265,11 @@ public: |
virtual SkDiscardableMemory* diagnostic_only_getDiscardable() const { return NULL; } |
+ /** |
+ * Returns true if the pixels are generated on-the-fly (when required). |
+ */ |
+ bool isLazyGenerated() const { return this->onIsLazyGenerated(); } |
+ |
protected: |
/** |
* On success, returns true and fills out the LockRec for the pixels. On |
@@ -318,6 +323,8 @@ protected: |
virtual bool onRequestLock(const LockRequest&, LockResult*); |
+ virtual bool onIsLazyGenerated() const { return false; } |
+ |
/** Return the mutex associated with this pixelref. This value is assigned |
in the constructor, and cannot change during the lifetime of the object. |
*/ |