Chromium Code Reviews| OLD | NEW | 
|---|---|
| (Empty) | |
| 1 /* | |
| 2 * Copyright 2014 Google Inc. | |
| 3 * | |
| 4 * Use of this source code is governed by a BSD-style license that can be | |
| 5 * found in the LICENSE file. | |
| 6 */ | |
| 7 | |
| 8 #ifndef SkVertState_DEFINED | |
| 9 #define SkVertState_DEFINED | |
| 10 | |
| 11 #include "SkCanvas.h" | |
| 12 | |
| 13 struct VertState { | |
| 
 
bsalomon
2014/05/15 13:13:33
I think this class could use some documentation if
 
yunchao
2014/05/15 14:15:53
Agree. I will update the document for your reviewi
 
 | |
| 14 int f0, f1, f2; | |
| 15 | |
| 16 VertState(int vCount, const uint16_t indices[], int indexCount) | |
| 17 : fIndices(indices) { | |
| 18 fCurrIndex = 0; | |
| 19 if (indices) { | |
| 20 fCount = indexCount; | |
| 21 } else { | |
| 22 fCount = vCount; | |
| 23 } | |
| 24 } | |
| 25 | |
| 26 typedef bool (*Proc)(VertState*); | |
| 27 Proc chooseProc(SkCanvas::VertexMode mode); | |
| 28 | |
| 29 private: | |
| 30 int fCount; | |
| 31 int fCurrIndex; | |
| 32 const uint16_t* fIndices; | |
| 33 | |
| 34 static bool Triangles(VertState*); | |
| 35 static bool TrianglesX(VertState*); | |
| 36 static bool TriangleStrip(VertState*); | |
| 37 static bool TriangleStripX(VertState*); | |
| 38 static bool TriangleFan(VertState*); | |
| 39 static bool TriangleFanX(VertState*); | |
| 40 }; | |
| 41 | |
| 42 #endif | |
| OLD | NEW |