Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(138)

Side by Side Diff: dm/DM.cpp

Issue 1044433002: Add SkWebpCodec, for decoding .webp images. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Fix conversion from float to int. Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | gyp/codec.gyp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « no previous file | gyp/codec.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698