OLD | NEW |
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 455 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 && SK_SUPPORT_GPU | 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 benchmark.renderer()->getGrContext()->printGpuStats(); |
477 SkDebugf("RenderTarget Binds: %d\n", ctx->gpuStats()->renderTargetBinds(
)); | |
478 SkDebugf("Shader Compilations: %d\n", ctx->gpuStats()->shaderCompilation
s()); | |
479 } | 477 } |
480 #endif | 478 #endif |
481 | 479 |
482 gWriter.end(); | 480 gWriter.end(); |
483 return 0; | 481 return 0; |
484 } | 482 } |
485 | 483 |
486 #if !defined SK_BUILD_FOR_IOS | 484 #if !defined SK_BUILD_FOR_IOS |
487 int main(int argc, char * const argv[]) { | 485 int main(int argc, char * const argv[]) { |
488 return tool_main(argc, (char**) argv); | 486 return tool_main(argc, (char**) argv); |
489 } | 487 } |
490 #endif | 488 #endif |
OLD | NEW |