Index: include/core/SkPixelRef.h |
diff --git a/include/core/SkPixelRef.h b/include/core/SkPixelRef.h |
index 6f0421e3c4f36dbf11d440b75225ed65a15a1c04..766fa7ffffd1218a6b2f983e149d6402188546aa 100644 |
--- a/include/core/SkPixelRef.h |
+++ b/include/core/SkPixelRef.h |
@@ -127,6 +127,17 @@ public: |
*/ |
uint32_t getGenerationID() const; |
+#ifdef SK_BUILD_FOR_ANDROID_FRAMEWORK |
+ /** Returns a non-zero, unique value corresponding to this SkPixelRef, |
+ which is unchanged when the pixels are changed and even when this |
+ object is deleted. |
+ |
+ Can be used as a key which must remain unique across changes and |
+ deletions. |
+ */ |
+ uint32_t getStableID() const; |
+#endif |
+ |
/** |
* Call this if you have changed the contents of the pixels. This will in- |
* turn cause a different generation ID value to be returned from |
@@ -358,6 +369,9 @@ private: |
mutable SkTRacy<uint32_t> fGenerationID; |
mutable SkTRacy<bool> fUniqueGenerationID; |
+#ifdef SK_BUILD_FOR_ANDROID_FRAMEWORK |
+ mutable SkTRacy<uint32_t> fStableID; |
mtklein
2014/11/24 19:12:41
const uint32_t and fill it in the constructor? It
scroggo
2014/11/24 19:20:25
Done.
|
+#endif |
SkTDArray<GenIDChangeListener*> fGenIDChangeListeners; // pointers are owned |