diff options
Diffstat (limited to 'src/images/SkWebpEncoder.cpp')
-rw-r--r-- | src/images/SkWebpEncoder.cpp | 31 |
1 files changed, 0 insertions, 31 deletions
diff --git a/src/images/SkWebpEncoder.cpp b/src/images/SkWebpEncoder.cpp index a5d0ffa838..c43ab8628f 100644 --- a/src/images/SkWebpEncoder.cpp +++ b/src/images/SkWebpEncoder.cpp @@ -86,20 +86,6 @@ static transform_scanline_proc choose_proc(const SkImageInfo& info, default: return nullptr; } -#ifdef SK_SUPPORT_LEGACY_INDEX_8_COLORTYPE - case kIndex_8_SkColorType: - switch (info.alphaType()) { - case kOpaque_SkAlphaType: - return transform_scanline_index8_opaque; - case kUnpremul_SkAlphaType: - case kPremul_SkAlphaType: - // If the color table is premultiplied, we'll fix it before calling the - // scanline proc. - return transform_scanline_index8_unpremul; - default: - return nullptr; - } -#endif case kGray_8_SkColorType: return transform_scanline_gray; case kRGBA_F16_SkColorType: @@ -149,23 +135,6 @@ bool SkWebpEncoder::Encode(SkWStream* stream, const SkPixmap& pixmap, const Opti } const SkPMColor* colors = nullptr; -#ifdef SK_SUPPORT_LEGACY_INDEX_8_COLORTYPE - SkPMColor storage[256]; - if (kIndex_8_SkColorType == pixmap.colorType()) { - if (!pixmap.ctable()) { - return false; - } - - colors = pixmap.ctable()->readColors(); - if (kPremul_SkAlphaType == pixmap.alphaType()) { - // Unpremultiply the colors. - const SkImageInfo rgbaInfo = pixmap.info().makeColorType(kRGBA_8888_SkColorType); - transform_scanline_proc proc = choose_proc(rgbaInfo, opts.fUnpremulBehavior); - proc((char*) storage, (const char*) colors, pixmap.ctable()->count(), 4, nullptr); - colors = storage; - } - } -#endif WebPConfig webp_config; if (!WebPConfigPreset(&webp_config, WEBP_PRESET_DEFAULT, opts.fQuality)) { |