OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2013 Google Inc. | 2 * Copyright 2013 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 GrGeometryProcessor_DEFINED | 8 #ifndef GrGeometryProcessor_DEFINED |
9 #define GrGeometryProcessor_DEFINED | 9 #define GrGeometryProcessor_DEFINED |
10 | 10 |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
55 : fVertexStride(0) | 55 : fVertexStride(0) |
56 , fColor(color) | 56 , fColor(color) |
57 , fCoverage(coverage) | 57 , fCoverage(coverage) |
58 , fWillUseGeoShader(false) | 58 , fWillUseGeoShader(false) |
59 , fHasVertexColor(false) | 59 , fHasVertexColor(false) |
60 , fHasVertexCoverage(false) | 60 , fHasVertexCoverage(false) |
61 , fHasLocalCoords(false) {} | 61 , fHasLocalCoords(false) {} |
62 | 62 |
63 virtual const char* name() const = 0; | 63 virtual const char* name() const = 0; |
64 | 64 |
65 /** | 65 /** Implemented using GLProcessor::GenKey as described in this class's comme
nt. */ |
66 * Sets a unique key on the GrProcessorKeyBuilder that is directly associate
d with this geometry | |
67 * processor's GL backend implementation. | |
68 */ | |
69 virtual void getGLProcessorKey(const GrBatchTracker& bt, | 66 virtual void getGLProcessorKey(const GrBatchTracker& bt, |
70 const GrGLCaps& caps, | 67 const GrGLCaps& caps, |
71 GrProcessorKeyBuilder* b) const = 0; | 68 GrProcessorKeyBuilder* b) const = 0; |
72 | 69 |
73 | 70 |
74 /** Returns a new instance of the appropriate *GL* implementation class | 71 /** Returns a new instance of the appropriate *GL* implementation class |
75 for the given GrProcessor; caller is responsible for deleting | 72 for the given GrProcessor; caller is responsible for deleting |
76 the object. */ | 73 the object. */ |
77 virtual GrGLGeometryProcessor* createGLInstance(const GrBatchTracker& bt) co
nst = 0; | 74 virtual GrGLGeometryProcessor* createGLInstance(const GrBatchTracker& bt) co
nst = 0; |
78 | 75 |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
171 GrColor fColor; | 168 GrColor fColor; |
172 uint8_t fCoverage; | 169 uint8_t fCoverage; |
173 bool fWillUseGeoShader; | 170 bool fWillUseGeoShader; |
174 bool fHasVertexColor; | 171 bool fHasVertexColor; |
175 bool fHasVertexCoverage; | 172 bool fHasVertexCoverage; |
176 bool fHasLocalCoords; | 173 bool fHasLocalCoords; |
177 | 174 |
178 typedef GrProcessor INHERITED; | 175 typedef GrProcessor INHERITED; |
179 }; | 176 }; |
180 #endif | 177 #endif |
OLD | NEW |