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 16 matching lines...) Expand all Loading... |
27 SkTDArray<GrColor> fColors; | 27 SkTDArray<GrColor> fColors; |
28 SkTDArray<SkPoint> fLocalCoords; | 28 SkTDArray<SkPoint> fLocalCoords; |
29 }; | 29 }; |
30 | 30 |
31 static GrDrawBatch* Create(const Geometry& geometry, GrPrimitiveType primiti
veType, | 31 static GrDrawBatch* Create(const Geometry& geometry, GrPrimitiveType primiti
veType, |
32 const SkMatrix& viewMatrix, | 32 const SkMatrix& viewMatrix, |
33 const SkPoint* positions, int vertexCount, | 33 const SkPoint* positions, int vertexCount, |
34 const uint16_t* indices, int indexCount, | 34 const uint16_t* indices, int indexCount, |
35 const GrColor* colors, const SkPoint* localCoords
, | 35 const GrColor* colors, const SkPoint* localCoords
, |
36 const SkRect& bounds) { | 36 const SkRect& bounds) { |
37 return SkNEW_ARGS(GrDrawVerticesBatch, (geometry, primitiveType, viewMat
rix, positions, | 37 return new GrDrawVerticesBatch(geometry, primitiveType, viewMatrix, posi
tions, vertexCount, |
38 vertexCount, indices, indexCount
, colors, | 38 indices, indexCount, colors, localCoords,
bounds); |
39 localCoords, bounds)); | |
40 } | 39 } |
41 | 40 |
42 const char* name() const override { return "DrawVerticesBatch"; } | 41 const char* name() const override { return "DrawVerticesBatch"; } |
43 | 42 |
44 void getInvariantOutputColor(GrInitInvariantOutput* out) const override; | 43 void getInvariantOutputColor(GrInitInvariantOutput* out) const override; |
45 | 44 |
46 void getInvariantOutputCoverage(GrInitInvariantOutput* out) const override; | 45 void getInvariantOutputCoverage(GrInitInvariantOutput* out) const override; |
47 | 46 |
48 SkSTArray<1, Geometry, true>* geoData() { return &fGeoData; } | 47 SkSTArray<1, Geometry, true>* geoData() { return &fGeoData; } |
49 | 48 |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
88 bool fHasLocalCoords; | 87 bool fHasLocalCoords; |
89 int fVertexCount; | 88 int fVertexCount; |
90 int fIndexCount; | 89 int fIndexCount; |
91 }; | 90 }; |
92 | 91 |
93 BatchTracker fBatch; | 92 BatchTracker fBatch; |
94 SkSTArray<1, Geometry, true> fGeoData; | 93 SkSTArray<1, Geometry, true> fGeoData; |
95 }; | 94 }; |
96 | 95 |
97 #endif | 96 #endif |
OLD | NEW |