Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(169)

Side by Side Diff: src/gpu/effects/GrBezierEffect.h

Issue 617853003: Revert of Add isSingleComponent bool to getConstantColorComponent (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/gpu/GrProcessor.cpp ('k') | src/gpu/effects/GrBicubicEffect.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
100 virtual const GrBackendGeometryProcessorFactory& getFactory() const SK_OVERR IDE; 105 virtual const GrBackendGeometryProcessorFactory& getFactory() const SK_OVERR IDE;
101 106
102 private: 107 private:
103 GrConicEffect(GrPrimitiveEdgeType); 108 GrConicEffect(GrPrimitiveEdgeType);
104 109
105 virtual bool onIsEqual(const GrProcessor& other) const SK_OVERRIDE; 110 virtual bool onIsEqual(const GrProcessor& other) const SK_OVERRIDE;
106 111
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
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
173 virtual const GrBackendGeometryProcessorFactory& getFactory() const SK_OVERR IDE; 178 virtual const GrBackendGeometryProcessorFactory& getFactory() const SK_OVERR IDE;
174 179
175 private: 180 private:
176 GrQuadEffect(GrPrimitiveEdgeType); 181 GrQuadEffect(GrPrimitiveEdgeType);
177 182
178 virtual bool onIsEqual(const GrProcessor& other) const SK_OVERRIDE; 183 virtual bool onIsEqual(const GrProcessor& other) const SK_OVERRIDE;
179 184
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
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
248 virtual const GrBackendGeometryProcessorFactory& getFactory() const SK_OVERR IDE; 253 virtual const GrBackendGeometryProcessorFactory& getFactory() const SK_OVERR IDE;
249 254
250 private: 255 private:
251 GrCubicEffect(GrPrimitiveEdgeType); 256 GrCubicEffect(GrPrimitiveEdgeType);
252 257
253 virtual bool onIsEqual(const GrProcessor& other) const SK_OVERRIDE; 258 virtual bool onIsEqual(const GrProcessor& other) const SK_OVERRIDE;
254 259
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
OLDNEW
« no previous file with comments | « src/gpu/GrProcessor.cpp ('k') | src/gpu/effects/GrBicubicEffect.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698