aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorGravatar Brian Osman <brianosman@google.com>2017-04-10 11:47:17 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-04-10 16:24:46 +0000
commit02a4867e7acc44008cf8865bc93ce76c356de215 (patch)
tree1bb6826129711d7f5e18925d53dc7f8523c7f5ad /src
parent68a58ea755e172421f99c25b8130a23cdfd36145 (diff)
Remove Index_8 handling in cacherator heuristic code
Constructor changes the color type to N32 now, so this code is never needed. Bug: skia: Change-Id: If464440fed799122fed810d870f5d6d9a932bf12 Reviewed-on: https://skia-review.googlesource.com/13000 Commit-Queue: Brian Osman <brianosman@google.com> Reviewed-by: Matt Sarett <msarett@google.com>
Diffstat (limited to 'src')
-rw-r--r--src/core/SkImageCacherator.cpp20
1 files changed, 2 insertions, 18 deletions
diff --git a/src/core/SkImageCacherator.cpp b/src/core/SkImageCacherator.cpp
index a9db283c3a..7b2bf2943a 100644
--- a/src/core/SkImageCacherator.cpp
+++ b/src/core/SkImageCacherator.cpp
@@ -361,24 +361,8 @@ SkImageCacherator::CachedFormat SkImageCacherator::chooseCacheFormat(SkColorSpac
return kLegacy_CachedFormat;
case kIndex_8_SkColorType:
- // We can't draw from indexed textures with a color space, so ask the codec to expand
- if (cs->gammaCloseToSRGB()) {
- if (caps.supportsSRGB()) {
- return kSRGB8888_CachedFormat;
- } else if (caps.supportsHalfFloat()) {
- return kLinearF16_CachedFormat;
- } else {
- return kLegacy_CachedFormat;
- }
- } else {
- if (caps.supportsHalfFloat()) {
- return kLinearF16_CachedFormat;
- } else if (caps.supportsSRGB()) {
- return kSRGB8888_CachedFormat;
- } else {
- return kLegacy_CachedFormat;
- }
- }
+ SkDEBUGFAIL("Index_8 should have been remapped at construction time.");
+ return kLegacy_CachedFormat;
case kGray_8_SkColorType:
// TODO: What do we do with grayscale sources that have strange color spaces attached?