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 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
104 GrColor fOverrideColor; | 104 GrColor fOverrideColor; |
105 bool fUsesLocalCoords; | 105 bool fUsesLocalCoords; |
106 }; | 106 }; |
107 | 107 |
108 virtual void initBatchTracker(GrBatchTracker*, const InitBT&) const = 0; | 108 virtual void initBatchTracker(GrBatchTracker*, const InitBT&) const = 0; |
109 | 109 |
110 virtual bool canMakeEqual(const GrBatchTracker& mine, | 110 virtual bool canMakeEqual(const GrBatchTracker& mine, |
111 const GrPrimitiveProcessor& that, | 111 const GrPrimitiveProcessor& that, |
112 const GrBatchTracker& theirs) const = 0; | 112 const GrBatchTracker& theirs) const = 0; |
113 | 113 |
114 /* | |
115 * We always call canMakeEqual before makeEqual so there is no need to do an
y kind of equality | |
116 * testing here | |
117 * TODO make this pure virtual when primProcs can actually use it | |
118 */ | |
119 virtual void makeEqual(GrBatchTracker*, const GrBatchTracker&) const {} | |
120 | |
121 virtual void getInvariantOutputColor(GrInitInvariantOutput* out) const = 0; | 114 virtual void getInvariantOutputColor(GrInitInvariantOutput* out) const = 0; |
122 virtual void getInvariantOutputCoverage(GrInitInvariantOutput* out) const =
0; | 115 virtual void getInvariantOutputCoverage(GrInitInvariantOutput* out) const =
0; |
123 | 116 |
124 // Only the GrGeometryProcessor subclass actually has a geo shader or vertex
attributes, but | 117 // Only the GrGeometryProcessor subclass actually has a geo shader or vertex
attributes, but |
125 // we put these calls on the base class to prevent having to cast | 118 // we put these calls on the base class to prevent having to cast |
126 virtual bool willUseGeoShader() const = 0; | 119 virtual bool willUseGeoShader() const = 0; |
127 | 120 |
128 /* | 121 /* |
129 * This is a safeguard to prevent GrPrimitiveProcessor's from going beyond p
latform specific | 122 * This is a safeguard to prevent GrPrimitiveProcessor's from going beyond p
latform specific |
130 * attribute limits. This number can almost certainly be raised if required. | 123 * attribute limits. This number can almost certainly be raised if required. |
(...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
407 | 400 |
408 private: | 401 private: |
409 bool hasExplicitLocalCoords() const SK_OVERRIDE { return false; } | 402 bool hasExplicitLocalCoords() const SK_OVERRIDE { return false; } |
410 | 403 |
411 GrColor fColor; | 404 GrColor fColor; |
412 | 405 |
413 typedef GrPrimitiveProcessor INHERITED; | 406 typedef GrPrimitiveProcessor INHERITED; |
414 }; | 407 }; |
415 | 408 |
416 #endif | 409 #endif |
OLD | NEW |