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

Unified Diff: src/core/SkPixelRef.cpp

Issue 137263009: change setAlphaType to not modify the pixelref's genID (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: 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 | « src/core/SkBitmap.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkPixelRef.cpp
diff --git a/src/core/SkPixelRef.cpp b/src/core/SkPixelRef.cpp
index 507a4fcd48c92a0849129aa85c5aabef2bfedacb..d08796b18c818aaca263b128de5091f63d3a67bd 100644
--- a/src/core/SkPixelRef.cpp
+++ b/src/core/SkPixelRef.cpp
@@ -254,17 +254,20 @@ void SkPixelRef::callGenIDChangeListeners() {
fGenIDChangeListeners.deleteAll();
}
-void SkPixelRef::notifyPixelsChanged(SkAlphaType at) {
+void SkPixelRef::notifyPixelsChanged() {
#ifdef SK_DEBUG
if (fIsImmutable) {
SkDebugf("========== notifyPixelsChanged called on immutable pixelref");
}
#endif
- *const_cast<SkAlphaType*>(&fInfo.fAlphaType) = at;
this->callGenIDChangeListeners();
this->needsNewGenID();
}
+void SkPixelRef::changeAlphaType(SkAlphaType at) {
+ *const_cast<SkAlphaType*>(&fInfo.fAlphaType) = at;
+}
+
void SkPixelRef::setImmutable() {
fIsImmutable = true;
}
« no previous file with comments | « src/core/SkBitmap.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698