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

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

Issue 2340603003: Remove "f" suffix from literal in LCD DF text shader. (Closed)
Patch Set: Address comment Created 4 years, 3 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 | « no previous file | 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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 GrTexture* tex, const GrTextureParams & params, 61 GrTexture* tex, const GrTextureParams & params,
62 uint32_t flags, bool usesLocalCoords) { 62 uint32_t flags, bool usesLocalCoords) {
63 return sk_sp<GrGeometryProcessor>( 63 return sk_sp<GrGeometryProcessor>(
64 new GrDistanceFieldA8TextGeoProc(color, viewMatrix, tex, params, fla gs, 64 new GrDistanceFieldA8TextGeoProc(color, viewMatrix, tex, params, fla gs,
65 usesLocalCoords)); 65 usesLocalCoords));
66 } 66 }
67 #endif 67 #endif
68 68
69 virtual ~GrDistanceFieldA8TextGeoProc() {} 69 virtual ~GrDistanceFieldA8TextGeoProc() {}
70 70
71 const char* name() const override { return "DistanceFieldTexture"; } 71 const char* name() const override { return "DistanceFieldA8Text"; }
72 72
73 const Attribute* inPosition() const { return fInPosition; } 73 const Attribute* inPosition() const { return fInPosition; }
74 const Attribute* inColor() const { return fInColor; } 74 const Attribute* inColor() const { return fInColor; }
75 const Attribute* inTextureCoords() const { return fInTextureCoords; } 75 const Attribute* inTextureCoords() const { return fInTextureCoords; }
76 GrColor color() const { return fColor; } 76 GrColor color() const { return fColor; }
77 bool colorIgnored() const { return GrColor_ILLEGAL == fColor; } 77 bool colorIgnored() const { return GrColor_ILLEGAL == fColor; }
78 const SkMatrix& viewMatrix() const { return fViewMatrix; } 78 const SkMatrix& viewMatrix() const { return fViewMatrix; }
79 bool usesLocalCoords() const { return fUsesLocalCoords; } 79 bool usesLocalCoords() const { return fUsesLocalCoords; }
80 #ifdef SK_GAMMA_APPLY_TO_A8 80 #ifdef SK_GAMMA_APPLY_TO_A8
81 float getDistanceAdjust() const { return fDistanceAdjust; } 81 float getDistanceAdjust() const { return fDistanceAdjust; }
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 public: 122 public:
123 static sk_sp<GrGeometryProcessor> Make(GrColor color, const SkMatrix& viewMa trix, 123 static sk_sp<GrGeometryProcessor> Make(GrColor color, const SkMatrix& viewMa trix,
124 GrTexture* tex, const GrTextureParams & params, 124 GrTexture* tex, const GrTextureParams & params,
125 uint32_t flags, bool usesLocalCoords) { 125 uint32_t flags, bool usesLocalCoords) {
126 return sk_sp<GrGeometryProcessor>( 126 return sk_sp<GrGeometryProcessor>(
127 new GrDistanceFieldPathGeoProc(color, viewMatrix, tex, params, flags , usesLocalCoords)); 127 new GrDistanceFieldPathGeoProc(color, viewMatrix, tex, params, flags , usesLocalCoords));
128 } 128 }
129 129
130 virtual ~GrDistanceFieldPathGeoProc() {} 130 virtual ~GrDistanceFieldPathGeoProc() {}
131 131
132 const char* name() const override { return "DistanceFieldTexture"; } 132 const char* name() const override { return "DistanceFieldPath"; }
133 133
134 const Attribute* inPosition() const { return fInPosition; } 134 const Attribute* inPosition() const { return fInPosition; }
135 const Attribute* inColor() const { return fInColor; } 135 const Attribute* inColor() const { return fInColor; }
136 const Attribute* inTextureCoords() const { return fInTextureCoords; } 136 const Attribute* inTextureCoords() const { return fInTextureCoords; }
137 GrColor color() const { return fColor; } 137 GrColor color() const { return fColor; }
138 bool colorIgnored() const { return GrColor_ILLEGAL == fColor; } 138 bool colorIgnored() const { return GrColor_ILLEGAL == fColor; }
139 const SkMatrix& viewMatrix() const { return fViewMatrix; } 139 const SkMatrix& viewMatrix() const { return fViewMatrix; }
140 uint32_t getFlags() const { return fFlags; } 140 uint32_t getFlags() const { return fFlags; }
141 bool usesLocalCoords() const { return fUsesLocalCoords; } 141 bool usesLocalCoords() const { return fUsesLocalCoords; }
142 142
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
190 GrTexture* tex, const GrTextureParams & params, 190 GrTexture* tex, const GrTextureParams & params,
191 DistanceAdjust distanceAdjust, uint32 _t flags, 191 DistanceAdjust distanceAdjust, uint32 _t flags,
192 bool usesLocalCoords) { 192 bool usesLocalCoords) {
193 return sk_sp<GrGeometryProcessor>( 193 return sk_sp<GrGeometryProcessor>(
194 new GrDistanceFieldLCDTextGeoProc(color, viewMatrix, tex, params, di stanceAdjust, 194 new GrDistanceFieldLCDTextGeoProc(color, viewMatrix, tex, params, di stanceAdjust,
195 flags, usesLocalCoords)); 195 flags, usesLocalCoords));
196 } 196 }
197 197
198 virtual ~GrDistanceFieldLCDTextGeoProc() {} 198 virtual ~GrDistanceFieldLCDTextGeoProc() {}
199 199
200 const char* name() const override { return "DistanceFieldLCDTexture"; } 200 const char* name() const override { return "DistanceFieldLCDText"; }
201 201
202 const Attribute* inPosition() const { return fInPosition; } 202 const Attribute* inPosition() const { return fInPosition; }
203 const Attribute* inColor() const { return fInColor; } 203 const Attribute* inColor() const { return fInColor; }
204 const Attribute* inTextureCoords() const { return fInTextureCoords; } 204 const Attribute* inTextureCoords() const { return fInTextureCoords; }
205 DistanceAdjust getDistanceAdjust() const { return fDistanceAdjust; } 205 DistanceAdjust getDistanceAdjust() const { return fDistanceAdjust; }
206 GrColor color() const { return fColor; } 206 GrColor color() const { return fColor; }
207 bool colorIgnored() const { return GrColor_ILLEGAL == fColor; } 207 bool colorIgnored() const { return GrColor_ILLEGAL == fColor; }
208 const SkMatrix& viewMatrix() const { return fViewMatrix; } 208 const SkMatrix& viewMatrix() const { return fViewMatrix; }
209 uint32_t getFlags() const { return fFlags; } 209 uint32_t getFlags() const { return fFlags; }
210 bool usesLocalCoords() const { return fUsesLocalCoords; } 210 bool usesLocalCoords() const { return fUsesLocalCoords; }
(...skipping 17 matching lines...) Expand all
228 const Attribute* fInColor; 228 const Attribute* fInColor;
229 const Attribute* fInTextureCoords; 229 const Attribute* fInTextureCoords;
230 bool fUsesLocalCoords; 230 bool fUsesLocalCoords;
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
OLDNEW
« no previous file with comments | « no previous file | src/gpu/effects/GrDistanceFieldGeoProc.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698