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

Side by Side Diff: tools/skimage_main.cpp

Issue 17448011: Allow skimage expectations file to not exist. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | 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 2011 Google Inc. 2 * Copyright 2011 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 "gm_expectations.h" 8 #include "gm_expectations.h"
9 #include "SkBitmap.h" 9 #include "SkBitmap.h"
10 #include "SkColorPriv.h" 10 #include "SkColorPriv.h"
(...skipping 466 matching lines...) Expand 10 before | Expand all | Expand 10 after
477 SkCommandLineFlags::Parse(argc, argv); 477 SkCommandLineFlags::Parse(argc, argv);
478 478
479 if (FLAGS_readPath.count() < 1) { 479 if (FLAGS_readPath.count() < 1) {
480 SkDebugf("Folder(s) or image(s) to decode are required.\n"); 480 SkDebugf("Folder(s) or image(s) to decode are required.\n");
481 return -1; 481 return -1;
482 } 482 }
483 483
484 484
485 SkAutoGraphics ag; 485 SkAutoGraphics ag;
486 486
487 if (!FLAGS_readExpectationsPath.isEmpty()) { 487 if (!FLAGS_readExpectationsPath.isEmpty() && sk_exists(FLAGS_readExpectation sPath[0])) {
488 gJsonExpectations.reset(SkNEW_ARGS(skiagm::JsonExpectationsSource, 488 gJsonExpectations.reset(SkNEW_ARGS(skiagm::JsonExpectationsSource,
489 (FLAGS_readExpectationsPath[0]))); 489 (FLAGS_readExpectationsPath[0])));
490 } 490 }
491 491
492 SkString outDir; 492 SkString outDir;
493 SkString* outDirPtr; 493 SkString* outDirPtr;
494 494
495 if (FLAGS_writePath.count() == 1) { 495 if (FLAGS_writePath.count() == 1) {
496 outDir.set(FLAGS_writePath[0]); 496 outDir.set(FLAGS_writePath[0]);
497 append_path_separator_if_necessary(&outDir); 497 append_path_separator_if_necessary(&outDir);
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
544 } 544 }
545 545
546 return failed ? -1 : 0; 546 return failed ? -1 : 0;
547 } 547 }
548 548
549 #if !defined SK_BUILD_FOR_IOS 549 #if !defined SK_BUILD_FOR_IOS
550 int main(int argc, char * const argv[]) { 550 int main(int argc, char * const argv[]) {
551 return tool_main(argc, (char**) argv); 551 return tool_main(argc, (char**) argv);
552 } 552 }
553 #endif 553 #endif
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698