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

Side by Side Diff: tools/bench_pictures_main.cpp

Issue 655263005: Build gpu stats tracking in dev builds. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: clean up macro usage in render_pictures Created 6 years, 1 month 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 | « src/gpu/GrResourceCache.cpp ('k') | tools/render_pictures_main.cpp » ('j') | 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 "BenchLogger.h" 8 #include "BenchLogger.h"
9 #include "Timer.h" 9 #include "Timer.h"
10 #include "CopyTilesRenderer.h" 10 #include "CopyTilesRenderer.h"
(...skipping 453 matching lines...) Expand 10 before | Expand all | Expand 10 after
464 gLogger.logError(err); 464 gLogger.logError(err);
465 return 1; 465 return 1;
466 } 466 }
467 #if SK_LAZY_CACHE_STATS 467 #if SK_LAZY_CACHE_STATS
468 if (FLAGS_trackDeferredCaching) { 468 if (FLAGS_trackDeferredCaching) {
469 SkDebugf("Total cache hit rate: %f\n", 469 SkDebugf("Total cache hit rate: %f\n",
470 (double) gTotalCacheHits / (gTotalCacheHits + gTotalCacheMisses )); 470 (double) gTotalCacheHits / (gTotalCacheHits + gTotalCacheMisses ));
471 } 471 }
472 #endif 472 #endif
473 473
474 #if GR_GPU_STATS 474 #if GR_GPU_STATS && SK_SUPPORT_GPU
475 if (FLAGS_gpuStats && benchmark.renderer()->isUsingGpuDevice()) { 475 if (FLAGS_gpuStats && benchmark.renderer()->isUsingGpuDevice()) {
476 GrContext* ctx = benchmark.renderer()->getGrContext(); 476 GrContext* ctx = benchmark.renderer()->getGrContext();
477 SkDebugf("RenderTarget Binds: %d\n", ctx->gpuStats()->renderTargetBinds( )); 477 SkDebugf("RenderTarget Binds: %d\n", ctx->gpuStats()->renderTargetBinds( ));
478 SkDebugf("Shader Compilations: %d\n", ctx->gpuStats()->shaderCompilation s()); 478 SkDebugf("Shader Compilations: %d\n", ctx->gpuStats()->shaderCompilation s());
479 } 479 }
480 #endif 480 #endif
481 481
482 gWriter.end(); 482 gWriter.end();
483 return 0; 483 return 0;
484 } 484 }
485 485
486 #if !defined SK_BUILD_FOR_IOS 486 #if !defined SK_BUILD_FOR_IOS
487 int main(int argc, char * const argv[]) { 487 int main(int argc, char * const argv[]) {
488 return tool_main(argc, (char**) argv); 488 return tool_main(argc, (char**) argv);
489 } 489 }
490 #endif 490 #endif
OLDNEW
« no previous file with comments | « src/gpu/GrResourceCache.cpp ('k') | tools/render_pictures_main.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698