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 GrBezierEffect_DEFINED | 8 #ifndef GrBezierEffect_DEFINED |
9 #define GrBezierEffect_DEFINED | 9 #define GrBezierEffect_DEFINED |
10 | 10 |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
90 | 90 |
91 static const char* Name() { return "Conic"; } | 91 static const char* Name() { return "Conic"; } |
92 | 92 |
93 inline const GrShaderVar& inConicCoeffs() const { return fInConicCoeffs; } | 93 inline const GrShaderVar& inConicCoeffs() const { return fInConicCoeffs; } |
94 inline bool isAntiAliased() const { return GrProcessorEdgeTypeIsAA(fEdgeType
); } | 94 inline bool isAntiAliased() const { return GrProcessorEdgeTypeIsAA(fEdgeType
); } |
95 inline bool isFilled() const { return GrProcessorEdgeTypeIsFill(fEdgeType);
} | 95 inline bool isFilled() const { return GrProcessorEdgeTypeIsFill(fEdgeType);
} |
96 inline GrPrimitiveEdgeType getEdgeType() const { return fEdgeType; } | 96 inline GrPrimitiveEdgeType getEdgeType() const { return fEdgeType; } |
97 | 97 |
98 typedef GrGLConicEffect GLProcessor; | 98 typedef GrGLConicEffect GLProcessor; |
99 | 99 |
100 virtual void getConstantColorComponents(GrColor* color, | |
101 uint32_t* validFlags) const SK_OVERR
IDE { | |
102 *validFlags = 0; | |
103 } | |
104 | |
105 virtual const GrBackendGeometryProcessorFactory& getFactory() const SK_OVERR
IDE; | 100 virtual const GrBackendGeometryProcessorFactory& getFactory() const SK_OVERR
IDE; |
106 | 101 |
107 private: | 102 private: |
108 GrConicEffect(GrPrimitiveEdgeType); | 103 GrConicEffect(GrPrimitiveEdgeType); |
109 | 104 |
110 virtual bool onIsEqual(const GrProcessor& other) const SK_OVERRIDE; | 105 virtual bool onIsEqual(const GrProcessor& other) const SK_OVERRIDE; |
111 | 106 |
| 107 virtual void onComputeInvariantOutput(InvariantOutput* inout) const SK_OVERR
IDE { |
| 108 inout->fValidFlags = 0; |
| 109 inout->fIsSingleComponent = false; |
| 110 } |
| 111 |
112 GrPrimitiveEdgeType fEdgeType; | 112 GrPrimitiveEdgeType fEdgeType; |
113 const GrShaderVar& fInConicCoeffs; | 113 const GrShaderVar& fInConicCoeffs; |
114 | 114 |
115 GR_DECLARE_GEOMETRY_PROCESSOR_TEST; | 115 GR_DECLARE_GEOMETRY_PROCESSOR_TEST; |
116 | 116 |
117 typedef GrGeometryProcessor INHERITED; | 117 typedef GrGeometryProcessor INHERITED; |
118 }; | 118 }; |
119 | 119 |
120 /////////////////////////////////////////////////////////////////////////////// | 120 /////////////////////////////////////////////////////////////////////////////// |
121 /** | 121 /** |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
163 | 163 |
164 static const char* Name() { return "Quad"; } | 164 static const char* Name() { return "Quad"; } |
165 | 165 |
166 inline const GrShaderVar& inHairQuadEdge() const { return fInHairQuadEdge; } | 166 inline const GrShaderVar& inHairQuadEdge() const { return fInHairQuadEdge; } |
167 inline bool isAntiAliased() const { return GrProcessorEdgeTypeIsAA(fEdgeType
); } | 167 inline bool isAntiAliased() const { return GrProcessorEdgeTypeIsAA(fEdgeType
); } |
168 inline bool isFilled() const { return GrProcessorEdgeTypeIsFill(fEdgeType);
} | 168 inline bool isFilled() const { return GrProcessorEdgeTypeIsFill(fEdgeType);
} |
169 inline GrPrimitiveEdgeType getEdgeType() const { return fEdgeType; } | 169 inline GrPrimitiveEdgeType getEdgeType() const { return fEdgeType; } |
170 | 170 |
171 typedef GrGLQuadEffect GLProcessor; | 171 typedef GrGLQuadEffect GLProcessor; |
172 | 172 |
173 virtual void getConstantColorComponents(GrColor* color, | |
174 uint32_t* validFlags) const SK_OVERR
IDE { | |
175 *validFlags = 0; | |
176 } | |
177 | |
178 virtual const GrBackendGeometryProcessorFactory& getFactory() const SK_OVERR
IDE; | 173 virtual const GrBackendGeometryProcessorFactory& getFactory() const SK_OVERR
IDE; |
179 | 174 |
180 private: | 175 private: |
181 GrQuadEffect(GrPrimitiveEdgeType); | 176 GrQuadEffect(GrPrimitiveEdgeType); |
182 | 177 |
183 virtual bool onIsEqual(const GrProcessor& other) const SK_OVERRIDE; | 178 virtual bool onIsEqual(const GrProcessor& other) const SK_OVERRIDE; |
184 | 179 |
| 180 virtual void onComputeInvariantOutput(InvariantOutput* inout) const SK_OVERR
IDE { |
| 181 inout->fValidFlags = 0; |
| 182 inout->fIsSingleComponent = false; |
| 183 } |
| 184 |
185 GrPrimitiveEdgeType fEdgeType; | 185 GrPrimitiveEdgeType fEdgeType; |
186 const GrShaderVar& fInHairQuadEdge; | 186 const GrShaderVar& fInHairQuadEdge; |
187 | 187 |
188 GR_DECLARE_GEOMETRY_PROCESSOR_TEST; | 188 GR_DECLARE_GEOMETRY_PROCESSOR_TEST; |
189 | 189 |
190 typedef GrGeometryProcessor INHERITED; | 190 typedef GrGeometryProcessor INHERITED; |
191 }; | 191 }; |
192 | 192 |
193 ////////////////////////////////////////////////////////////////////////////// | 193 ////////////////////////////////////////////////////////////////////////////// |
194 /** | 194 /** |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
238 | 238 |
239 static const char* Name() { return "Cubic"; } | 239 static const char* Name() { return "Cubic"; } |
240 | 240 |
241 inline const GrShaderVar& inCubicCoeffs() const { return fInCubicCoeffs; } | 241 inline const GrShaderVar& inCubicCoeffs() const { return fInCubicCoeffs; } |
242 inline bool isAntiAliased() const { return GrProcessorEdgeTypeIsAA(fEdgeType
); } | 242 inline bool isAntiAliased() const { return GrProcessorEdgeTypeIsAA(fEdgeType
); } |
243 inline bool isFilled() const { return GrProcessorEdgeTypeIsFill(fEdgeType);
} | 243 inline bool isFilled() const { return GrProcessorEdgeTypeIsFill(fEdgeType);
} |
244 inline GrPrimitiveEdgeType getEdgeType() const { return fEdgeType; } | 244 inline GrPrimitiveEdgeType getEdgeType() const { return fEdgeType; } |
245 | 245 |
246 typedef GrGLCubicEffect GLProcessor; | 246 typedef GrGLCubicEffect GLProcessor; |
247 | 247 |
248 virtual void getConstantColorComponents(GrColor* color, | |
249 uint32_t* validFlags) const SK_OVERR
IDE { | |
250 *validFlags = 0; | |
251 } | |
252 | |
253 virtual const GrBackendGeometryProcessorFactory& getFactory() const SK_OVERR
IDE; | 248 virtual const GrBackendGeometryProcessorFactory& getFactory() const SK_OVERR
IDE; |
254 | 249 |
255 private: | 250 private: |
256 GrCubicEffect(GrPrimitiveEdgeType); | 251 GrCubicEffect(GrPrimitiveEdgeType); |
257 | 252 |
258 virtual bool onIsEqual(const GrProcessor& other) const SK_OVERRIDE; | 253 virtual bool onIsEqual(const GrProcessor& other) const SK_OVERRIDE; |
259 | 254 |
| 255 virtual void onComputeInvariantOutput(InvariantOutput* inout) const SK_OVERR
IDE { |
| 256 inout->fValidFlags = 0; |
| 257 inout->fIsSingleComponent = false; |
| 258 } |
| 259 |
260 GrPrimitiveEdgeType fEdgeType; | 260 GrPrimitiveEdgeType fEdgeType; |
261 const GrShaderVar& fInCubicCoeffs; | 261 const GrShaderVar& fInCubicCoeffs; |
262 | 262 |
263 GR_DECLARE_GEOMETRY_PROCESSOR_TEST; | 263 GR_DECLARE_GEOMETRY_PROCESSOR_TEST; |
264 | 264 |
265 typedef GrGeometryProcessor INHERITED; | 265 typedef GrGeometryProcessor INHERITED; |
266 }; | 266 }; |
267 | 267 |
268 #endif | 268 #endif |
OLD | NEW |