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

Side by Side Diff: bench/GrResourceCacheBench.cpp

Issue 1316233002: Style Change: NULL->nullptr (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 2015-08-27 (Thursday) 10:25:06 EDT Created 5 years, 3 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/GrMemoryPoolBench.cpp ('k') | bench/GradientBench.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 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 bool isSuitableFor(Backend backend) override { 64 bool isSuitableFor(Backend backend) override {
65 return backend == kNonRendering_Backend; 65 return backend == kNonRendering_Backend;
66 } 66 }
67 protected: 67 protected:
68 const char* onGetName() override { 68 const char* onGetName() override {
69 return fFullName.c_str(); 69 return fFullName.c_str();
70 } 70 }
71 71
72 void onDraw(const int loops, SkCanvas* canvas) override { 72 void onDraw(const int loops, SkCanvas* canvas) override {
73 SkAutoTUnref<GrContext> context(GrContext::CreateMockContext()); 73 SkAutoTUnref<GrContext> context(GrContext::CreateMockContext());
74 if (NULL == context) { 74 if (nullptr == context) {
75 return; 75 return;
76 } 76 }
77 // Set the cache budget to be very large so no purging occurs. 77 // Set the cache budget to be very large so no purging occurs.
78 context->setResourceCacheLimits(CACHE_SIZE_COUNT, 1 << 30); 78 context->setResourceCacheLimits(CACHE_SIZE_COUNT, 1 << 30);
79 79
80 GrResourceCache* cache = context->getResourceCache(); 80 GrResourceCache* cache = context->getResourceCache();
81 81
82 // Make sure the cache is empty. 82 // Make sure the cache is empty.
83 cache->purgeAllUnlocked(); 83 cache->purgeAllUnlocked();
84 SkASSERT(0 == cache->getResourceCount() && 0 == cache->getResourceBytes( )); 84 SkASSERT(0 == cache->getResourceCount() && 0 == cache->getResourceBytes( ));
(...skipping 93 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/GrMemoryPoolBench.cpp ('k') | bench/GradientBench.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698