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 24 matching lines...) Expand all Loading... |
35 const SkPoint* positions, int vertexCount, | 35 const SkPoint* positions, int vertexCount, |
36 const uint16_t* indices, int indexCount, | 36 const uint16_t* indices, int indexCount, |
37 const GrColor* colors, const SkPoint* localCoords
, | 37 const GrColor* colors, const SkPoint* localCoords
, |
38 const SkRect& bounds) { | 38 const SkRect& bounds) { |
39 return new GrDrawVerticesBatch(geometry, primitiveType, viewMatrix, posi
tions, vertexCount, | 39 return new GrDrawVerticesBatch(geometry, primitiveType, viewMatrix, posi
tions, vertexCount, |
40 indices, indexCount, colors, localCoords,
bounds); | 40 indices, indexCount, colors, localCoords,
bounds); |
41 } | 41 } |
42 | 42 |
43 const char* name() const override { return "DrawVerticesBatch"; } | 43 const char* name() const override { return "DrawVerticesBatch"; } |
44 | 44 |
45 void computePipelineOptimizations(GrInitInvariantOutput* color, | 45 void computePipelineOptimizations(GrInitInvariantOutput* color, |
46 GrInitInvariantOutput* coverage, | 46 GrInitInvariantOutput* coverage, |
47 GrBatchToXPOverrides* overrides) const ove
rride; | 47 GrBatchToXPOverrides* overrides) const ove
rride; |
48 | 48 |
49 SkSTArray<1, Geometry, true>* geoData() { return &fGeoData; } | 49 SkSTArray<1, Geometry, true>* geoData() { return &fGeoData; } |
50 | 50 |
51 private: | 51 private: |
52 void onPrepareDraws(Target*) const override; | 52 void onPrepareDraws(Target*) const override; |
53 void initBatchTracker(const GrXPOverridesForBatch&) override; | 53 void initBatchTracker(const GrXPOverridesForBatch&) override; |
54 | 54 |
55 GrDrawVerticesBatch(const Geometry& geometry, GrPrimitiveType primitiveType, | 55 GrDrawVerticesBatch(const Geometry& geometry, GrPrimitiveType primitiveType, |
(...skipping 17 matching lines...) Expand all Loading... |
73 int fVertexCount; | 73 int fVertexCount; |
74 int fIndexCount; | 74 int fIndexCount; |
75 bool fCoverageIgnored; // comes from initBatchTracker. | 75 bool fCoverageIgnored; // comes from initBatchTracker. |
76 | 76 |
77 SkSTArray<1, Geometry, true> fGeoData; | 77 SkSTArray<1, Geometry, true> fGeoData; |
78 | 78 |
79 typedef GrVertexBatch INHERITED; | 79 typedef GrVertexBatch INHERITED; |
80 }; | 80 }; |
81 | 81 |
82 #endif | 82 #endif |
OLD | NEW |