From 304a07c6c93298c3481bc0d4852d08c22a539504 Mon Sep 17 00:00:00 2001 From: Mike Reed Date: Wed, 12 Jul 2017 15:10:28 -0400 Subject: remove references to kIndex_8_SkColorType from our tools/tests Bug: skia:6828 Change-Id: Ib5049c28c11b7320bece20f5a0a886de8b2a4343 Reviewed-on: https://skia-review.googlesource.com/22728 Reviewed-by: Leon Scroggins Reviewed-by: Florin Malita Commit-Queue: Mike Reed --- tests/BitmapCopyTest.cpp | 20 +++----------------- 1 file changed, 3 insertions(+), 17 deletions(-) (limited to 'tests/BitmapCopyTest.cpp') diff --git a/tests/BitmapCopyTest.cpp b/tests/BitmapCopyTest.cpp index dd5bf1afde..d5da4be0da 100644 --- a/tests/BitmapCopyTest.cpp +++ b/tests/BitmapCopyTest.cpp @@ -21,13 +21,6 @@ static void init_src(const SkBitmap& bitmap) { } } -static sk_sp init_ctable() { - static const SkColor colors[] = { - SK_ColorBLACK, SK_ColorRED, SK_ColorGREEN, SK_ColorBLUE, SK_ColorWHITE - }; - return SkColorTable::Make(colors, SK_ARRAY_COUNT(colors)); -} - struct Pair { SkColorType fColorType; const char* fValid; @@ -63,7 +56,6 @@ struct Coordinates { static const Pair gPairs[] = { { kUnknown_SkColorType, "0000000" }, { kAlpha_8_SkColorType, "0100000" }, - { kIndex_8_SkColorType, "0101111" }, { kRGB_565_SkColorType, "0101011" }, { kARGB_4444_SkColorType, "0101111" }, { kN32_SkColorType, "0101111" }, @@ -75,18 +67,13 @@ static const int H = 33; static void setup_src_bitmaps(SkBitmap* srcOpaque, SkBitmap* srcPremul, SkColorType ct) { - sk_sp ctable; - if (kIndex_8_SkColorType == ct) { - ctable = init_ctable(); - } - sk_sp colorSpace = nullptr; if (kRGBA_F16_SkColorType == ct) { colorSpace = SkColorSpace::MakeSRGBLinear(); } - srcOpaque->allocPixels(SkImageInfo::Make(W, H, ct, kOpaque_SkAlphaType, colorSpace), ctable); - srcPremul->allocPixels(SkImageInfo::Make(W, H, ct, kPremul_SkAlphaType, colorSpace), ctable); + srcOpaque->allocPixels(SkImageInfo::Make(W, H, ct, kOpaque_SkAlphaType, colorSpace)); + srcPremul->allocPixels(SkImageInfo::Make(W, H, ct, kPremul_SkAlphaType, colorSpace)); init_src(*srcOpaque); init_src(*srcPremul); } @@ -117,8 +104,7 @@ DEF_TEST(BitmapCopy_extractSubset, reporter) { if (!success) { // Skip checking that success matches fValid, which is redundant // with the code below. - REPORTER_ASSERT(reporter, kIndex_8_SkColorType == gPairs[i].fColorType || - gPairs[i].fColorType != gPairs[j].fColorType); + REPORTER_ASSERT(reporter, gPairs[i].fColorType != gPairs[j].fColorType); continue; } -- cgit v1.2.3