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

Side by Side Diff: dm/DM.cpp

Issue 1445643002: Make SkAndroidCodec support wbmp (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 1 month 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 | src/codec/SkAndroidCodec.cpp » ('j') | src/codec/SkCodec_wbmp.cpp » ('J')
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 328 matching lines...) Expand 10 before | Expand all | Expand 10 after
339 for (float scale : nativeScales) { 339 for (float scale : nativeScales) {
340 for (CodecSrc::Mode mode : nativeModes) { 340 for (CodecSrc::Mode mode : nativeModes) {
341 for (uint32_t i = 0; i < numColorTypes; i++) { 341 for (uint32_t i = 0; i < numColorTypes; i++) {
342 push_codec_src(path, mode, colorTypes[i], scale); 342 push_codec_src(path, mode, colorTypes[i], scale);
343 } 343 }
344 } 344 }
345 } 345 }
346 346
347 // https://bug.skia.org/4428 347 // https://bug.skia.org/4428
348 static const char* const exts[] = { 348 static const char* const exts[] = {
349 "jpg", "jpeg", "png", "webp", 349 "jpg", "jpeg", "png", "webp", "wbmp",
350 "JPG", "JPEG", "PNG", "WEBP", 350 "JPG", "JPEG", "PNG", "WEBP", "WBMP",
351 }; 351 };
352 bool supported = false; 352 bool supported = false;
353 for (const char* ext : exts) { 353 for (const char* ext : exts) {
354 if (path.endsWith(ext)) { 354 if (path.endsWith(ext)) {
355 supported = true; 355 supported = true;
356 break; 356 break;
357 } 357 }
358 } 358 }
359 if (!supported) { 359 if (!supported) {
360 return; 360 return;
(...skipping 770 matching lines...) Expand 10 before | Expand all | Expand 10 after
1131 #endif // SK_PDF_IMAGE_STATS 1131 #endif // SK_PDF_IMAGE_STATS
1132 return 0; 1132 return 0;
1133 } 1133 }
1134 1134
1135 #if !defined(SK_BUILD_FOR_IOS) 1135 #if !defined(SK_BUILD_FOR_IOS)
1136 int main(int argc, char** argv) { 1136 int main(int argc, char** argv) {
1137 SkCommandLineFlags::Parse(argc, argv); 1137 SkCommandLineFlags::Parse(argc, argv);
1138 return dm_main(); 1138 return dm_main();
1139 } 1139 }
1140 #endif 1140 #endif
OLDNEW
« no previous file with comments | « no previous file | src/codec/SkAndroidCodec.cpp » ('j') | src/codec/SkCodec_wbmp.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698