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

Side by Side Diff: src/gpu/batches/GrDrawVerticesBatch.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 | « src/gpu/batches/GrCopySurfaceBatch.cpp ('k') | src/gpu/batches/GrVertexBatch.h » ('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 "GrDrawVerticesBatch.h" 8 #include "GrDrawVerticesBatch.h"
9 9
10 #include "GrBatchFlushState.h" 10 #include "GrBatchFlushState.h"
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 int firstVertex; 127 int firstVertex;
128 128
129 void* verts = target->makeVertexSpace(vertexStride, this->vertexCount(), 129 void* verts = target->makeVertexSpace(vertexStride, this->vertexCount(),
130 &vertexBuffer, &firstVertex); 130 &vertexBuffer, &firstVertex);
131 131
132 if (!verts) { 132 if (!verts) {
133 SkDebugf("Could not allocate vertices\n"); 133 SkDebugf("Could not allocate vertices\n");
134 return; 134 return;
135 } 135 }
136 136
137 const GrIndexBuffer* indexBuffer = NULL; 137 const GrIndexBuffer* indexBuffer = nullptr;
138 int firstIndex = 0; 138 int firstIndex = 0;
139 139
140 uint16_t* indices = NULL; 140 uint16_t* indices = nullptr;
141 if (this->hasIndices()) { 141 if (this->hasIndices()) {
142 indices = target->makeIndexSpace(this->indexCount(), &indexBuffer, &firs tIndex); 142 indices = target->makeIndexSpace(this->indexCount(), &indexBuffer, &firs tIndex);
143 143
144 if (!indices) { 144 if (!indices) {
145 SkDebugf("Could not allocate indices\n"); 145 SkDebugf("Could not allocate indices\n");
146 return; 146 return;
147 } 147 }
148 } 148 }
149 149
150 int indexOffset = 0; 150 int indexOffset = 0;
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
340 geometry.fColor = GrRandomColor(random); 340 geometry.fColor = GrRandomColor(random);
341 return GrDrawVerticesBatch::Create(geometry, type, viewMatrix, 341 return GrDrawVerticesBatch::Create(geometry, type, viewMatrix,
342 positions.begin(), vertexCount, 342 positions.begin(), vertexCount,
343 indices.begin(), hasIndices ? vertexCount : 0, 343 indices.begin(), hasIndices ? vertexCount : 0,
344 colors.begin(), 344 colors.begin(),
345 texCoords.begin(), 345 texCoords.begin(),
346 bounds); 346 bounds);
347 } 347 }
348 348
349 #endif 349 #endif
OLDNEW
« no previous file with comments | « src/gpu/batches/GrCopySurfaceBatch.cpp ('k') | src/gpu/batches/GrVertexBatch.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698