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 GrDistanceFieldGeoProc_DEFINED | 8 #ifndef GrDistanceFieldGeoProc_DEFINED |
9 #define GrDistanceFieldGeoProc_DEFINED | 9 #define GrDistanceFieldGeoProc_DEFINED |
10 | 10 |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
72 GrColor color() const { return fColor; } | 72 GrColor color() const { return fColor; } |
73 bool colorIgnored() const { return GrColor_ILLEGAL == fColor; } | 73 bool colorIgnored() const { return GrColor_ILLEGAL == fColor; } |
74 bool hasVertexColor() const { return SkToBool(fInColor); } | 74 bool hasVertexColor() const { return SkToBool(fInColor); } |
75 const SkMatrix& viewMatrix() const { return fViewMatrix; } | 75 const SkMatrix& viewMatrix() const { return fViewMatrix; } |
76 bool usesLocalCoords() const { return fUsesLocalCoords; } | 76 bool usesLocalCoords() const { return fUsesLocalCoords; } |
77 #ifdef SK_GAMMA_APPLY_TO_A8 | 77 #ifdef SK_GAMMA_APPLY_TO_A8 |
78 float getDistanceAdjust() const { return fDistanceAdjust; } | 78 float getDistanceAdjust() const { return fDistanceAdjust; } |
79 #endif | 79 #endif |
80 uint32_t getFlags() const { return fFlags; } | 80 uint32_t getFlags() const { return fFlags; } |
81 | 81 |
82 virtual void getGLProcessorKey(const GrBatchTracker& bt, | 82 virtual void getGLProcessorKey(const GrGLSLCaps& caps, |
bsalomon
2015/09/10 18:55:32
one line? -virtual?
joshualitt
2015/09/10 20:08:06
Acknowledged.
| |
83 const GrGLSLCaps& caps, | |
84 GrProcessorKeyBuilder* b) const override; | 83 GrProcessorKeyBuilder* b) const override; |
85 | 84 |
86 virtual GrGLPrimitiveProcessor* createGLInstance(const GrBatchTracker& bt, | 85 virtual GrGLPrimitiveProcessor* createGLInstance(const GrGLSLCaps&) const ov erride; |
bsalomon
2015/09/10 18:55:32
-virtual?
joshualitt
2015/09/10 20:08:06
Acknowledged.
| |
87 const GrGLSLCaps&) const ov erride; | |
88 | 86 |
89 private: | 87 private: |
90 GrDistanceFieldA8TextGeoProc(GrColor, const SkMatrix& viewMatrix, | 88 GrDistanceFieldA8TextGeoProc(GrColor, const SkMatrix& viewMatrix, |
91 GrTexture* texture, const GrTextureParams& para ms, | 89 GrTexture* texture, const GrTextureParams& para ms, |
92 #ifdef SK_GAMMA_APPLY_TO_A8 | 90 #ifdef SK_GAMMA_APPLY_TO_A8 |
93 float distanceAdjust, | 91 float distanceAdjust, |
94 #endif | 92 #endif |
95 uint32_t flags, bool usesLocalCoords); | 93 uint32_t flags, bool usesLocalCoords); |
96 | 94 |
97 GrColor fColor; | 95 GrColor fColor; |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
134 const Attribute* inPosition() const { return fInPosition; } | 132 const Attribute* inPosition() const { return fInPosition; } |
135 const Attribute* inColor() const { return fInColor; } | 133 const Attribute* inColor() const { return fInColor; } |
136 const Attribute* inTextureCoords() const { return fInTextureCoords; } | 134 const Attribute* inTextureCoords() const { return fInTextureCoords; } |
137 GrColor color() const { return fColor; } | 135 GrColor color() const { return fColor; } |
138 bool colorIgnored() const { return GrColor_ILLEGAL == fColor; } | 136 bool colorIgnored() const { return GrColor_ILLEGAL == fColor; } |
139 bool hasVertexColor() const { return SkToBool(fInColor); } | 137 bool hasVertexColor() const { return SkToBool(fInColor); } |
140 const SkMatrix& viewMatrix() const { return fViewMatrix; } | 138 const SkMatrix& viewMatrix() const { return fViewMatrix; } |
141 uint32_t getFlags() const { return fFlags; } | 139 uint32_t getFlags() const { return fFlags; } |
142 bool usesLocalCoords() const { return fUsesLocalCoords; } | 140 bool usesLocalCoords() const { return fUsesLocalCoords; } |
143 | 141 |
144 virtual void getGLProcessorKey(const GrBatchTracker& bt, | 142 virtual void getGLProcessorKey(const GrGLSLCaps& caps, |
bsalomon
2015/09/10 18:55:32
one line? -virtual?
joshualitt
2015/09/10 20:08:06
Acknowledged.
| |
145 const GrGLSLCaps& caps, | |
146 GrProcessorKeyBuilder* b) const override; | 143 GrProcessorKeyBuilder* b) const override; |
147 | 144 |
148 virtual GrGLPrimitiveProcessor* createGLInstance(const GrBatchTracker& bt, | 145 virtual GrGLPrimitiveProcessor* createGLInstance(const GrGLSLCaps&) const ov erride; |
bsalomon
2015/09/10 18:55:32
-virtual?
joshualitt
2015/09/10 20:08:06
Acknowledged.
| |
149 const GrGLSLCaps&) const ov erride; | |
150 | 146 |
151 private: | 147 private: |
152 GrDistanceFieldPathGeoProc(GrColor, const SkMatrix& viewMatrix, GrTexture* t exture, | 148 GrDistanceFieldPathGeoProc(GrColor, const SkMatrix& viewMatrix, GrTexture* t exture, |
153 const GrTextureParams& params, uint32_t flags, | 149 const GrTextureParams& params, uint32_t flags, |
154 bool usesLocalCoords); | 150 bool usesLocalCoords); |
155 | 151 |
156 GrColor fColor; | 152 GrColor fColor; |
157 SkMatrix fViewMatrix; | 153 SkMatrix fViewMatrix; |
158 GrTextureAccess fTextureAccess; | 154 GrTextureAccess fTextureAccess; |
159 uint32_t fFlags; | 155 uint32_t fFlags; |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
204 | 200 |
205 const Attribute* inPosition() const { return fInPosition; } | 201 const Attribute* inPosition() const { return fInPosition; } |
206 const Attribute* inTextureCoords() const { return fInTextureCoords; } | 202 const Attribute* inTextureCoords() const { return fInTextureCoords; } |
207 DistanceAdjust getDistanceAdjust() const { return fDistanceAdjust; } | 203 DistanceAdjust getDistanceAdjust() const { return fDistanceAdjust; } |
208 GrColor color() const { return fColor; } | 204 GrColor color() const { return fColor; } |
209 bool colorIgnored() const { return GrColor_ILLEGAL == fColor; } | 205 bool colorIgnored() const { return GrColor_ILLEGAL == fColor; } |
210 const SkMatrix& viewMatrix() const { return fViewMatrix; } | 206 const SkMatrix& viewMatrix() const { return fViewMatrix; } |
211 uint32_t getFlags() const { return fFlags; } | 207 uint32_t getFlags() const { return fFlags; } |
212 bool usesLocalCoords() const { return fUsesLocalCoords; } | 208 bool usesLocalCoords() const { return fUsesLocalCoords; } |
213 | 209 |
214 virtual void getGLProcessorKey(const GrBatchTracker& bt, | 210 virtual void getGLProcessorKey(const GrGLSLCaps& caps, |
bsalomon
2015/09/10 18:55:32
one line? -virtual?
joshualitt
2015/09/10 20:08:06
Acknowledged.
| |
215 const GrGLSLCaps& caps, | |
216 GrProcessorKeyBuilder* b) const override; | 211 GrProcessorKeyBuilder* b) const override; |
217 | 212 |
218 virtual GrGLPrimitiveProcessor* createGLInstance(const GrBatchTracker& bt, | 213 virtual GrGLPrimitiveProcessor* createGLInstance(const GrGLSLCaps&) const ov erride; |
bsalomon
2015/09/10 18:55:32
-virtual?
joshualitt
2015/09/10 20:08:06
Acknowledged.
| |
219 const GrGLSLCaps&) const ov erride; | |
220 | 214 |
221 private: | 215 private: |
222 GrDistanceFieldLCDTextGeoProc(GrColor, const SkMatrix& viewMatrix, | 216 GrDistanceFieldLCDTextGeoProc(GrColor, const SkMatrix& viewMatrix, |
223 GrTexture* texture, const GrTextureParams& par ams, | 217 GrTexture* texture, const GrTextureParams& par ams, |
224 DistanceAdjust wa, uint32_t flags, | 218 DistanceAdjust wa, uint32_t flags, |
225 bool usesLocalCoords); | 219 bool usesLocalCoords); |
226 | 220 |
227 GrColor fColor; | 221 GrColor fColor; |
228 SkMatrix fViewMatrix; | 222 SkMatrix fViewMatrix; |
229 GrTextureAccess fTextureAccess; | 223 GrTextureAccess fTextureAccess; |
230 DistanceAdjust fDistanceAdjust; | 224 DistanceAdjust fDistanceAdjust; |
231 uint32_t fFlags; | 225 uint32_t fFlags; |
232 const Attribute* fInPosition; | 226 const Attribute* fInPosition; |
233 const Attribute* fInTextureCoords; | 227 const Attribute* fInTextureCoords; |
234 bool fUsesLocalCoords; | 228 bool fUsesLocalCoords; |
235 | 229 |
236 GR_DECLARE_GEOMETRY_PROCESSOR_TEST; | 230 GR_DECLARE_GEOMETRY_PROCESSOR_TEST; |
237 | 231 |
238 typedef GrGeometryProcessor INHERITED; | 232 typedef GrGeometryProcessor INHERITED; |
239 }; | 233 }; |
240 | 234 |
241 #endif | 235 #endif |
OLD | NEW |