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