aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/core/SkBitmap.h
diff options
context:
space:
mode:
authorGravatar commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2014-01-27 15:41:07 +0000
committerGravatar commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81>2014-01-27 15:41:07 +0000
commit0e8d0d6cdc2e02946b099006d0a47e60764905e5 (patch)
treed9c1821958062fe38b98ed6a59021baacf0930ba /include/core/SkBitmap.h
parent83c39db91313340cf05650a2a0a52a21f487b73d (diff)
add optional SkAlphaType parameter to notifyPixelsChanged
R=scroggo@google.com, halcanary@google.com, robertphillips@google.com Author: reed@google.com Review URL: https://codereview.chromium.org/147213002 git-svn-id: http://skia.googlecode.com/svn/trunk@13192 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'include/core/SkBitmap.h')
-rw-r--r--include/core/SkBitmap.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/core/SkBitmap.h b/include/core/SkBitmap.h
index 4dcf327226..1dd2c8034f 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);