Index: src/lazy/SkDiscardablePixelRef.cpp |
diff --git a/src/lazy/SkDiscardablePixelRef.cpp b/src/lazy/SkDiscardablePixelRef.cpp |
index b6e1b1004ed7096fc180be5945aa44e5dfab1c1c..4e19c7f65b9c011e6e2ab424a5e05a67218f2986 100644 |
--- a/src/lazy/SkDiscardablePixelRef.cpp |
+++ b/src/lazy/SkDiscardablePixelRef.cpp |
@@ -20,6 +20,9 @@ SkDiscardablePixelRef::SkDiscardablePixelRef(SkImageGenerator* generator, |
SkASSERT(fGenerator != NULL); |
SkASSERT(fSize > 0); |
SkASSERT(fRowBytes > 0); |
+ // The SkImageGenerator contract requires fGenerator to always |
+ // decode the same image on each call to getPixels(). |
+ this->setImmutable(); |
} |
SkDiscardablePixelRef::~SkDiscardablePixelRef() { |