diff options
Diffstat (limited to 'src/images/SkWebpEncoder.cpp')
-rw-r--r-- | src/images/SkWebpEncoder.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/images/SkWebpEncoder.cpp b/src/images/SkWebpEncoder.cpp index 296d4f4cf0..a5d0ffa838 100644 --- a/src/images/SkWebpEncoder.cpp +++ b/src/images/SkWebpEncoder.cpp @@ -86,6 +86,7 @@ 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: @@ -98,6 +99,7 @@ static transform_scanline_proc choose_proc(const SkImageInfo& info, default: return nullptr; } +#endif case kGray_8_SkColorType: return transform_scanline_gray; case kRGBA_F16_SkColorType: @@ -147,6 +149,7 @@ 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()) { @@ -162,6 +165,7 @@ bool SkWebpEncoder::Encode(SkWStream* stream, const SkPixmap& pixmap, const Opti colors = storage; } } +#endif WebPConfig webp_config; if (!WebPConfigPreset(&webp_config, WEBP_PRESET_DEFAULT, opts.fQuality)) { |