| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2013 Google Inc. | 2 * Copyright 2013 Google Inc. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
| 5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
| 6 */ | 6 */ |
| 7 | 7 |
| 8 #include "CrashHandler.h" | 8 #include "CrashHandler.h" |
| 9 #include "DMJsonWriter.h" | 9 #include "DMJsonWriter.h" |
| 10 #include "DMSrcSink.h" | 10 #include "DMSrcSink.h" |
| (...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 252 CodecSrc::kGetFromCanvas_DstColorType, scale)); | 252 CodecSrc::kGetFromCanvas_DstColorType, scale)); |
| 253 push_src("image", "stripe", new CodecSrc(path, CodecSrc::kStripe_Mode, | 253 push_src("image", "stripe", new CodecSrc(path, CodecSrc::kStripe_Mode, |
| 254 CodecSrc::kGetFromCanvas_DstColorType, scale)); | 254 CodecSrc::kGetFromCanvas_DstColorType, scale)); |
| 255 } | 255 } |
| 256 } | 256 } |
| 257 | 257 |
| 258 static bool codec_supported(const char* ext) { | 258 static bool codec_supported(const char* ext) { |
| 259 // FIXME: Once other versions of SkCodec are available, we can add them to t
his | 259 // FIXME: Once other versions of SkCodec are available, we can add them to t
his |
| 260 // list (and eventually we can remove this check once they are all supported
). | 260 // list (and eventually we can remove this check once they are all supported
). |
| 261 static const char* const exts[] = { | 261 static const char* const exts[] = { |
| 262 "bmp", "gif", "jpg", "jpeg", "png", "ico", "wbmp", | 262 "bmp", "gif", "jpg", "jpeg", "png", "ico", "wbmp", "webp", |
| 263 "BMP", "GIF", "JPG", "JPEG", "PNG", "ICO", "WBMP" | 263 "BMP", "GIF", "JPG", "JPEG", "PNG", "ICO", "WBMP", "WEBP", |
| 264 }; | 264 }; |
| 265 | 265 |
| 266 for (uint32_t i = 0; i < SK_ARRAY_COUNT(exts); i++) { | 266 for (uint32_t i = 0; i < SK_ARRAY_COUNT(exts); i++) { |
| 267 if (0 == strcmp(exts[i], ext)) { | 267 if (0 == strcmp(exts[i], ext)) { |
| 268 return true; | 268 return true; |
| 269 } | 269 } |
| 270 } | 270 } |
| 271 return false; | 271 return false; |
| 272 } | 272 } |
| 273 | 273 |
| (...skipping 540 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 814 } | 814 } |
| 815 return 0; | 815 return 0; |
| 816 } | 816 } |
| 817 | 817 |
| 818 #if !defined(SK_BUILD_FOR_IOS) | 818 #if !defined(SK_BUILD_FOR_IOS) |
| 819 int main(int argc, char** argv) { | 819 int main(int argc, char** argv) { |
| 820 SkCommandLineFlags::Parse(argc, argv); | 820 SkCommandLineFlags::Parse(argc, argv); |
| 821 return dm_main(); | 821 return dm_main(); |
| 822 } | 822 } |
| 823 #endif | 823 #endif |
| OLD | NEW |