| 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 GrPrimitiveProcessor_DEFINED | 8 #ifndef GrPrimitiveProcessor_DEFINED |
| 9 #define GrPrimitiveProcessor_DEFINED | 9 #define GrPrimitiveProcessor_DEFINED |
| 10 | 10 |
| (...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 167 | 167 |
| 168 /* | 168 /* |
| 169 * GrPrimitiveProcessor defines an interface which all subclasses must implement
. All | 169 * GrPrimitiveProcessor defines an interface which all subclasses must implement
. All |
| 170 * GrPrimitiveProcessors must proivide seed color and coverage for the Ganesh co
lor / coverage | 170 * GrPrimitiveProcessors must proivide seed color and coverage for the Ganesh co
lor / coverage |
| 171 * pipelines, and they must provide some notion of equality | 171 * pipelines, and they must provide some notion of equality |
| 172 */ | 172 */ |
| 173 class GrPrimitiveProcessor : public GrProcessor { | 173 class GrPrimitiveProcessor : public GrProcessor { |
| 174 public: | 174 public: |
| 175 virtual void initBatchTracker(GrBatchTracker*, const GrPipelineOptimizations
&) const = 0; | 175 virtual void initBatchTracker(GrBatchTracker*, const GrPipelineOptimizations
&) const = 0; |
| 176 | 176 |
| 177 virtual bool canMakeEqual(const GrBatchTracker& mine, | |
| 178 const GrPrimitiveProcessor& that, | |
| 179 const GrBatchTracker& theirs) const = 0; | |
| 180 | |
| 181 virtual void getInvariantOutputColor(GrInitInvariantOutput* out) const = 0; | 177 virtual void getInvariantOutputColor(GrInitInvariantOutput* out) const = 0; |
| 182 virtual void getInvariantOutputCoverage(GrInitInvariantOutput* out) const =
0; | 178 virtual void getInvariantOutputCoverage(GrInitInvariantOutput* out) const =
0; |
| 183 | 179 |
| 184 // Only the GrGeometryProcessor subclass actually has a geo shader or vertex
attributes, but | 180 // Only the GrGeometryProcessor subclass actually has a geo shader or vertex
attributes, but |
| 185 // we put these calls on the base class to prevent having to cast | 181 // we put these calls on the base class to prevent having to cast |
| 186 virtual bool willUseGeoShader() const = 0; | 182 virtual bool willUseGeoShader() const = 0; |
| 187 | 183 |
| 188 /* | 184 /* |
| 189 * This is a safeguard to prevent GrPrimitiveProcessor's from going beyond p
latform specific | 185 * This is a safeguard to prevent GrPrimitiveProcessor's from going beyond p
latform specific |
| 190 * attribute limits. This number can almost certainly be raised if required. | 186 * attribute limits. This number can almost certainly be raised if required. |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 266 private: | 262 private: |
| 267 void notifyRefCntIsZero() const final {}; | 263 void notifyRefCntIsZero() const final {}; |
| 268 virtual bool hasExplicitLocalCoords() const = 0; | 264 virtual bool hasExplicitLocalCoords() const = 0; |
| 269 | 265 |
| 270 bool fIsPathRendering; | 266 bool fIsPathRendering; |
| 271 | 267 |
| 272 typedef GrProcessor INHERITED; | 268 typedef GrProcessor INHERITED; |
| 273 }; | 269 }; |
| 274 | 270 |
| 275 #endif | 271 #endif |
| OLD | NEW |