| OLD | NEW |
| 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 #ifndef GrDrawVerticesBatch_DEFINED | 8 #ifndef GrDrawVerticesBatch_DEFINED |
| 9 #define GrDrawVerticesBatch_DEFINED | 9 #define GrDrawVerticesBatch_DEFINED |
| 10 | 10 |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 class GrDrawVerticesBatch : public GrVertexBatch { | 21 class GrDrawVerticesBatch : public GrVertexBatch { |
| 22 public: | 22 public: |
| 23 struct Geometry { | 23 struct Geometry { |
| 24 GrColor fColor; | 24 GrColor fColor; |
| 25 SkTDArray<SkPoint> fPositions; | 25 SkTDArray<SkPoint> fPositions; |
| 26 SkTDArray<uint16_t> fIndices; | 26 SkTDArray<uint16_t> fIndices; |
| 27 SkTDArray<GrColor> fColors; | 27 SkTDArray<GrColor> fColors; |
| 28 SkTDArray<SkPoint> fLocalCoords; | 28 SkTDArray<SkPoint> fLocalCoords; |
| 29 }; | 29 }; |
| 30 | 30 |
| 31 BATCH_CLASS_ID |
| 32 |
| 31 static GrDrawBatch* Create(const Geometry& geometry, GrPrimitiveType primiti
veType, | 33 static GrDrawBatch* Create(const Geometry& geometry, GrPrimitiveType primiti
veType, |
| 32 const SkMatrix& viewMatrix, | 34 const SkMatrix& viewMatrix, |
| 33 const SkPoint* positions, int vertexCount, | 35 const SkPoint* positions, int vertexCount, |
| 34 const uint16_t* indices, int indexCount, | 36 const uint16_t* indices, int indexCount, |
| 35 const GrColor* colors, const SkPoint* localCoords
, | 37 const GrColor* colors, const SkPoint* localCoords
, |
| 36 const SkRect& bounds) { | 38 const SkRect& bounds) { |
| 37 return new GrDrawVerticesBatch(geometry, primitiveType, viewMatrix, posi
tions, vertexCount, | 39 return new GrDrawVerticesBatch(geometry, primitiveType, viewMatrix, posi
tions, vertexCount, |
| 38 indices, indexCount, colors, localCoords,
bounds); | 40 indices, indexCount, colors, localCoords,
bounds); |
| 39 } | 41 } |
| 40 | 42 |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 87 bool fHasLocalCoords; | 89 bool fHasLocalCoords; |
| 88 int fVertexCount; | 90 int fVertexCount; |
| 89 int fIndexCount; | 91 int fIndexCount; |
| 90 }; | 92 }; |
| 91 | 93 |
| 92 BatchTracker fBatch; | 94 BatchTracker fBatch; |
| 93 SkSTArray<1, Geometry, true> fGeoData; | 95 SkSTArray<1, Geometry, true> fGeoData; |
| 94 }; | 96 }; |
| 95 | 97 |
| 96 #endif | 98 #endif |
| OLD | NEW |