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

Side by Side Diff: dm/DM.cpp

Issue 1076923002: SkJpegCodec (Closed) Base URL: https://skia.googlesource.com/skia.git@gif-real
Patch Set: Added comment Created 5 years, 8 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 | dm/DMSrcSink.cpp » ('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 204 matching lines...) Expand 10 before | Expand all | Expand 10 after
215 push_src("image", "codec", new CodecSrc(path, CodecSrc::kNormal_Mode, 215 push_src("image", "codec", new CodecSrc(path, CodecSrc::kNormal_Mode,
216 CodecSrc::kGetFromCanvas_DstColorType)); 216 CodecSrc::kGetFromCanvas_DstColorType));
217 push_src("image", "scanline", new CodecSrc(path, CodecSrc::kScanline_Mode, 217 push_src("image", "scanline", new CodecSrc(path, CodecSrc::kScanline_Mode,
218 CodecSrc::kGetFromCanvas_DstColorType)); 218 CodecSrc::kGetFromCanvas_DstColorType));
219 } 219 }
220 220
221 static bool codec_supported(const char* ext) { 221 static bool codec_supported(const char* ext) {
222 // FIXME: Once other versions of SkCodec are available, we can add them to t his 222 // FIXME: Once other versions of SkCodec are available, we can add them to t his
223 // list (and eventually we can remove this check once they are all supported ). 223 // list (and eventually we can remove this check once they are all supported ).
224 static const char* const exts[] = { 224 static const char* const exts[] = {
225 "bmp", "gif", "png", "ico", "wbmp", 225 "bmp", "gif", "jpg", "jpeg", "png", "ico", "wbmp",
226 "BMP", "GIF", "PNG", "ICO", "WBMP" 226 "BMP", "GIF", "JPG", "JPEG", "PNG", "ICO", "WBMP"
227 }; 227 };
228 228
229 for (uint32_t i = 0; i < SK_ARRAY_COUNT(exts); i++) { 229 for (uint32_t i = 0; i < SK_ARRAY_COUNT(exts); i++) {
230 if (0 == strcmp(exts[i], ext)) { 230 if (0 == strcmp(exts[i], ext)) {
231 return true; 231 return true;
232 } 232 }
233 } 233 }
234 return false; 234 return false;
235 } 235 }
236 236
(...skipping 506 matching lines...) Expand 10 before | Expand all | Expand 10 after
743 } 743 }
744 return 0; 744 return 0;
745 } 745 }
746 746
747 #if !defined(SK_BUILD_FOR_IOS) 747 #if !defined(SK_BUILD_FOR_IOS)
748 int main(int argc, char** argv) { 748 int main(int argc, char** argv) {
749 SkCommandLineFlags::Parse(argc, argv); 749 SkCommandLineFlags::Parse(argc, argv);
750 return dm_main(); 750 return dm_main();
751 } 751 }
752 #endif 752 #endif
OLDNEW
« no previous file with comments | « no previous file | dm/DMSrcSink.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698