aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/core/SkBitmap.h
diff options
context:
space:
mode:
authorGravatar Mike Reed <reed@google.com>2017-07-02 15:46:49 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-07-03 13:58:18 +0000
commit0401c0d1d3ad9db5d3eecb3096bd569dfe5c2498 (patch)
treead58b2df0944f9f67218be9ecfdf8b5d58e4ad12 /include/core/SkBitmap.h
parentf642cb337ae4bde590ec32ed683c6650aa124c6b (diff)
hide index8 support
Bug: skia: Change-Id: I4ab7f4665cc9992319d3c9a5e02a417d503c189e Reviewed-on: https://skia-review.googlesource.com/20121 Reviewed-by: Florin Malita <fmalita@chromium.org> Commit-Queue: Mike Reed <reed@google.com>
Diffstat (limited to 'include/core/SkBitmap.h')
-rw-r--r--include/core/SkBitmap.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/include/core/SkBitmap.h b/include/core/SkBitmap.h
index 1f4f63853d..00a68dad4f 100644
--- a/include/core/SkBitmap.h
+++ b/include/core/SkBitmap.h
@@ -120,7 +120,14 @@ public:
/** Return true iff drawing this bitmap has no effect.
*/
- bool drawsNothing() const { return this->empty() || this->isNull(); }
+ bool drawsNothing() const {
+#ifndef SK_SUPPORT_LEGACY_INDEX_8
+ if (this->colorType() == kIndex_8_SkColorType) {
+ return true;
+ }
+#endif
+ return this->empty() || this->isNull();
+ }
/** Return the number of bytes between subsequent rows of the bitmap. */
size_t rowBytes() const { return fRowBytes; }