Index: src/core/SkPixelRef.cpp |
diff --git a/src/core/SkPixelRef.cpp b/src/core/SkPixelRef.cpp |
index c73c2f4b7dc3db2487a4d18e19b972d50b0a970f..4e600da7b091c33daf6422d785eca44ae18abdd6 100644 |
--- a/src/core/SkPixelRef.cpp |
+++ b/src/core/SkPixelRef.cpp |
@@ -5,6 +5,7 @@ |
* found in the LICENSE file. |
*/ |
+#include "SkBitmapCache.h" |
#include "SkPixelRef.h" |
#include "SkThread.h" |
@@ -214,6 +215,7 @@ void SkPixelRef::addGenIDChangeListener(GenIDChangeListener* listener) { |
*fGenIDChangeListeners.append() = listener; |
} |
+// we need to be called *before* the genID gets changed or zerod |
void SkPixelRef::callGenIDChangeListeners() { |
// We don't invalidate ourselves if we think another SkPixelRef is sharing our genID. |
if (fUniqueGenerationID) { |
@@ -223,6 +225,11 @@ void SkPixelRef::callGenIDChangeListeners() { |
} |
// Listeners get at most one shot, so whether these triggered or not, blow them away. |
fGenIDChangeListeners.deleteAll(); |
+ |
+ // if fGenerationID is 0, then perhaps we never had one, and we are in the destructor |
+ if (fGenerationID) { |
+ SkNotifyBitmapGenIDIsStale(fGenerationID); |
mtklein
2015/02/24 16:43:39
Just noticed.... this should probably go inside th
reed2
2015/02/24 17:44:52
Ah, thanks. I didn't really know what fUniqueGener
|
+ } |
} |
void SkPixelRef::notifyPixelsChanged() { |