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

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: Fix render_pictures_test after rebase 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
« no previous file with comments | « tools/image_expectations.cpp ('k') | tools/tests/render_pictures_test.py » ('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 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(imageBaseGSUrl, "", "The Google Storage image base URL the 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 448 matching lines...) Expand 10 before | Expand all | Expand 10 after
491 #endif 492 #endif
492 #endif 493 #endif
493 if (FLAGS_writeJsonSummaryPath.count() == 1) { 494 if (FLAGS_writeJsonSummaryPath.count() == 1) {
494 // If there were any descriptions on the command line, insert them now. 495 // If there were any descriptions on the command line, insert them now.
495 for (int i=0; i<FLAGS_descriptions.count(); i++) { 496 for (int i=0; i<FLAGS_descriptions.count(); i++) {
496 SkTArray<SkString> tokens; 497 SkTArray<SkString> tokens;
497 SkStrSplit(FLAGS_descriptions[i], "=", &tokens); 498 SkStrSplit(FLAGS_descriptions[i], "=", &tokens);
498 SkASSERT(tokens.count() == 2); 499 SkASSERT(tokens.count() == 2);
499 jsonSummary.addDescription(tokens[0].c_str(), tokens[1].c_str()); 500 jsonSummary.addDescription(tokens[0].c_str(), tokens[1].c_str());
500 } 501 }
502 if (FLAGS_imageBaseGSUrl.count() == 1) {
503 jsonSummary.setImageBaseGSUrl(FLAGS_imageBaseGSUrl[0]);
504 }
501 jsonSummary.writeToFile(FLAGS_writeJsonSummaryPath[0]); 505 jsonSummary.writeToFile(FLAGS_writeJsonSummaryPath[0]);
502 } 506 }
503 return 0; 507 return 0;
504 } 508 }
505 509
506 #if !defined SK_BUILD_FOR_IOS 510 #if !defined SK_BUILD_FOR_IOS
507 int main(int argc, char * const argv[]) { 511 int main(int argc, char * const argv[]) {
508 return tool_main(argc, (char**) argv); 512 return tool_main(argc, (char**) argv);
509 } 513 }
510 #endif 514 #endif
OLDNEW
« no previous file with comments | « tools/image_expectations.cpp ('k') | tools/tests/render_pictures_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698