| 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 |
| 11 #include "GrColor.h" | 11 #include "GrColor.h" |
| 12 #include "GrTypes.h" | 12 #include "GrTypes.h" |
| 13 #include "GrVertexBatch.h" | 13 #include "GrVertexBatch.h" |
| 14 #include "SkMatrix.h" | 14 #include "SkMatrix.h" |
| 15 #include "SkRect.h" | 15 #include "SkRect.h" |
| 16 #include "SkTDArray.h" | 16 #include "SkTDArray.h" |
| 17 | 17 |
| 18 class GrBatchFlushState; | 18 class GrBatchFlushState; |
| 19 struct GrInitInvariantOutput; | 19 struct GrInitInvariantOutput; |
| 20 | 20 |
| 21 class GrDrawVerticesBatch : public GrVertexBatch { | 21 class GrDrawVerticesBatch : public GrVertexBatch { |
| 22 public: | 22 public: |
| 23 DEFINE_BATCH_CLASS_ID |
| 24 |
| 23 struct Geometry { | 25 struct Geometry { |
| 24 GrColor fColor; | 26 GrColor fColor; |
| 25 SkTDArray<SkPoint> fPositions; | 27 SkTDArray<SkPoint> fPositions; |
| 26 SkTDArray<uint16_t> fIndices; | 28 SkTDArray<uint16_t> fIndices; |
| 27 SkTDArray<GrColor> fColors; | 29 SkTDArray<GrColor> fColors; |
| 28 SkTDArray<SkPoint> fLocalCoords; | 30 SkTDArray<SkPoint> fLocalCoords; |
| 29 }; | 31 }; |
| 30 | 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, |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 84 bool fCoverageIgnored; | 86 bool fCoverageIgnored; |
| 85 bool fHasColors; | 87 bool fHasColors; |
| 86 bool fHasIndices; | 88 bool fHasIndices; |
| 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; |
| 96 |
| 97 typedef GrVertexBatch INHERITED; |
| 94 }; | 98 }; |
| 95 | 99 |
| 96 #endif | 100 #endif |
| OLD | NEW |