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

Side by Side Diff: src/core/SkVertState.h

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/core/SkVarAlloc.cpp ('k') | src/core/SkVertState.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 2014 Google Inc. 2 * Copyright 2014 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 #ifndef SkVertState_DEFINED 8 #ifndef SkVertState_DEFINED
9 #define SkVertState_DEFINED 9 #define SkVertState_DEFINED
10 10
11 #include "SkCanvas.h" 11 #include "SkCanvas.h"
12 12
13 /** \struct VertState 13 /** \struct VertState
14 This is a helper for drawVertices(). It is used to iterate over the triangle s 14 This is a helper for drawVertices(). It is used to iterate over the triangle s
15 that are to be rendered based on an SkCanvas::VertexMode and (optionally) an 15 that are to be rendered based on an SkCanvas::VertexMode and (optionally) an
16 index array. It does not copy the index array and the client must ensure it 16 index array. It does not copy the index array and the client must ensure it
17 remains valid for the lifetime of the VertState object. 17 remains valid for the lifetime of the VertState object.
18 */ 18 */
19 19
20 struct VertState { 20 struct VertState {
21 int f0, f1, f2; 21 int f0, f1, f2;
22 22
23 /** 23 /**
24 * Construct a VertState from a vertex count, index array, and index count. 24 * Construct a VertState from a vertex count, index array, and index count.
25 * If the vertices are unindexed pass NULL for indices. 25 * If the vertices are unindexed pass nullptr for indices.
26 */ 26 */
27 VertState(int vCount, const uint16_t indices[], int indexCount) 27 VertState(int vCount, const uint16_t indices[], int indexCount)
28 : fIndices(indices) { 28 : fIndices(indices) {
29 fCurrIndex = 0; 29 fCurrIndex = 0;
30 if (indices) { 30 if (indices) {
31 fCount = indexCount; 31 fCount = indexCount;
32 } else { 32 } else {
33 fCount = vCount; 33 fCount = vCount;
34 } 34 }
35 } 35 }
(...skipping 13 matching lines...) Expand all
49 49
50 static bool Triangles(VertState*); 50 static bool Triangles(VertState*);
51 static bool TrianglesX(VertState*); 51 static bool TrianglesX(VertState*);
52 static bool TriangleStrip(VertState*); 52 static bool TriangleStrip(VertState*);
53 static bool TriangleStripX(VertState*); 53 static bool TriangleStripX(VertState*);
54 static bool TriangleFan(VertState*); 54 static bool TriangleFan(VertState*);
55 static bool TriangleFanX(VertState*); 55 static bool TriangleFanX(VertState*);
56 }; 56 };
57 57
58 #endif 58 #endif
OLDNEW
« no previous file with comments | « src/core/SkVarAlloc.cpp ('k') | src/core/SkVertState.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698