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

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: More clean up 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
« src/gpu/GrContext.cpp ('K') | « 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 textures after each iteration "
45 "(only makes sense with --deferImageDecoding).");
bsalomon 2013/12/18 14:51:36 I don't totally follow why this only makes sense w
robertphillips 2013/12/18 15:59:13 Done. You're right, if we allow it anytime we can
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 if (FLAGS_purgeDecodedTex) {
344 if (!FLAGS_deferImageDecoding) {
345 gLogger.logError("--purgeDecodedTex doesn't make sense "
346 "without --deferImageDecoding.\n");
347 exit(-1);
348 }
349
350 benchmark->setPurgeDecodedTex(true);
351 }
352
341 if (FLAGS_readPath.count() < 1) { 353 if (FLAGS_readPath.count() < 1) {
342 gLogger.logError(".skp files or directories are required.\n"); 354 gLogger.logError(".skp files or directories are required.\n");
343 exit(-1); 355 exit(-1);
344 } 356 }
345 357
346 renderer->setDrawFilters(drawFilters, filtersName(drawFilters)); 358 renderer->setDrawFilters(drawFilters, filtersName(drawFilters));
347 if (FLAGS_logPerIter) { 359 if (FLAGS_logPerIter) {
348 benchmark->setTimerResultType(TimerData::kPerIter_Result); 360 benchmark->setTimerResultType(TimerData::kPerIter_Result);
349 } else if (FLAGS_min) { 361 } else if (FLAGS_min) {
350 benchmark->setTimerResultType(TimerData::kMin_Result); 362 benchmark->setTimerResultType(TimerData::kMin_Result);
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
438 } 450 }
439 #endif 451 #endif
440 return 0; 452 return 0;
441 } 453 }
442 454
443 #if !defined SK_BUILD_FOR_IOS 455 #if !defined SK_BUILD_FOR_IOS
444 int main(int argc, char * const argv[]) { 456 int main(int argc, char * const argv[]) {
445 return tool_main(argc, (char**) argv); 457 return tool_main(argc, (char**) argv);
446 } 458 }
447 #endif 459 #endif
OLDNEW
« src/gpu/GrContext.cpp ('K') | « tools/PictureRenderer.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698