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

Side by Side Diff: bench/GrResourceCacheBench.cpp

Issue 1379853003: Fix for nexus 5 crashing in GL benches (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: tweaks Created 5 years, 2 months 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 | « bench/GeometryBench.cpp ('k') | bench/ImageFilterCollapse.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 /* 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
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
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
OLDNEW
« no previous file with comments | « bench/GeometryBench.cpp ('k') | bench/ImageFilterCollapse.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698