From 742a3e298fda669006147e4a305bab8452369b1f Mon Sep 17 00:00:00 2001 From: Leon Scroggins III Date: Mon, 10 Jul 2017 11:51:37 -0400 Subject: Remove support for decoding to kIndex_8 Fix up callsites, and remove tests that no longer make sense. Bug: skia:6828 Change-Id: I2548c4b7528b7b1be7412563156f27b52c9d4295 Reviewed-on: https://skia-review.googlesource.com/21664 Reviewed-by: Derek Sollenberger Commit-Queue: Leon Scroggins --- tests/CodecPriv.h | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) (limited to 'tests/CodecPriv.h') diff --git a/tests/CodecPriv.h b/tests/CodecPriv.h index cfa794ed68..d80bb69672 100644 --- a/tests/CodecPriv.h +++ b/tests/CodecPriv.h @@ -17,21 +17,9 @@ inline bool decode_memory(const void* mem, size_t size, SkBitmap* bm) { return false; } - // Construct a color table for the decode if necessary - sk_sp colorTable(nullptr); - SkPMColor* colorPtr = nullptr; - int* colorCountPtr = nullptr; - int maxColors = 256; - if (kIndex_8_SkColorType == codec->getInfo().colorType()) { - SkPMColor colors[256]; - colorTable.reset(new SkColorTable(colors, maxColors)); - colorPtr = const_cast(colorTable->readColors()); - colorCountPtr = &maxColors; - } - - bm->allocPixels(codec->getInfo(), colorTable); + bm->allocPixels(codec->getInfo()); const SkCodec::Result result = codec->getPixels(codec->getInfo(), bm->getPixels(), - bm->rowBytes(), nullptr, colorPtr, colorCountPtr); + bm->rowBytes()); return result == SkCodec::kSuccess || result == SkCodec::kIncompleteInput; } #endif // CodecPriv_DEFINED -- cgit v1.2.3