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

Side by Side Diff: tools/render_pictures_main.cpp

Issue 943453002: Avoid wrong memory access due to double substitution and %% (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 10 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 | « tests/skia_test.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 381 matching lines...) Expand 10 before | Expand all | Expand 10 after
392 } 392 }
393 } while(iter.next(&inputFilename)); 393 } while(iter.next(&inputFilename));
394 } else if (SkStrEndsWith(input, ".skp")) { 394 } else if (SkStrEndsWith(input, ".skp")) {
395 SkString inputPath(input); 395 SkString inputPath(input);
396 if (!render_picture(inputPath, writePath, mismatchPath, renderer, jsonSu mmaryPtr)) { 396 if (!render_picture(inputPath, writePath, mismatchPath, renderer, jsonSu mmaryPtr)) {
397 ++failures; 397 ++failures;
398 } 398 }
399 } else { 399 } else {
400 SkString warning; 400 SkString warning;
401 warning.printf("Warning: skipping %s\n", input); 401 warning.printf("Warning: skipping %s\n", input);
402 SkDebugf(warning.c_str()); 402 SkDebugf("%s", warning.c_str());
403 } 403 }
404 return failures; 404 return failures;
405 } 405 }
406 406
407 int tool_main(int argc, char** argv); 407 int tool_main(int argc, char** argv);
408 int tool_main(int argc, char** argv) { 408 int tool_main(int argc, char** argv) {
409 SkCommandLineFlags::SetUsage("Render .skp files."); 409 SkCommandLineFlags::SetUsage("Render .skp files.");
410 SkCommandLineFlags::Parse(argc, argv); 410 SkCommandLineFlags::Parse(argc, argv);
411 411
412 if (FLAGS_readPath.isEmpty()) { 412 if (FLAGS_readPath.isEmpty()) {
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
504 jsonSummary.writeToFile(FLAGS_writeJsonSummaryPath[0]); 504 jsonSummary.writeToFile(FLAGS_writeJsonSummaryPath[0]);
505 } 505 }
506 return 0; 506 return 0;
507 } 507 }
508 508
509 #if !defined SK_BUILD_FOR_IOS 509 #if !defined SK_BUILD_FOR_IOS
510 int main(int argc, char * const argv[]) { 510 int main(int argc, char * const argv[]) {
511 return tool_main(argc, (char**) argv); 511 return tool_main(argc, (char**) argv);
512 } 512 }
513 #endif 513 #endif
OLDNEW
« no previous file with comments | « tests/skia_test.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698