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

Side by Side Diff: tools/render_pictures_main.cpp

Issue 479613002: Add ability to output ImageBaseGSUrl to render_picture and use in rebaseline server (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Cleanup and add to gm_json.py Created 6 years, 4 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
« gm/gm_json.py ('K') | « tools/image_expectations.cpp ('k') | 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 2012 Google Inc. 2 * Copyright 2012 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 "LazyDecodeBitmap.h" 8 #include "LazyDecodeBitmap.h"
9 #include "CopyTilesRenderer.h" 9 #include "CopyTilesRenderer.h"
10 #include "SkBitmap.h" 10 #include "SkBitmap.h"
(...skipping 12 matching lines...) Expand all
23 #include "image_expectations.h" 23 #include "image_expectations.h"
24 #include "PictureRenderer.h" 24 #include "PictureRenderer.h"
25 #include "PictureRenderingFlags.h" 25 #include "PictureRenderingFlags.h"
26 #include "picture_utils.h" 26 #include "picture_utils.h"
27 27
28 // Flags used by this file, alphabetically: 28 // Flags used by this file, alphabetically:
29 DEFINE_bool(bench_record, false, "If true, drop into an infinite loop of recordi ng the picture."); 29 DEFINE_bool(bench_record, false, "If true, drop into an infinite loop of recordi ng the picture.");
30 DECLARE_bool(deferImageDecoding); 30 DECLARE_bool(deferImageDecoding);
31 DEFINE_string(descriptions, "", "one or more key=value pairs to add to the descr iptions section " 31 DEFINE_string(descriptions, "", "one or more key=value pairs to add to the descr iptions section "
32 "of the JSON summary."); 32 "of the JSON summary.");
33 DEFINE_string(googleStorageBucket, "", "The GoogleStorage bucket that images are stored in.");
33 DEFINE_int32(maxComponentDiff, 256, "Maximum diff on a component, 0 - 256. Compo nents that differ " 34 DEFINE_int32(maxComponentDiff, 256, "Maximum diff on a component, 0 - 256. Compo nents that differ "
34 "by more than this amount are considered errors, though all diffs a re reported. " 35 "by more than this amount are considered errors, though all diffs a re reported. "
35 "Requires --validate."); 36 "Requires --validate.");
36 DEFINE_string(mismatchPath, "", "Write images for tests that failed due to " 37 DEFINE_string(mismatchPath, "", "Write images for tests that failed due to "
37 "pixel mismatches into this directory."); 38 "pixel mismatches into this directory.");
38 DEFINE_bool(preprocess, false, "If true, perform device specific preprocessing b efore rendering."); 39 DEFINE_bool(preprocess, false, "If true, perform device specific preprocessing b efore rendering.");
39 DEFINE_string(readJsonSummaryPath, "", "JSON file to read image expectations fro m."); 40 DEFINE_string(readJsonSummaryPath, "", "JSON file to read image expectations fro m.");
40 DECLARE_string(readPath); 41 DECLARE_string(readPath);
41 DEFINE_bool(writeChecksumBasedFilenames, false, 42 DEFINE_bool(writeChecksumBasedFilenames, false,
42 "When writing out images, use checksum-based filenames."); 43 "When writing out images, use checksum-based filenames.");
(...skipping 443 matching lines...) Expand 10 before | Expand all | Expand 10 after
486 #endif 487 #endif
487 #endif 488 #endif
488 if (FLAGS_writeJsonSummaryPath.count() == 1) { 489 if (FLAGS_writeJsonSummaryPath.count() == 1) {
489 // If there were any descriptions on the command line, insert them now. 490 // If there were any descriptions on the command line, insert them now.
490 for (int i=0; i<FLAGS_descriptions.count(); i++) { 491 for (int i=0; i<FLAGS_descriptions.count(); i++) {
491 SkTArray<SkString> tokens; 492 SkTArray<SkString> tokens;
492 SkStrSplit(FLAGS_descriptions[i], "=", &tokens); 493 SkStrSplit(FLAGS_descriptions[i], "=", &tokens);
493 SkASSERT(tokens.count() == 2); 494 SkASSERT(tokens.count() == 2);
494 jsonSummary.addDescription(tokens[0].c_str(), tokens[1].c_str()); 495 jsonSummary.addDescription(tokens[0].c_str(), tokens[1].c_str());
495 } 496 }
497 if (FLAGS_googleStorageBucket.count() == 1) {
498 jsonSummary.setGoogleStorageBucket(FLAGS_googleStorageBucket[0]);
499 }
496 jsonSummary.writeToFile(FLAGS_writeJsonSummaryPath[0]); 500 jsonSummary.writeToFile(FLAGS_writeJsonSummaryPath[0]);
497 } 501 }
498 return 0; 502 return 0;
499 } 503 }
500 504
501 #if !defined SK_BUILD_FOR_IOS 505 #if !defined SK_BUILD_FOR_IOS
502 int main(int argc, char * const argv[]) { 506 int main(int argc, char * const argv[]) {
503 return tool_main(argc, (char**) argv); 507 return tool_main(argc, (char**) argv);
504 } 508 }
505 #endif 509 #endif
OLDNEW
« gm/gm_json.py ('K') | « tools/image_expectations.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698