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

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

Issue 1441683008: Move GrGLPrimitive/GeometryProc to GLSL (Closed) Base URL: https://skia.googlesource.com/skia.git@xferProcs
Patch Set: nits Created 5 years, 1 month 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/effects/GrDashingEffect.cpp ('k') | src/gpu/effects/GrDistanceFieldGeoProc.cpp » ('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 GrDistanceFieldGeoProc_DEFINED 8 #ifndef GrDistanceFieldGeoProc_DEFINED
9 #define GrDistanceFieldGeoProc_DEFINED 9 #define GrDistanceFieldGeoProc_DEFINED
10 10
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 void getGLProcessorKey(const GrGLSLCaps& caps, GrProcessorKeyBuilder* b) con st override; 82 void getGLProcessorKey(const GrGLSLCaps& caps, GrProcessorKeyBuilder* b) con st override;
83 83
84 GrGLPrimitiveProcessor* createGLInstance(const GrGLSLCaps&) const override; 84 GrGLSLPrimitiveProcessor* createGLInstance(const GrGLSLCaps&) const override ;
85 85
86 private: 86 private:
87 GrDistanceFieldA8TextGeoProc(GrColor, const SkMatrix& viewMatrix, 87 GrDistanceFieldA8TextGeoProc(GrColor, const SkMatrix& viewMatrix,
88 GrTexture* texture, const GrTextureParams& para ms, 88 GrTexture* texture, const GrTextureParams& para ms,
89 #ifdef SK_GAMMA_APPLY_TO_A8 89 #ifdef SK_GAMMA_APPLY_TO_A8
90 float distanceAdjust, 90 float distanceAdjust,
91 #endif 91 #endif
92 uint32_t flags, bool usesLocalCoords); 92 uint32_t flags, bool usesLocalCoords);
93 93
94 GrColor fColor; 94 GrColor fColor;
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 const Attribute* inTextureCoords() const { return fInTextureCoords; } 133 const Attribute* inTextureCoords() const { return fInTextureCoords; }
134 GrColor color() const { return fColor; } 134 GrColor color() const { return fColor; }
135 bool colorIgnored() const { return GrColor_ILLEGAL == fColor; } 135 bool colorIgnored() const { return GrColor_ILLEGAL == fColor; }
136 bool hasVertexColor() const { return SkToBool(fInColor); } 136 bool hasVertexColor() const { return SkToBool(fInColor); }
137 const SkMatrix& viewMatrix() const { return fViewMatrix; } 137 const SkMatrix& viewMatrix() const { return fViewMatrix; }
138 uint32_t getFlags() const { return fFlags; } 138 uint32_t getFlags() const { return fFlags; }
139 bool usesLocalCoords() const { return fUsesLocalCoords; } 139 bool usesLocalCoords() const { return fUsesLocalCoords; }
140 140
141 void getGLProcessorKey(const GrGLSLCaps& caps, GrProcessorKeyBuilder* b) con st override; 141 void getGLProcessorKey(const GrGLSLCaps& caps, GrProcessorKeyBuilder* b) con st override;
142 142
143 GrGLPrimitiveProcessor* createGLInstance(const GrGLSLCaps&) const override; 143 GrGLSLPrimitiveProcessor* createGLInstance(const GrGLSLCaps&) const override ;
144 144
145 private: 145 private:
146 GrDistanceFieldPathGeoProc(GrColor, const SkMatrix& viewMatrix, GrTexture* t exture, 146 GrDistanceFieldPathGeoProc(GrColor, const SkMatrix& viewMatrix, GrTexture* t exture,
147 const GrTextureParams& params, uint32_t flags, 147 const GrTextureParams& params, uint32_t flags,
148 bool usesLocalCoords); 148 bool usesLocalCoords);
149 149
150 GrColor fColor; 150 GrColor fColor;
151 SkMatrix fViewMatrix; 151 SkMatrix fViewMatrix;
152 GrTextureAccess fTextureAccess; 152 GrTextureAccess fTextureAccess;
153 uint32_t fFlags; 153 uint32_t fFlags;
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
200 const Attribute* inTextureCoords() const { return fInTextureCoords; } 200 const Attribute* inTextureCoords() const { return fInTextureCoords; }
201 DistanceAdjust getDistanceAdjust() const { return fDistanceAdjust; } 201 DistanceAdjust getDistanceAdjust() const { return fDistanceAdjust; }
202 GrColor color() const { return fColor; } 202 GrColor color() const { return fColor; }
203 bool colorIgnored() const { return GrColor_ILLEGAL == fColor; } 203 bool colorIgnored() const { return GrColor_ILLEGAL == fColor; }
204 const SkMatrix& viewMatrix() const { return fViewMatrix; } 204 const SkMatrix& viewMatrix() const { return fViewMatrix; }
205 uint32_t getFlags() const { return fFlags; } 205 uint32_t getFlags() const { return fFlags; }
206 bool usesLocalCoords() const { return fUsesLocalCoords; } 206 bool usesLocalCoords() const { return fUsesLocalCoords; }
207 207
208 void getGLProcessorKey(const GrGLSLCaps& caps, GrProcessorKeyBuilder* b) con st override; 208 void getGLProcessorKey(const GrGLSLCaps& caps, GrProcessorKeyBuilder* b) con st override;
209 209
210 GrGLPrimitiveProcessor* createGLInstance(const GrGLSLCaps&) const override; 210 GrGLSLPrimitiveProcessor* createGLInstance(const GrGLSLCaps&) const override ;
211 211
212 private: 212 private:
213 GrDistanceFieldLCDTextGeoProc(GrColor, const SkMatrix& viewMatrix, 213 GrDistanceFieldLCDTextGeoProc(GrColor, const SkMatrix& viewMatrix,
214 GrTexture* texture, const GrTextureParams& par ams, 214 GrTexture* texture, const GrTextureParams& par ams,
215 DistanceAdjust wa, uint32_t flags, 215 DistanceAdjust wa, uint32_t flags,
216 bool usesLocalCoords); 216 bool usesLocalCoords);
217 217
218 GrColor fColor; 218 GrColor fColor;
219 SkMatrix fViewMatrix; 219 SkMatrix fViewMatrix;
220 GrTextureAccess fTextureAccess; 220 GrTextureAccess fTextureAccess;
221 DistanceAdjust fDistanceAdjust; 221 DistanceAdjust fDistanceAdjust;
222 uint32_t fFlags; 222 uint32_t fFlags;
223 const Attribute* fInPosition; 223 const Attribute* fInPosition;
224 const Attribute* fInTextureCoords; 224 const Attribute* fInTextureCoords;
225 bool fUsesLocalCoords; 225 bool fUsesLocalCoords;
226 226
227 GR_DECLARE_GEOMETRY_PROCESSOR_TEST; 227 GR_DECLARE_GEOMETRY_PROCESSOR_TEST;
228 228
229 typedef GrGeometryProcessor INHERITED; 229 typedef GrGeometryProcessor INHERITED;
230 }; 230 };
231 231
232 #endif 232 #endif
OLDNEW
« no previous file with comments | « src/gpu/effects/GrDashingEffect.cpp ('k') | src/gpu/effects/GrDistanceFieldGeoProc.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698