commit | 9e2ed83f9b29d91058ba411a4137d099877a48b2 | [log] [tgz] |
---|---|---|
author | reed <reed@google.com> | Mon Oct 31 05:27:28 2016 -0700 |
committer | Commit bot <commit-bot@chromium.org> | Mon Oct 31 05:27:28 2016 -0700 |
tree | a21292f7ce0a99859e80a8476ef3a571f2c247d9 | |
parent | 2f7068aec9906168b3c142b5057e098114376cc9 [diff] [blame] |
add isAlphaOnly() query BUG=skia:5904 GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2461773002 TBR= Review-Url: https://codereview.chromium.org/2461773002
diff --git a/src/image/SkImage.cpp b/src/image/SkImage.cpp index 09f7ecc..986fdec 100644 --- a/src/image/SkImage.cpp +++ b/src/image/SkImage.cpp
@@ -371,6 +371,10 @@ return as_IB(this)->onIsLazyGenerated(); } +bool SkImage::isAlphaOnly() const { + return as_IB(this)->onImageInfo().colorType() == kAlpha_8_SkColorType; +} + ////////////////////////////////////////////////////////////////////////////////////// #if !SK_SUPPORT_GPU