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 453 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 |
OLD | NEW |