| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2011 Google Inc. | 2 * Copyright 2011 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 "ResultsWriter.h" | 9 #include "ResultsWriter.h" |
| 10 #include "SkBenchLogger.h" | 10 #include "SkBenchLogger.h" |
| (...skipping 415 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 426 if (SkBenchmark::kGPU_Backend != config.backend) { | 426 if (SkBenchmark::kGPU_Backend != config.backend) { |
| 427 continue; | 427 continue; |
| 428 } | 428 } |
| 429 GrContext* context = gContextFactory.get(config.contextType); | 429 GrContext* context = gContextFactory.get(config.contextType); |
| 430 if (NULL == context) { | 430 if (NULL == context) { |
| 431 continue; | 431 continue; |
| 432 } | 432 } |
| 433 | 433 |
| 434 size_t bytes; | 434 size_t bytes; |
| 435 int count; | 435 int count; |
| 436 context->getTextureCacheLimits(&count, &bytes); | 436 context->getResourceCacheLimits(&count, &bytes); |
| 437 if (-1 != FLAGS_gpuCacheBytes) { | 437 if (-1 != FLAGS_gpuCacheBytes) { |
| 438 bytes = static_cast<size_t>(FLAGS_gpuCacheBytes); | 438 bytes = static_cast<size_t>(FLAGS_gpuCacheBytes); |
| 439 } | 439 } |
| 440 if (-1 != FLAGS_gpuCacheCount) { | 440 if (-1 != FLAGS_gpuCacheCount) { |
| 441 count = FLAGS_gpuCacheCount; | 441 count = FLAGS_gpuCacheCount; |
| 442 } | 442 } |
| 443 context->setTextureCacheLimits(count, bytes); | 443 context->setResourceCacheLimits(count, bytes); |
| 444 #endif | 444 #endif |
| 445 } | 445 } |
| 446 | 446 |
| 447 // Run each bench in each configuration it supports and we asked for. | 447 // Run each bench in each configuration it supports and we asked for. |
| 448 Iter iter; | 448 Iter iter; |
| 449 SkBenchmark* bench; | 449 SkBenchmark* bench; |
| 450 while ((bench = iter.next()) != NULL) { | 450 while ((bench = iter.next()) != NULL) { |
| 451 SkAutoTUnref<SkBenchmark> benchUnref(bench); | 451 SkAutoTUnref<SkBenchmark> benchUnref(bench); |
| 452 if (SkCommandLineFlags::ShouldSkip(FLAGS_match, bench->getName())) { | 452 if (SkCommandLineFlags::ShouldSkip(FLAGS_match, bench->getName())) { |
| 453 continue; | 453 continue; |
| (...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 698 gContextFactory.destroyContexts(); | 698 gContextFactory.destroyContexts(); |
| 699 #endif | 699 #endif |
| 700 return 0; | 700 return 0; |
| 701 } | 701 } |
| 702 | 702 |
| 703 #if !defined(SK_BUILD_FOR_IOS) && !defined(SK_BUILD_FOR_NACL) | 703 #if !defined(SK_BUILD_FOR_IOS) && !defined(SK_BUILD_FOR_NACL) |
| 704 int main(int argc, char * const argv[]) { | 704 int main(int argc, char * const argv[]) { |
| 705 return tool_main(argc, (char**) argv); | 705 return tool_main(argc, (char**) argv); |
| 706 } | 706 } |
| 707 #endif | 707 #endif |
| OLD | NEW |