Chromium Code Reviews| Index: dm/DM.cpp |
| diff --git a/dm/DM.cpp b/dm/DM.cpp |
| index 98f0d947a00bee2079eb7cb8dcb8d2b7b67cfe83..e86420d60458117eea71fefcfd429a723378f8d1 100644 |
| --- a/dm/DM.cpp |
| +++ b/dm/DM.cpp |
| @@ -153,9 +153,17 @@ static void push_src(const char* tag, Src* s) { |
| static bool codec_supported(const char* ext) { |
| // FIXME: Once other versions of SkCodec are available, we can add them to this |
| // list (and eventually we can remove this check once they are all supported). |
| - return strcmp(ext, "png") == 0 || strcmp(ext, "PNG") == 0 || |
| - strcmp(ext, "bmp") == 0 || strcmp(ext, "BMP") == 0 || |
| - strcmp(ext, "ico") == 0 || strcmp(ext, "ICO") == 0; |
| + static const char* const exts[] = { |
| + "bmp", "gif", "png", "webp", "ico", |
|
scroggo
2015/03/25 19:44:48
We don't support webp yet.
msarett
2015/03/26 19:15:55
Yeah you're right. Copy paste error.
|
| + "BMP", "GIF", "PNG", "WEBP", "ICO", |
| + }; |
| + |
| + for (uint32_t i = 0; i < SK_ARRAY_COUNT(exts); i++) { |
| + if (0 == strcmp(exts[i], ext)) { |
| + return true; |
| + } |
| + } |
| + return false; |
| } |
| static void gather_srcs() { |