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

Side by Side Diff: tools/bench_pictures_main.cpp

Issue 338633011: Deprecate SkPicture::clone(). (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: add define for chrome Created 6 years, 5 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
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 "BenchLogger.h" 8 #include "BenchLogger.h"
9 #include "Timer.h" 9 #include "Timer.h"
10 #include "CopyTilesRenderer.h" 10 #include "CopyTilesRenderer.h"
(...skipping 24 matching lines...) Expand all
35 "type:flag : Enable canvas filtering to disable a paint flag, " 35 "type:flag : Enable canvas filtering to disable a paint flag, "
36 "use no blur or low quality blur, or use no hinting or " 36 "use no blur or low quality blur, or use no hinting or "
37 "slight hinting. For all flags except AAClip, specify the " 37 "slight hinting. For all flags except AAClip, specify the "
38 "type of primitive to effect, or choose all. for AAClip " 38 "type of primitive to effect, or choose all. for AAClip "
39 "alone, the filter affects all clips independent of type. " 39 "alone, the filter affects all clips independent of type. "
40 "Specific flags are listed above."); 40 "Specific flags are listed above.");
41 DEFINE_string(logFile, "", "Destination for writing log output, in addition to s tdout."); 41 DEFINE_string(logFile, "", "Destination for writing log output, in addition to s tdout.");
42 DEFINE_bool(logPerIter, false, "Log each repeat timer instead of mean."); 42 DEFINE_bool(logPerIter, false, "Log each repeat timer instead of mean.");
43 DEFINE_string(jsonLog, "", "Destination for writing JSON data."); 43 DEFINE_string(jsonLog, "", "Destination for writing JSON data.");
44 DEFINE_bool(min, false, "Print the minimum times (instead of average)."); 44 DEFINE_bool(min, false, "Print the minimum times (instead of average).");
45 DECLARE_int32(multi);
46 DECLARE_string(readPath); 45 DECLARE_string(readPath);
47 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.");
48 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 "
49 "times for drawing the whole page. Requires tiled rendering."); 48 "times for drawing the whole page. Requires tiled rendering.");
50 DEFINE_bool(purgeDecodedTex, false, "Purge decoded and GPU-uploaded textures " 49 DEFINE_bool(purgeDecodedTex, false, "Purge decoded and GPU-uploaded textures "
51 "after each iteration."); 50 "after each iteration.");
52 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"
53 " for each picture."); 52 " for each picture.");
54 DEFINE_bool(trackDeferredCaching, false, "Only meaningful with --deferImageDecod ing and " 53 DEFINE_bool(trackDeferredCaching, false, "Only meaningful with --deferImageDecod ing and "
55 "SK_LAZY_CACHE_STATS set to true. Report percentage of cache hits wh en using " 54 "SK_LAZY_CACHE_STATS set to true. Report percentage of cache hits wh en using "
(...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after
329 328
330 if (errorString.size() > 0) { 329 if (errorString.size() > 0) {
331 gLogger.logError(errorString); 330 gLogger.logError(errorString);
332 } 331 }
333 332
334 if (NULL == renderer.get()) { 333 if (NULL == renderer.get()) {
335 exit(-1); 334 exit(-1);
336 } 335 }
337 336
338 if (FLAGS_timeIndividualTiles) { 337 if (FLAGS_timeIndividualTiles) {
339 if (FLAGS_multi > 1) {
340 gLogger.logError("Cannot time individual tiles with more than one th read.\n");
341 exit(-1);
342 }
343 sk_tools::TiledPictureRenderer* tiledRenderer = renderer->getTiledRender er(); 338 sk_tools::TiledPictureRenderer* tiledRenderer = renderer->getTiledRender er();
344 if (NULL == tiledRenderer) { 339 if (NULL == tiledRenderer) {
345 gLogger.logError("--timeIndividualTiles requires tiled rendering.\n" ); 340 gLogger.logError("--timeIndividualTiles requires tiled rendering.\n" );
346 exit(-1); 341 exit(-1);
347 } 342 }
348 if (!tiledRenderer->supportsTimingIndividualTiles()) { 343 if (!tiledRenderer->supportsTimingIndividualTiles()) {
349 gLogger.logError("This renderer does not support --timeIndividualTil es.\n"); 344 gLogger.logError("This renderer does not support --timeIndividualTil es.\n");
350 exit(-1); 345 exit(-1);
351 } 346 }
352 benchmark->setTimeIndividualTiles(true); 347 benchmark->setTimeIndividualTiles(true);
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
471 #endif 466 #endif
472 gWriter.end(); 467 gWriter.end();
473 return 0; 468 return 0;
474 } 469 }
475 470
476 #if !defined SK_BUILD_FOR_IOS 471 #if !defined SK_BUILD_FOR_IOS
477 int main(int argc, char * const argv[]) { 472 int main(int argc, char * const argv[]) {
478 return tool_main(argc, (char**) argv); 473 return tool_main(argc, (char**) argv);
479 } 474 }
480 #endif 475 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698