aboutsummaryrefslogtreecommitdiffhomepage
path: root/dm
diff options
context:
space:
mode:
authorGravatar Matt Sarett <msarett@google.com>2017-06-07 16:30:19 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-06-08 13:28:29 +0000
commitb6f4767294261dca3beef6f280c4bac69df3f930 (patch)
tree298b82f81edd075ae786980b207de9cee4705c0d /dm
parentd7c681d6a7b154d276e275becc51685eac8705c2 (diff)
Do not return Index8 from SkAndroidCodec::computeOutputColorType
Given that this is the only known use of Index8 color type, this is essentially an experimental delete. Bug: skia:6620 Change-Id: Ib363d237e0217f6e7f461a62e54d32892c428095 Reviewed-on: https://skia-review.googlesource.com/10586 Reviewed-by: Leon Scroggins <scroggo@google.com> Commit-Queue: Matt Sarett <msarett@google.com>
Diffstat (limited to 'dm')
-rw-r--r--dm/DMSrcSink.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/dm/DMSrcSink.cpp b/dm/DMSrcSink.cpp
index 4ac7e80626..1ffffd3bf0 100644
--- a/dm/DMSrcSink.cpp
+++ b/dm/DMSrcSink.cpp
@@ -173,6 +173,9 @@ Error BRDSrc::draw(SkCanvas* canvas) const {
return "Cannot decode (full) region.";
}
alpha8_to_gray8(&bitmap);
+
+ // Verify that we no longer support kIndex8 from this API.
+ SkASSERT(kIndex_8_SkColorType != bitmap.colorType());
canvas->drawBitmap(bitmap, 0, 0);
return "";
}
@@ -229,6 +232,7 @@ Error BRDSrc::draw(SkCanvas* canvas) const {
}
alpha8_to_gray8(&bitmap);
+ SkASSERT(kIndex_8_SkColorType != bitmap.colorType());
canvas->drawBitmapRect(bitmap,
SkRect::MakeXYWH((SkScalar) scaledBorder, (SkScalar) scaledBorder,
(SkScalar) (subsetWidth / fSampleSize),