| OLD | NEW |
| 1 | 1 |
| 2 /* | 2 /* |
| 3 * Copyright 2013 Google Inc. | 3 * Copyright 2013 Google Inc. |
| 4 * | 4 * |
| 5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
| 6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
| 7 */ | 7 */ |
| 8 | 8 |
| 9 #include "Benchmark.h" | 9 #include "Benchmark.h" |
| 10 | 10 |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 108 } | 108 } |
| 109 | 109 |
| 110 bool isSuitableFor(Backend backend) override { | 110 bool isSuitableFor(Backend backend) override { |
| 111 return backend == kNonRendering_Backend; | 111 return backend == kNonRendering_Backend; |
| 112 } | 112 } |
| 113 protected: | 113 protected: |
| 114 const char* onGetName() override { | 114 const char* onGetName() override { |
| 115 return fFullName.c_str(); | 115 return fFullName.c_str(); |
| 116 } | 116 } |
| 117 | 117 |
| 118 void onPreDraw() override { | 118 void onDelayedSetup() override { |
| 119 fContext.reset(GrContext::CreateMockContext()); | 119 fContext.reset(GrContext::CreateMockContext()); |
| 120 if (!fContext) { | 120 if (!fContext) { |
| 121 return; | 121 return; |
| 122 } | 122 } |
| 123 // Set the cache budget to be very large so no purging occurs. | 123 // Set the cache budget to be very large so no purging occurs. |
| 124 fContext->setResourceCacheLimits(CACHE_SIZE_COUNT, 1 << 30); | 124 fContext->setResourceCacheLimits(CACHE_SIZE_COUNT, 1 << 30); |
| 125 | 125 |
| 126 GrResourceCache* cache = fContext->getResourceCache(); | 126 GrResourceCache* cache = fContext->getResourceCache(); |
| 127 | 127 |
| 128 // Make sure the cache is empty. | 128 // Make sure the cache is empty. |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 178 DEF_BENCH( return new GrResourceCacheBenchFind(4); ) | 178 DEF_BENCH( return new GrResourceCacheBenchFind(4); ) |
| 179 DEF_BENCH( return new GrResourceCacheBenchFind(5); ) | 179 DEF_BENCH( return new GrResourceCacheBenchFind(5); ) |
| 180 DEF_BENCH( return new GrResourceCacheBenchFind(10); ) | 180 DEF_BENCH( return new GrResourceCacheBenchFind(10); ) |
| 181 DEF_BENCH( return new GrResourceCacheBenchFind(25); ) | 181 DEF_BENCH( return new GrResourceCacheBenchFind(25); ) |
| 182 DEF_BENCH( return new GrResourceCacheBenchFind(54); ) | 182 DEF_BENCH( return new GrResourceCacheBenchFind(54); ) |
| 183 DEF_BENCH( return new GrResourceCacheBenchFind(55); ) | 183 DEF_BENCH( return new GrResourceCacheBenchFind(55); ) |
| 184 DEF_BENCH( return new GrResourceCacheBenchFind(56); ) | 184 DEF_BENCH( return new GrResourceCacheBenchFind(56); ) |
| 185 #endif | 185 #endif |
| 186 | 186 |
| 187 #endif | 187 #endif |
| OLD | NEW |