diff options
author | Mike Reed <reed@google.com> | 2017-07-12 15:10:28 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-07-12 20:25:44 +0000 |
commit | 304a07c6c93298c3481bc0d4852d08c22a539504 (patch) | |
tree | ac9b11aab296f645ea66e02cc9e91abad10cd6eb /tools/sk_tool_utils.cpp | |
parent | 7da6ba2d63cfd5ae6add617f18ba4882e755642b (diff) |
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 <scroggo@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Mike Reed <reed@google.com>
Diffstat (limited to 'tools/sk_tool_utils.cpp')
-rw-r--r-- | tools/sk_tool_utils.cpp | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/tools/sk_tool_utils.cpp b/tools/sk_tool_utils.cpp index dff5d70150..47f4aae397 100644 --- a/tools/sk_tool_utils.cpp +++ b/tools/sk_tool_utils.cpp @@ -164,7 +164,6 @@ const char* colortype_name(SkColorType ct) { switch (ct) { case kUnknown_SkColorType: return "Unknown"; case kAlpha_8_SkColorType: return "Alpha_8"; - case kIndex_8_SkColorType: return "Index_8"; case kARGB_4444_SkColorType: return "ARGB_4444"; case kRGB_565_SkColorType: return "RGB_565"; case kRGBA_8888_SkColorType: return "RGBA_8888"; @@ -566,16 +565,7 @@ bool copy_to(SkBitmap* dst, SkColorType dstColorType, const SkBitmap& src) { return false; } - // allocate colortable if srcConfig == kIndex8_Config - sk_sp<SkColorTable> ctable = nullptr; - if (dstColorType == kIndex_8_SkColorType) { - if (src.colorType() != kIndex_8_SkColorType) { - return false; - } - - ctable = sk_ref_sp(srcPM.ctable()); - } - if (!tmpDst.tryAllocPixels(ctable.get())) { + if (!tmpDst.tryAllocPixels()) { return false; } |