Index: src/core/SkBitmap.cpp |
diff --git a/src/core/SkBitmap.cpp b/src/core/SkBitmap.cpp |
index 707438636dc279cedcd54263988cc186b95140fd..825b1dcecad7587a8d0f2520c296f49f254849c9 100644 |
--- a/src/core/SkBitmap.cpp |
+++ b/src/core/SkBitmap.cpp |
@@ -321,7 +321,12 @@ bool SkBitmap::setAlphaType(SkAlphaType alphaType) { |
if (!validate_alphaType(this->config(), alphaType, &alphaType)) { |
return false; |
} |
- fAlphaType = SkToU8(alphaType); |
+ if (fAlphaType != alphaType) { |
+ fAlphaType = SkToU8(alphaType); |
+ if (fPixelRef) { |
+ fPixelRef->notifyPixelsChanged(alphaType); |
+ } |
+ } |
return true; |
} |