Index: src/core/SkPixelRef.cpp |
diff --git a/src/core/SkPixelRef.cpp b/src/core/SkPixelRef.cpp |
index 0aa00e0bf58062fee2d3ddd7e706b81c18a44b0c..64075e5f525e9a6c7e5b31978b0433963cfc2f2e 100644 |
--- a/src/core/SkPixelRef.cpp |
+++ b/src/core/SkPixelRef.cpp |
@@ -203,6 +203,18 @@ uint32_t SkPixelRef::getGenerationID() const { |
return fGenerationID; |
} |
+#ifdef SK_BUILD_FOR_ANDROID_FRAMEWORK |
+uint32_t SkPixelRef::getStableID() const { |
+ if (0 == fStableID) { |
+ // Although it is okay for the stable ID to collide with a gen ID, it |
+ // is also okay for them not to collide, and this allows us to share |
+ // code. |
+ fStableID = SkNextPixelRefGenerationID(); |
+ } |
+ return fStableID; |
+} |
+#endif |
+ |
void SkPixelRef::addGenIDChangeListener(GenIDChangeListener* listener) { |
if (NULL == listener || !fUniqueGenerationID) { |
// No point in tracking this if we're not going to call it. |