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

Side by Side Diff: tools/bench_pictures_main.cpp

Issue 303913002: In Android framework, make tools depend on jsoncpp (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Do as Thoreau would do. Created 6 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
« no previous file with comments | « tools/PictureResultsWriter.h ('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 "BenchTimer.h" 8 #include "BenchTimer.h"
9 #include "CopyTilesRenderer.h" 9 #include "CopyTilesRenderer.h"
10 #include "LazyDecodeBitmap.h" 10 #include "LazyDecodeBitmap.h"
(...skipping 21 matching lines...) Expand all
32 DECLARE_bool(deferImageDecoding); 32 DECLARE_bool(deferImageDecoding);
33 DEFINE_string(filter, "", 33 DEFINE_string(filter, "",
34 "type:flag : Enable canvas filtering to disable a paint flag, " 34 "type:flag : Enable canvas filtering to disable a paint flag, "
35 "use no blur or low quality blur, or use no hinting or " 35 "use no blur or low quality blur, or use no hinting or "
36 "slight hinting. For all flags except AAClip, specify the " 36 "slight hinting. For all flags except AAClip, specify the "
37 "type of primitive to effect, or choose all. for AAClip " 37 "type of primitive to effect, or choose all. for AAClip "
38 "alone, the filter affects all clips independent of type. " 38 "alone, the filter affects all clips independent of type. "
39 "Specific flags are listed above."); 39 "Specific flags are listed above.");
40 DEFINE_string(logFile, "", "Destination for writing log output, in addition to s tdout."); 40 DEFINE_string(logFile, "", "Destination for writing log output, in addition to s tdout.");
41 DEFINE_bool(logPerIter, false, "Log each repeat timer instead of mean."); 41 DEFINE_bool(logPerIter, false, "Log each repeat timer instead of mean.");
42 #ifdef SK_BUILD_JSON_WRITER
43 DEFINE_string(jsonLog, "", "Destination for writing JSON data."); 42 DEFINE_string(jsonLog, "", "Destination for writing JSON data.");
44 #endif
45 DEFINE_bool(min, false, "Print the minimum times (instead of average)."); 43 DEFINE_bool(min, false, "Print the minimum times (instead of average).");
46 DECLARE_int32(multi); 44 DECLARE_int32(multi);
47 DECLARE_string(readPath); 45 DECLARE_string(readPath);
48 DEFINE_int32(repeat, 1, "Set the number of times to repeat each test."); 46 DEFINE_int32(repeat, 1, "Set the number of times to repeat each test.");
49 DEFINE_bool(timeIndividualTiles, false, "Report times for drawing individual til es, rather than " 47 DEFINE_bool(timeIndividualTiles, false, "Report times for drawing individual til es, rather than "
50 "times for drawing the whole page. Requires tiled rendering."); 48 "times for drawing the whole page. Requires tiled rendering.");
51 DEFINE_bool(purgeDecodedTex, false, "Purge decoded and GPU-uploaded textures " 49 DEFINE_bool(purgeDecodedTex, false, "Purge decoded and GPU-uploaded textures "
52 "after each iteration."); 50 "after each iteration.");
53 DEFINE_string(timers, "c", "[wcgWC]*: Display wall, cpu, gpu, truncated wall or truncated cpu time" 51 DEFINE_string(timers, "c", "[wcgWC]*: Display wall, cpu, gpu, truncated wall or truncated cpu time"
54 " for each picture."); 52 " for each picture.");
(...skipping 357 matching lines...) Expand 10 before | Expand all | Expand 10 after
412 SkString str; 410 SkString str;
413 str.printf("Could not open %s for writing.\n", FLAGS_logFile[0]); 411 str.printf("Could not open %s for writing.\n", FLAGS_logFile[0]);
414 gLogger.logError(str); 412 gLogger.logError(str);
415 // TODO(borenet): We're disabling this for now, due to 413 // TODO(borenet): We're disabling this for now, due to
416 // write-protected Android devices. The very short-term 414 // write-protected Android devices. The very short-term
417 // solution is to ignore the fact that we have no log file. 415 // solution is to ignore the fact that we have no log file.
418 //exit(-1); 416 //exit(-1);
419 } 417 }
420 } 418 }
421 419
422 #ifdef SK_BUILD_JSON_WRITER
423 SkAutoTDelete<PictureJSONResultsWriter> jsonWriter; 420 SkAutoTDelete<PictureJSONResultsWriter> jsonWriter;
424 if (FLAGS_jsonLog.count() == 1) { 421 if (FLAGS_jsonLog.count() == 1) {
425 jsonWriter.reset(SkNEW(PictureJSONResultsWriter(FLAGS_jsonLog[0]))); 422 jsonWriter.reset(SkNEW(PictureJSONResultsWriter(FLAGS_jsonLog[0])));
426 gWriter.add(jsonWriter.get()); 423 gWriter.add(jsonWriter.get());
427 } 424 }
428 425
429 #endif
430 gWriter.add(&gLogWriter); 426 gWriter.add(&gLogWriter);
431 427
432 428
433 #if SK_ENABLE_INST_COUNT 429 #if SK_ENABLE_INST_COUNT
434 gPrintInstCount = true; 430 gPrintInstCount = true;
435 #endif 431 #endif
436 SkAutoGraphics ag; 432 SkAutoGraphics ag;
437 433
438 sk_tools::PictureBenchmark benchmark; 434 sk_tools::PictureBenchmark benchmark;
439 435
(...skipping 18 matching lines...) Expand all
458 #endif 454 #endif
459 gWriter.end(); 455 gWriter.end();
460 return 0; 456 return 0;
461 } 457 }
462 458
463 #if !defined SK_BUILD_FOR_IOS 459 #if !defined SK_BUILD_FOR_IOS
464 int main(int argc, char * const argv[]) { 460 int main(int argc, char * const argv[]) {
465 return tool_main(argc, (char**) argv); 461 return tool_main(argc, (char**) argv);
466 } 462 }
467 #endif 463 #endif
OLDNEW
« no previous file with comments | « tools/PictureResultsWriter.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698