diff options
author | 2015-12-04 08:00:50 -0800 | |
---|---|---|
committer | 2015-12-04 08:00:50 -0800 | |
commit | be8216a922241cc8f3ea3b813608fcb06936fde0 (patch) | |
tree | 7be8c716ef6a27ea505e8461434721b0146c6ac9 /dm | |
parent | ea75053c964799b44543279a1323edc0aa706a0c (diff) |
Make SkAndroidCodec support ico
BUG=skia:
Review URL: https://codereview.chromium.org/1472933002
Diffstat (limited to 'dm')
-rw-r--r-- | dm/DM.cpp | 22 |
1 files changed, 2 insertions, 20 deletions
@@ -345,35 +345,17 @@ static void push_codec_srcs(Path path) { bool subset = false; // The following image types are supported by BitmapRegionDecoder, // so we will test full image decodes and subset decodes. - static const char* const subsetExts[] = { + static const char* const exts[] = { "jpg", "jpeg", "png", "webp", "JPG", "JPEG", "PNG", "WEBP", }; - for (const char* ext : subsetExts) { + for (const char* ext : exts) { if (path.endsWith(ext)) { subset = true; break; } } - bool full = false; - // The following image types are only supported by BitmapFactory, - // so we only need to test full image decodes. - static const char* fullExts[] = { - "wbmp", "bmp", "gif", - "WBMP", "BMP", "GIF", - }; - for (const char* ext : fullExts) { - if (path.endsWith(ext)) { - full = true; - break; - } - } - - if (!full && !subset) { - return; - } - const int sampleSizes[] = { 1, 2, 3, 4, 5, 6, 7, 8 }; for (int sampleSize : sampleSizes) { |