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

Unified Diff: src/core/SkPixelRef.cpp

Issue 147213002: add optional SkAlphaType parameter to notifyPixelsChanged (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
« src/core/SkBitmap.cpp ('K') | « 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 10e1309c0b1af377268a0bdb30f4de2f9b61dee3..5fcfabc3aca12879963e6811e8d6b3c3a9dadeb9 100644
--- a/src/core/SkPixelRef.cpp
+++ b/src/core/SkPixelRef.cpp
@@ -264,6 +264,14 @@ void SkPixelRef::notifyPixelsChanged() {
this->needsNewGenID();
}
+void SkPixelRef::notifyAlphaTypeChanged(SkAlphaType at) {
+ if (fInfo.fAlphaType != at) {
+ *const_cast<SkAlphaType*>(&fInfo.fAlphaType) = at;
+ this->callGenIDChangeListeners();
scroggo 2014/01/24 20:50:52 I kind of think these two functions should be the
reed1 2014/01/27 13:46:14 I'll sync with the GPU guys, who invented this pat
+ this->needsNewGenID();
+ }
+}
+
void SkPixelRef::setImmutable() {
fIsImmutable = true;
}
« src/core/SkBitmap.cpp ('K') | « src/core/SkBitmap.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698