aboutsummaryrefslogtreecommitdiffhomepage
path: root/dm
diff options
context:
space:
mode:
authorGravatar msarett <msarett@google.com>2015-12-04 08:00:50 -0800
committerGravatar Commit bot <commit-bot@chromium.org>2015-12-04 08:00:50 -0800
commitbe8216a922241cc8f3ea3b813608fcb06936fde0 (patch)
tree7be8c716ef6a27ea505e8461434721b0146c6ac9 /dm
parentea75053c964799b44543279a1323edc0aa706a0c (diff)
Make SkAndroidCodec support ico
Diffstat (limited to 'dm')
-rw-r--r--dm/DM.cpp22
1 files changed, 2 insertions, 20 deletions
diff --git a/dm/DM.cpp b/dm/DM.cpp
index c28f688697..41e4c8dc3e 100644
--- a/dm/DM.cpp
+++ b/dm/DM.cpp
@@ -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) {