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

Side by Side Diff: tools/bench_pictures_main.cpp

Issue 117583002: Update bench pictures to time image decode & upload costs (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Fixed comment Created 7 years 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 | Annotate | Revision Log
« no previous file with comments | « tools/PictureRenderer.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 "BenchTimer.h" 8 #include "BenchTimer.h"
9 #include "CopyTilesRenderer.h" 9 #include "CopyTilesRenderer.h"
10 #include "LazyDecodeBitmap.h" 10 #include "LazyDecodeBitmap.h"
(...skipping 23 matching lines...) Expand all
34 "alone, the filter affects all clips independent of type. " 34 "alone, the filter affects all clips independent of type. "
35 "Specific flags are listed above."); 35 "Specific flags are listed above.");
36 DEFINE_string(logFile, "", "Destination for writing log output, in addition to s tdout."); 36 DEFINE_string(logFile, "", "Destination for writing log output, in addition to s tdout.");
37 DEFINE_bool(logPerIter, false, "Log each repeat timer instead of mean."); 37 DEFINE_bool(logPerIter, false, "Log each repeat timer instead of mean.");
38 DEFINE_bool(min, false, "Print the minimum times (instead of average)."); 38 DEFINE_bool(min, false, "Print the minimum times (instead of average).");
39 DECLARE_int32(multi); 39 DECLARE_int32(multi);
40 DECLARE_string(readPath); 40 DECLARE_string(readPath);
41 DEFINE_int32(repeat, 1, "Set the number of times to repeat each test."); 41 DEFINE_int32(repeat, 1, "Set the number of times to repeat each test.");
42 DEFINE_bool(timeIndividualTiles, false, "Report times for drawing individual til es, rather than " 42 DEFINE_bool(timeIndividualTiles, false, "Report times for drawing individual til es, rather than "
43 "times for drawing the whole page. Requires tiled rendering."); 43 "times for drawing the whole page. Requires tiled rendering.");
44 DEFINE_bool(purgeDecodedTex, false, "Purge decoded and GPU-uploaded textures "
45 "after each iteration.");
44 DEFINE_string(timers, "c", "[wcgWC]*: Display wall, cpu, gpu, truncated wall or truncated cpu time" 46 DEFINE_string(timers, "c", "[wcgWC]*: Display wall, cpu, gpu, truncated wall or truncated cpu time"
45 " for each picture."); 47 " for each picture.");
46 DEFINE_bool(trackDeferredCaching, false, "Only meaningful with --deferImageDecod ing and " 48 DEFINE_bool(trackDeferredCaching, false, "Only meaningful with --deferImageDecod ing and "
47 "LAZY_CACHE_STATS set to true. Report percentage of cache hits when using deferred " 49 "LAZY_CACHE_STATS set to true. Report percentage of cache hits when using deferred "
48 "image decoding."); 50 "image decoding.");
49 51
50 static char const * const gFilterTypes[] = { 52 static char const * const gFilterTypes[] = {
51 "paint", 53 "paint",
52 "point", 54 "point",
53 "line", 55 "line",
(...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after
331 gLogger.logError("--timeIndividualTiles requires tiled rendering.\n" ); 333 gLogger.logError("--timeIndividualTiles requires tiled rendering.\n" );
332 exit(-1); 334 exit(-1);
333 } 335 }
334 if (!tiledRenderer->supportsTimingIndividualTiles()) { 336 if (!tiledRenderer->supportsTimingIndividualTiles()) {
335 gLogger.logError("This renderer does not support --timeIndividualTil es.\n"); 337 gLogger.logError("This renderer does not support --timeIndividualTil es.\n");
336 exit(-1); 338 exit(-1);
337 } 339 }
338 benchmark->setTimeIndividualTiles(true); 340 benchmark->setTimeIndividualTiles(true);
339 } 341 }
340 342
343 benchmark->setPurgeDecodedTex(FLAGS_purgeDecodedTex);
344
341 if (FLAGS_readPath.count() < 1) { 345 if (FLAGS_readPath.count() < 1) {
342 gLogger.logError(".skp files or directories are required.\n"); 346 gLogger.logError(".skp files or directories are required.\n");
343 exit(-1); 347 exit(-1);
344 } 348 }
345 349
346 renderer->setDrawFilters(drawFilters, filtersName(drawFilters)); 350 renderer->setDrawFilters(drawFilters, filtersName(drawFilters));
347 if (FLAGS_logPerIter) { 351 if (FLAGS_logPerIter) {
348 benchmark->setTimerResultType(TimerData::kPerIter_Result); 352 benchmark->setTimerResultType(TimerData::kPerIter_Result);
349 } else if (FLAGS_min) { 353 } else if (FLAGS_min) {
350 benchmark->setTimerResultType(TimerData::kMin_Result); 354 benchmark->setTimerResultType(TimerData::kMin_Result);
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
438 } 442 }
439 #endif 443 #endif
440 return 0; 444 return 0;
441 } 445 }
442 446
443 #if !defined SK_BUILD_FOR_IOS 447 #if !defined SK_BUILD_FOR_IOS
444 int main(int argc, char * const argv[]) { 448 int main(int argc, char * const argv[]) {
445 return tool_main(argc, (char**) argv); 449 return tool_main(argc, (char**) argv);
446 } 450 }
447 #endif 451 #endif
OLDNEW
« no previous file with comments | « tools/PictureRenderer.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698