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

Unified Diff: include/core/SkBitmap.h

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 | « no previous file | include/core/SkPixelRef.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/core/SkBitmap.h
diff --git a/include/core/SkBitmap.h b/include/core/SkBitmap.h
index 4dcf3272262e09c2524920e3ae9917610a1acf1f..1dd2c8034f686ff5155fe7011c88fd1acfdab1b2 100644
--- a/include/core/SkBitmap.h
+++ b/include/core/SkBitmap.h
@@ -128,6 +128,13 @@ public:
* Set the bitmap's alphaType, returning true on success. If false is
* returned, then the specified new alphaType is incompatible with the
* Config, and the current alphaType is unchanged.
+ *
+ * Note: this changes the alphatype for the underlying pixels, which means
+ * that all bitmaps that might be sharing (subsets of) the pixels will
+ * be affected. This is an expensive change for some backends (e.g. GPU)
+ * since changing the alphatype can invalidate internal caches. Thus this
+ * call should only be made if it is associated with real changes to the
+ * pixel data.
*/
bool setAlphaType(SkAlphaType);
« no previous file with comments | « no previous file | include/core/SkPixelRef.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698