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

Unified Diff: include/core/SkPixelRef.h

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 | « include/core/SkBitmap.h ('k') | src/core/SkBitmap.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/core/SkPixelRef.h
diff --git a/include/core/SkPixelRef.h b/include/core/SkPixelRef.h
index 62edc3ec954a1dbc6d3a2c0e889f3db20cb7776f..5a9a5a05f7375406f5b0e2f03baafaef668c8769 100644
--- a/include/core/SkPixelRef.h
+++ b/include/core/SkPixelRef.h
@@ -130,15 +130,15 @@ public:
* Call this if you have changed the contents of the pixels. This will in-
* turn cause a different generation ID value to be returned from
* getGenerationID().
- *
- * If the alphatype has also changed, specify its new value as well. If
- * the new pixels' alphatype is the same, this can be called with no
- * parameter.
*/
- void notifyPixelsChanged(SkAlphaType);
- void notifyPixelsChanged() {
- this->notifyPixelsChanged(fInfo.fAlphaType);
- }
+ void notifyPixelsChanged();
+
+ /**
+ * Change the info's AlphaType. Note that this does not automatically
+ * invalidate the generation ID. If the pixel values themselves have
+ * changed, then you must explicitly call notifyPixelsChanged() as well.
+ */
+ void changeAlphaType(SkAlphaType at);
/** Returns true if this pixelref is marked as immutable, meaning that the
contents of its pixels will not change for the lifetime of the pixelref.
« no previous file with comments | « include/core/SkBitmap.h ('k') | src/core/SkBitmap.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698