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>
This commit is contained in:
parent
68a58ea755
commit
02a4867e7a
@ -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?
|
||||
|
Loading…
Reference in New Issue
Block a user