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 GrDistanceFieldTextureEffect_DEFINED | 8 #ifndef GrDistanceFieldTextureEffect_DEFINED |
9 #define GrDistanceFieldTextureEffect_DEFINED | 9 #define GrDistanceFieldTextureEffect_DEFINED |
10 | 10 |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
76 #endif | 76 #endif |
77 uint32_t getFlags() const { return fFlags; } | 77 uint32_t getFlags() const { return fFlags; } |
78 | 78 |
79 virtual void getGLProcessorKey(const GrBatchTracker& bt, | 79 virtual void getGLProcessorKey(const GrBatchTracker& bt, |
80 const GrGLCaps& caps, | 80 const GrGLCaps& caps, |
81 GrProcessorKeyBuilder* b) const SK_OVERRIDE; | 81 GrProcessorKeyBuilder* b) const SK_OVERRIDE; |
82 | 82 |
83 virtual GrGLPrimitiveProcessor* createGLInstance(const GrBatchTracker& bt, | 83 virtual GrGLPrimitiveProcessor* createGLInstance(const GrBatchTracker& bt, |
84 const GrGLCaps&) const SK_O
VERRIDE; | 84 const GrGLCaps&) const SK_O
VERRIDE; |
85 | 85 |
86 void initBatchTracker(GrBatchTracker* bt, const InitBT& init) const SK_OVERR
IDE; | 86 void initBatchTracker(GrBatchTracker* bt, const GrPipelineInfo& init) const
SK_OVERRIDE; |
87 | 87 |
88 bool onCanMakeEqual(const GrBatchTracker&, | 88 bool onCanMakeEqual(const GrBatchTracker&, |
89 const GrGeometryProcessor&, | 89 const GrGeometryProcessor&, |
90 const GrBatchTracker&) const SK_OVERRIDE; | 90 const GrBatchTracker&) const SK_OVERRIDE; |
91 | 91 |
92 private: | 92 private: |
93 GrDistanceFieldTextureEffect(GrColor, const SkMatrix& viewMatrix, GrTexture*
texture, | 93 GrDistanceFieldTextureEffect(GrColor, const SkMatrix& viewMatrix, GrTexture*
texture, |
94 const GrTextureParams& params, | 94 const GrTextureParams& params, |
95 #ifdef SK_GAMMA_APPLY_TO_A8 | 95 #ifdef SK_GAMMA_APPLY_TO_A8 |
96 GrTexture* gamma, const GrTextureParams& gammaP
arams, float lum, | 96 GrTexture* gamma, const GrTextureParams& gammaP
arams, float lum, |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
141 const Attribute* inTextureCoords() const { return fInTextureCoords; } | 141 const Attribute* inTextureCoords() const { return fInTextureCoords; } |
142 uint32_t getFlags() const { return fFlags; } | 142 uint32_t getFlags() const { return fFlags; } |
143 | 143 |
144 virtual void getGLProcessorKey(const GrBatchTracker& bt, | 144 virtual void getGLProcessorKey(const GrBatchTracker& bt, |
145 const GrGLCaps& caps, | 145 const GrGLCaps& caps, |
146 GrProcessorKeyBuilder* b) const SK_OVERRIDE; | 146 GrProcessorKeyBuilder* b) const SK_OVERRIDE; |
147 | 147 |
148 virtual GrGLPrimitiveProcessor* createGLInstance(const GrBatchTracker& bt, | 148 virtual GrGLPrimitiveProcessor* createGLInstance(const GrBatchTracker& bt, |
149 const GrGLCaps&) const SK_O
VERRIDE; | 149 const GrGLCaps&) const SK_O
VERRIDE; |
150 | 150 |
151 void initBatchTracker(GrBatchTracker* bt, const InitBT& init) const SK_OVERR
IDE; | 151 void initBatchTracker(GrBatchTracker* bt, const GrPipelineInfo& init) const
SK_OVERRIDE; |
152 | 152 |
153 bool onCanMakeEqual(const GrBatchTracker&, | 153 bool onCanMakeEqual(const GrBatchTracker&, |
154 const GrGeometryProcessor&, | 154 const GrGeometryProcessor&, |
155 const GrBatchTracker&) const SK_OVERRIDE; | 155 const GrBatchTracker&) const SK_OVERRIDE; |
156 | 156 |
157 private: | 157 private: |
158 GrDistanceFieldNoGammaTextureEffect(GrColor, const SkMatrix& viewMatrix, GrT
exture* texture, | 158 GrDistanceFieldNoGammaTextureEffect(GrColor, const SkMatrix& viewMatrix, GrT
exture* texture, |
159 const GrTextureParams& params, uint32_t
flags, | 159 const GrTextureParams& params, uint32_t
flags, |
160 bool opaqueVertexColors); | 160 bool opaqueVertexColors); |
161 | 161 |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
199 GrColor getTextColor() const { return fTextColor; } | 199 GrColor getTextColor() const { return fTextColor; } |
200 uint32_t getFlags() const { return fFlags; } | 200 uint32_t getFlags() const { return fFlags; } |
201 | 201 |
202 virtual void getGLProcessorKey(const GrBatchTracker& bt, | 202 virtual void getGLProcessorKey(const GrBatchTracker& bt, |
203 const GrGLCaps& caps, | 203 const GrGLCaps& caps, |
204 GrProcessorKeyBuilder* b) const SK_OVERRIDE; | 204 GrProcessorKeyBuilder* b) const SK_OVERRIDE; |
205 | 205 |
206 virtual GrGLPrimitiveProcessor* createGLInstance(const GrBatchTracker& bt, | 206 virtual GrGLPrimitiveProcessor* createGLInstance(const GrBatchTracker& bt, |
207 const GrGLCaps&) const SK_O
VERRIDE; | 207 const GrGLCaps&) const SK_O
VERRIDE; |
208 | 208 |
209 void initBatchTracker(GrBatchTracker* bt, const InitBT& init) const SK_OVERR
IDE; | 209 void initBatchTracker(GrBatchTracker* bt, const GrPipelineInfo& init) const
SK_OVERRIDE; |
210 | 210 |
211 bool onCanMakeEqual(const GrBatchTracker&, | 211 bool onCanMakeEqual(const GrBatchTracker&, |
212 const GrGeometryProcessor&, | 212 const GrGeometryProcessor&, |
213 const GrBatchTracker&) const SK_OVERRIDE; | 213 const GrBatchTracker&) const SK_OVERRIDE; |
214 | 214 |
215 private: | 215 private: |
216 GrDistanceFieldLCDTextureEffect(GrColor, const SkMatrix& viewMatrix, GrTextu
re* texture, | 216 GrDistanceFieldLCDTextureEffect(GrColor, const SkMatrix& viewMatrix, GrTextu
re* texture, |
217 const GrTextureParams& params, | 217 const GrTextureParams& params, |
218 GrTexture* gamma, const GrTextureParams& gam
maParams, | 218 GrTexture* gamma, const GrTextureParams& gam
maParams, |
219 SkColor textColor, uint32_t flags); | 219 SkColor textColor, uint32_t flags); |
220 | 220 |
221 bool onIsEqual(const GrGeometryProcessor& other) const SK_OVERRIDE; | 221 bool onIsEqual(const GrGeometryProcessor& other) const SK_OVERRIDE; |
222 | 222 |
223 void onGetInvariantOutputCoverage(GrInitInvariantOutput*) const SK_OVERRIDE; | 223 void onGetInvariantOutputCoverage(GrInitInvariantOutput*) const SK_OVERRIDE; |
224 | 224 |
225 GrTextureAccess fTextureAccess; | 225 GrTextureAccess fTextureAccess; |
226 GrTextureAccess fGammaTextureAccess; | 226 GrTextureAccess fGammaTextureAccess; |
227 GrColor fTextColor; | 227 GrColor fTextColor; |
228 uint32_t fFlags; | 228 uint32_t fFlags; |
229 const Attribute* fInPosition; | 229 const Attribute* fInPosition; |
230 const Attribute* fInTextureCoords; | 230 const Attribute* fInTextureCoords; |
231 | 231 |
232 GR_DECLARE_GEOMETRY_PROCESSOR_TEST; | 232 GR_DECLARE_GEOMETRY_PROCESSOR_TEST; |
233 | 233 |
234 typedef GrGeometryProcessor INHERITED; | 234 typedef GrGeometryProcessor INHERITED; |
235 }; | 235 }; |
236 | 236 |
237 #endif | 237 #endif |
OLD | NEW |