From 8db74f1f1df221978d5edd598804e2ea0f307570 Mon Sep 17 00:00:00 2001 From: Matt Sarett Date: Wed, 14 Jun 2017 13:02:05 +0000 Subject: Revert "Revert "Do not return Index8 from SkAndroidCodec::computeOutputColorType"" This reverts commit 81c83a7db4e524b19d33bf7c8a9b537b9d606c93. Reason for revert: Original change's description: > Revert "Do not return Index8 from SkAndroidCodec::computeOutputColorType" > > This reverts commit b6f4767294261dca3beef6f280c4bac69df3f930. > > Reason for revert: This breaks CTS tests in Android. Doh. > > Original change's description: > > 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 > > Commit-Queue: Matt Sarett > > TBR=msarett@google.com,scroggo@google.com,reed@google.com > No-Presubmit: true > No-Tree-Checks: true > No-Try: true > Bug: skia:6620 > > Change-Id: I2b44c695b8b95659520e9532901f636f56e01e2a > Reviewed-on: https://skia-review.googlesource.com/19084 > Reviewed-by: Matt Sarett > Commit-Queue: Matt Sarett TBR=msarett@google.com,scroggo@google.com,reviews@skia.org,reed@google.com # Not skipping CQ checks because original CL landed > 1 day ago. Bug: skia:6620 Change-Id: I7e4e3a5ec068102244ad3a0259aa6aded4f12f36 Reviewed-on: https://skia-review.googlesource.com/19802 Reviewed-by: Matt Sarett Commit-Queue: Matt Sarett --- dm/DMSrcSink.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'dm') diff --git a/dm/DMSrcSink.cpp b/dm/DMSrcSink.cpp index 4029524a14..28b81d2718 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), -- cgit v1.2.3