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

Side by Side Diff: bench/GLInstancedArraysBench.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/GLBench.cpp ('k') | bench/GLVec4ScalarBench.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 2015 Google Inc. 2 * Copyright 2015 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 "Benchmark.h" 8 #include "Benchmark.h"
9 #include "SkCanvas.h" 9 #include "SkCanvas.h"
10 #include "SkImageEncoder.h" 10 #include "SkImageEncoder.h"
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
165 m.setScale(0.0001f, 0.0001f); 165 m.setScale(0.0001f, 0.0001f);
166 f(m); 166 f(m);
167 } 167 }
168 } 168 }
169 169
170 //////////////////////////////////////////////////////////////////////////////// /////////////////// 170 //////////////////////////////////////////////////////////////////////////////// ///////////////////
171 171
172 const GrGLContext* GLCpuPosInstancedArraysBench::onGetGLContext(const GrGLContex t* ctx) { 172 const GrGLContext* GLCpuPosInstancedArraysBench::onGetGLContext(const GrGLContex t* ctx) {
173 // We only care about gpus with drawArraysInstanced support 173 // We only care about gpus with drawArraysInstanced support
174 if (!ctx->interface()->fFunctions.fDrawArraysInstanced) { 174 if (!ctx->interface()->fFunctions.fDrawArraysInstanced) {
175 return NULL; 175 return nullptr;
176 } 176 }
177 return ctx; 177 return ctx;
178 } 178 }
179 179
180 void GLCpuPosInstancedArraysBench::setupInstanceVbo(const GrGLInterface* gl, 180 void GLCpuPosInstancedArraysBench::setupInstanceVbo(const GrGLInterface* gl,
181 const SkMatrix* viewMatrices ) { 181 const SkMatrix* viewMatrices ) {
182 // We draw all of the instances at a single place because we aren't allowed to have per vertex 182 // We draw all of the instances at a single place because we aren't allowed to have per vertex
183 // per instance attributes 183 // per instance attributes
184 SkPoint positions[kVerticesPerTri]; 184 SkPoint positions[kVerticesPerTri];
185 positions[0].set(-1.0f, -1.0f); 185 positions[0].set(-1.0f, -1.0f);
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after
388 DEF_BENCH( return new GLCpuPosInstancedArraysBench(GLCpuPosInstancedArraysBench: :kUseOne_VboSetup, 1) ) 388 DEF_BENCH( return new GLCpuPosInstancedArraysBench(GLCpuPosInstancedArraysBench: :kUseOne_VboSetup, 1) )
389 DEF_BENCH( return new GLCpuPosInstancedArraysBench(GLCpuPosInstancedArraysBench: :kUseTwo_VboSetup, 1) ) 389 DEF_BENCH( return new GLCpuPosInstancedArraysBench(GLCpuPosInstancedArraysBench: :kUseTwo_VboSetup, 1) )
390 DEF_BENCH( return new GLCpuPosInstancedArraysBench(GLCpuPosInstancedArraysBench: :kUseOne_VboSetup, 2) ) 390 DEF_BENCH( return new GLCpuPosInstancedArraysBench(GLCpuPosInstancedArraysBench: :kUseOne_VboSetup, 2) )
391 DEF_BENCH( return new GLCpuPosInstancedArraysBench(GLCpuPosInstancedArraysBench: :kUseTwo_VboSetup, 2) ) 391 DEF_BENCH( return new GLCpuPosInstancedArraysBench(GLCpuPosInstancedArraysBench: :kUseTwo_VboSetup, 2) )
392 DEF_BENCH( return new GLCpuPosInstancedArraysBench(GLCpuPosInstancedArraysBench: :kUseOne_VboSetup, 4) ) 392 DEF_BENCH( return new GLCpuPosInstancedArraysBench(GLCpuPosInstancedArraysBench: :kUseOne_VboSetup, 4) )
393 DEF_BENCH( return new GLCpuPosInstancedArraysBench(GLCpuPosInstancedArraysBench: :kUseTwo_VboSetup, 4) ) 393 DEF_BENCH( return new GLCpuPosInstancedArraysBench(GLCpuPosInstancedArraysBench: :kUseTwo_VboSetup, 4) )
394 DEF_BENCH( return new GLCpuPosInstancedArraysBench(GLCpuPosInstancedArraysBench: :kUseOne_VboSetup, 8) ) 394 DEF_BENCH( return new GLCpuPosInstancedArraysBench(GLCpuPosInstancedArraysBench: :kUseOne_VboSetup, 8) )
395 DEF_BENCH( return new GLCpuPosInstancedArraysBench(GLCpuPosInstancedArraysBench: :kUseTwo_VboSetup, 8) ) 395 DEF_BENCH( return new GLCpuPosInstancedArraysBench(GLCpuPosInstancedArraysBench: :kUseTwo_VboSetup, 8) )
396 396
397 #endif 397 #endif
OLDNEW
« no previous file with comments | « bench/GLBench.cpp ('k') | bench/GLVec4ScalarBench.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698