| 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 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 73 GrGeometryProcessor(GrColor color, bool opaqueVertexColors = false, uint8_t
coverage = 0xff) | 73 GrGeometryProcessor(GrColor color, bool opaqueVertexColors = false, uint8_t
coverage = 0xff) |
| 74 : fVertexStride(0) | 74 : fVertexStride(0) |
| 75 , fColor(color) | 75 , fColor(color) |
| 76 , fCoverage(coverage) | 76 , fCoverage(coverage) |
| 77 , fOpaqueVertexColors(opaqueVertexColors) | 77 , fOpaqueVertexColors(opaqueVertexColors) |
| 78 , fWillUseGeoShader(false) | 78 , fWillUseGeoShader(false) |
| 79 , fHasVertexColor(false) | 79 , fHasVertexColor(false) |
| 80 , fHasVertexCoverage(false) | 80 , fHasVertexCoverage(false) |
| 81 , fHasLocalCoords(false) {} | 81 , fHasLocalCoords(false) {} |
| 82 | 82 |
| 83 virtual const char* name() const = 0; | |
| 84 | |
| 85 /** | 83 /** |
| 86 * Sets a unique key on the GrProcessorKeyBuilder that is directly associate
d with this geometry | 84 * Sets a unique key on the GrProcessorKeyBuilder that is directly associate
d with this geometry |
| 87 * processor's GL backend implementation. | 85 * processor's GL backend implementation. |
| 88 */ | 86 */ |
| 89 virtual void getGLProcessorKey(const GrBatchTracker& bt, | 87 virtual void getGLProcessorKey(const GrBatchTracker& bt, |
| 90 const GrGLCaps& caps, | 88 const GrGLCaps& caps, |
| 91 GrProcessorKeyBuilder* b) const = 0; | 89 GrProcessorKeyBuilder* b) const = 0; |
| 92 | 90 |
| 93 | 91 |
| 94 /** Returns a new instance of the appropriate *GL* implementation class | 92 /** Returns a new instance of the appropriate *GL* implementation class |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 154 struct InitBT { | 152 struct InitBT { |
| 155 bool fOutputColor; | 153 bool fOutputColor; |
| 156 bool fOutputCoverage; | 154 bool fOutputCoverage; |
| 157 GrColor fColor; | 155 GrColor fColor; |
| 158 GrColor fCoverage; | 156 GrColor fCoverage; |
| 159 }; | 157 }; |
| 160 | 158 |
| 161 virtual void initBatchTracker(GrBatchTracker*, const InitBT&) const {} | 159 virtual void initBatchTracker(GrBatchTracker*, const InitBT&) const {} |
| 162 | 160 |
| 163 GrColor color() const { return fColor; } | 161 GrColor color() const { return fColor; } |
| 164 uint8_t coverage() const { return fCoverage; } | 162 uint8_t coverage() const SK_OVERRIDE { return fCoverage; } |
| 165 | 163 |
| 166 // TODO this is a total hack until the gp can own whether or not it uses uni
form | 164 // TODO this is a total hack until the gp can own whether or not it uses uni
form |
| 167 // color / coverage | 165 // color / coverage |
| 168 bool hasVertexColor() const { return fHasVertexColor; } | 166 bool hasVertexColor() const { return fHasVertexColor; } |
| 169 bool hasVertexCoverage() const { return fHasVertexCoverage; } | 167 bool hasVertexCoverage() const { return fHasVertexCoverage; } |
| 170 bool hasLocalCoords() const { return fHasLocalCoords; } | 168 bool hasLocalCoords() const { return fHasLocalCoords; } |
| 171 | 169 |
| 172 void getInvariantOutputColor(GrInitInvariantOutput* out) const SK_OVERRIDE; | 170 void getInvariantOutputColor(GrInitInvariantOutput* out) const SK_OVERRIDE; |
| 173 void getInvariantOutputCoverage(GrInitInvariantOutput* out) const SK_OVERRID
E; | 171 void getInvariantOutputCoverage(GrInitInvariantOutput* out) const SK_OVERRID
E; |
| 174 | 172 |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 225 void getInvariantOutputColor(GrInitInvariantOutput* out) const SK_OVERRIDE; | 223 void getInvariantOutputColor(GrInitInvariantOutput* out) const SK_OVERRIDE; |
| 226 void getInvariantOutputCoverage(GrInitInvariantOutput* out) const SK_OVERRID
E; | 224 void getInvariantOutputCoverage(GrInitInvariantOutput* out) const SK_OVERRID
E; |
| 227 | 225 |
| 228 private: | 226 private: |
| 229 GrPathProcessor(GrColor color) : fColor(color) {} | 227 GrPathProcessor(GrColor color) : fColor(color) {} |
| 230 GrColor fColor; | 228 GrColor fColor; |
| 231 | 229 |
| 232 typedef GrProcessor INHERITED; | 230 typedef GrProcessor INHERITED; |
| 233 }; | 231 }; |
| 234 #endif | 232 #endif |
| OLD | NEW |