Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(104)

Unified Diff: src/core/SkBitmap.cpp

Issue 147213002: add optional SkAlphaType parameter to notifyPixelsChanged (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: fix dox Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « include/core/SkPixelRef.h ('k') | src/core/SkPixelRef.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
}
« no previous file with comments | « include/core/SkPixelRef.h ('k') | src/core/SkPixelRef.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698