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

Side by Side Diff: tools/render_pictures_main.cpp

Issue 251103004: Revert of fix contents of render_pictures JSON summary (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 7 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/PictureRenderer.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 17 matching lines...) Expand all
28 DECLARE_bool(deferImageDecoding); 28 DECLARE_bool(deferImageDecoding);
29 DEFINE_int32(maxComponentDiff, 256, "Maximum diff on a component, 0 - 256. Compo nents that differ " 29 DEFINE_int32(maxComponentDiff, 256, "Maximum diff on a component, 0 - 256. Compo nents that differ "
30 "by more than this amount are considered errors, though all diffs a re reported. " 30 "by more than this amount are considered errors, though all diffs a re reported. "
31 "Requires --validate."); 31 "Requires --validate.");
32 DECLARE_string(readPath); 32 DECLARE_string(readPath);
33 DEFINE_bool(writeChecksumBasedFilenames, false, 33 DEFINE_bool(writeChecksumBasedFilenames, false,
34 "When writing out images, use checksum-based filenames."); 34 "When writing out images, use checksum-based filenames.");
35 DEFINE_bool(writeEncodedImages, false, "Any time the skp contains an encoded ima ge, write it to a " 35 DEFINE_bool(writeEncodedImages, false, "Any time the skp contains an encoded ima ge, write it to a "
36 "file rather than decoding it. Requires writePath to be set. Skips d rawing the full " 36 "file rather than decoding it. Requires writePath to be set. Skips d rawing the full "
37 "skp to a file. Not compatible with deferImageDecoding."); 37 "skp to a file. Not compatible with deferImageDecoding.");
38 DEFINE_string(writeJsonSummaryPath, "", "File to write a JSON summary of image r esults to."); 38 DEFINE_string(writeJsonSummaryPath, "", "File to write a JSON summary of image r esults to. "
39 DEFINE_string2(writePath, w, "", "Directory to write the rendered images into.") ; 39 "TODO(epoger): Currently, this only works if --writePath is also s pecified. "
40 "See https://code.google.com/p/skia/issues/detail?id=2043 .");
41 DEFINE_string2(writePath, w, "", "Directory to write the rendered images.");
40 DEFINE_bool(writeWholeImage, false, "In tile mode, write the entire rendered ima ge to a " 42 DEFINE_bool(writeWholeImage, false, "In tile mode, write the entire rendered ima ge to a "
41 "file, instead of an image for each tile."); 43 "file, instead of an image for each tile.");
42 DEFINE_bool(validate, false, "Verify that the rendered image contains the same p ixels as " 44 DEFINE_bool(validate, false, "Verify that the rendered image contains the same p ixels as "
43 "the picture rendered in simple mode. When used in conjunction with --bbh, results " 45 "the picture rendered in simple mode. When used in conjunction with --bbh, results "
44 "are validated against the picture rendered in the same mode, but wi thout the bbh."); 46 "are validated against the picture rendered in the same mode, but wi thout the bbh.");
45 47
46 DEFINE_bool(bench_record, false, "If true, drop into an infinite loop of recordi ng the picture."); 48 DEFINE_bool(bench_record, false, "If true, drop into an infinite loop of recordi ng the picture.");
47 49
48 DEFINE_bool(preprocess, false, "If true, perform device specific preprocessing b efore rendering."); 50 DEFINE_bool(preprocess, false, "If true, perform device specific preprocessing b efore rendering.");
49 51
(...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after
332 for (int i = 1; i <= 255; ++i) { 334 for (int i = 1; i <= 255; ++i) {
333 if(diffs[i] > 0) { 335 if(diffs[i] > 0) {
334 SkDebugf("Number of pixels with max diff of %i is %i\n", i, diff s[i]); 336 SkDebugf("Number of pixels with max diff of %i is %i\n", i, diff s[i]);
335 } 337 }
336 } 338 }
337 } 339 }
338 340
339 if (FLAGS_writeWholeImage) { 341 if (FLAGS_writeWholeImage) {
340 sk_tools::force_all_opaque(*bitmap); 342 sk_tools::force_all_opaque(*bitmap);
341 343
344 // TODO(epoger): It would be better for the filename (without outputDir) to be passed in
345 // here, and used both for the checksum file and writing into outputDir.
342 SkString inputFilename, outputPath; 346 SkString inputFilename, outputPath;
343 sk_tools::get_basename(&inputFilename, inputPath); 347 sk_tools::get_basename(&inputFilename, inputPath);
344 sk_tools::make_filepath(&outputPath, *outputDir, inputFilename); 348 sk_tools::make_filepath(&outputPath, *outputDir, inputFilename);
345 sk_tools::replace_char(&outputPath, '.', '_'); 349 sk_tools::replace_char(&outputPath, '.', '_');
346 outputPath.append(".png"); 350 outputPath.append(".png");
347 351
348 if (NULL != jsonSummaryPtr) { 352 if (NULL != jsonSummaryPtr) {
349 SkString outputFileBasename; 353 SkString outputFileBasename;
350 sk_tools::get_basename(&outputFileBasename, outputPath); 354 sk_tools::get_basename(&outputFileBasename, outputPath);
351 jsonSummaryPtr->add(inputFilename.c_str(), outputFileBasename.c_str( ), *bitmap); 355 jsonSummaryPtr->add(inputFilename.c_str(), outputFileBasename.c_str( ), *bitmap);
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
476 jsonSummary.writeToFile(FLAGS_writeJsonSummaryPath[0]); 480 jsonSummary.writeToFile(FLAGS_writeJsonSummaryPath[0]);
477 } 481 }
478 return 0; 482 return 0;
479 } 483 }
480 484
481 #if !defined SK_BUILD_FOR_IOS 485 #if !defined SK_BUILD_FOR_IOS
482 int main(int argc, char * const argv[]) { 486 int main(int argc, char * const argv[]) {
483 return tool_main(argc, (char**) argv); 487 return tool_main(argc, (char**) argv);
484 } 488 }
485 #endif 489 #endif
OLDNEW
« no previous file with comments | « tools/PictureRenderer.cpp ('k') | tools/tests/render_pictures_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698