Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2)

Side by Side Diff: src/gpu/batches/GrDrawVerticesBatch.h

Issue 1345393003: Revert of add a ClassID function to GrBatch (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/gpu/batches/GrDrawPathBatch.cpp ('k') | src/gpu/batches/GrDrawVerticesBatch.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
25 struct Geometry { 23 struct Geometry {
26 GrColor fColor; 24 GrColor fColor;
27 SkTDArray<SkPoint> fPositions; 25 SkTDArray<SkPoint> fPositions;
28 SkTDArray<uint16_t> fIndices; 26 SkTDArray<uint16_t> fIndices;
29 SkTDArray<GrColor> fColors; 27 SkTDArray<GrColor> fColors;
30 SkTDArray<SkPoint> fLocalCoords; 28 SkTDArray<SkPoint> fLocalCoords;
31 }; 29 };
32 30
33 static GrDrawBatch* Create(const Geometry& geometry, GrPrimitiveType primiti veType, 31 static GrDrawBatch* Create(const Geometry& geometry, GrPrimitiveType primiti veType,
34 const SkMatrix& viewMatrix, 32 const SkMatrix& viewMatrix,
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
86 bool fCoverageIgnored; 84 bool fCoverageIgnored;
87 bool fHasColors; 85 bool fHasColors;
88 bool fHasIndices; 86 bool fHasIndices;
89 bool fHasLocalCoords; 87 bool fHasLocalCoords;
90 int fVertexCount; 88 int fVertexCount;
91 int fIndexCount; 89 int fIndexCount;
92 }; 90 };
93 91
94 BatchTracker fBatch; 92 BatchTracker fBatch;
95 SkSTArray<1, Geometry, true> fGeoData; 93 SkSTArray<1, Geometry, true> fGeoData;
96
97 typedef GrVertexBatch INHERITED;
98 }; 94 };
99 95
100 #endif 96 #endif
OLDNEW
« no previous file with comments | « src/gpu/batches/GrDrawPathBatch.cpp ('k') | src/gpu/batches/GrDrawVerticesBatch.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698