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

Side by Side Diff: bench/GrMemoryPoolBench.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/GeometryBench.cpp ('k') | bench/GrResourceCacheBench.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 * 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 "SkTypes.h" 8 #include "SkTypes.h"
9 9
10 // This tests a Gr class 10 // This tests a Gr class
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 107
108 void onDraw(const int loops, SkCanvas*) override { 108 void onDraw(const int loops, SkCanvas*) override {
109 SkRandom r; 109 SkRandom r;
110 enum { 110 enum {
111 kMaxObjects = 4 * (1 << 10), 111 kMaxObjects = 4 * (1 << 10),
112 }; 112 };
113 SkAutoTDelete<B> objects[kMaxObjects]; 113 SkAutoTDelete<B> objects[kMaxObjects];
114 114
115 for (int i = 0; i < loops; i++) { 115 for (int i = 0; i < loops; i++) {
116 uint32_t idx = r.nextRangeU(0, kMaxObjects-1); 116 uint32_t idx = r.nextRangeU(0, kMaxObjects-1);
117 if (NULL == objects[idx].get()) { 117 if (nullptr == objects[idx].get()) {
118 objects[idx].reset(new B); 118 objects[idx].reset(new B);
119 } else { 119 } else {
120 objects[idx].free(); 120 objects[idx].free();
121 } 121 }
122 } 122 }
123 } 123 }
124 124
125 private: 125 private:
126 typedef Benchmark INHERITED; 126 typedef Benchmark INHERITED;
127 }; 127 };
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 typedef Benchmark INHERITED; 171 typedef Benchmark INHERITED;
172 }; 172 };
173 173
174 /////////////////////////////////////////////////////////////////////////////// 174 ///////////////////////////////////////////////////////////////////////////////
175 175
176 DEF_BENCH( return new GrMemoryPoolBenchStack(); ) 176 DEF_BENCH( return new GrMemoryPoolBenchStack(); )
177 DEF_BENCH( return new GrMemoryPoolBenchRandom(); ) 177 DEF_BENCH( return new GrMemoryPoolBenchRandom(); )
178 DEF_BENCH( return new GrMemoryPoolBenchQueue(); ) 178 DEF_BENCH( return new GrMemoryPoolBenchQueue(); )
179 179
180 #endif 180 #endif
OLDNEW
« no previous file with comments | « bench/GeometryBench.cpp ('k') | bench/GrResourceCacheBench.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698