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

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

Issue 1316123003: Style Change: SkNEW->new; SkDELETE->delete (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 2015-08-26 (Wednesday) 15:59:00 EDT Created 5 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 | « src/gpu/batches/GrTInstanceBatch.h ('k') | src/gpu/effects/GrBezierEffect.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 GrBezierEffect_DEFINED 8 #ifndef GrBezierEffect_DEFINED
9 #define GrBezierEffect_DEFINED 9 #define GrBezierEffect_DEFINED
10 10
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 const GrPrimitiveEdgeType edgeType, 63 const GrPrimitiveEdgeType edgeType,
64 const GrCaps& caps, 64 const GrCaps& caps,
65 const SkMatrix& localMatrix, 65 const SkMatrix& localMatrix,
66 bool usesLocalCoords, 66 bool usesLocalCoords,
67 uint8_t coverage = 0xff) { 67 uint8_t coverage = 0xff) {
68 switch (edgeType) { 68 switch (edgeType) {
69 case kFillAA_GrProcessorEdgeType: 69 case kFillAA_GrProcessorEdgeType:
70 if (!caps.shaderCaps()->shaderDerivativeSupport()) { 70 if (!caps.shaderCaps()->shaderDerivativeSupport()) {
71 return NULL; 71 return NULL;
72 } 72 }
73 return SkNEW_ARGS(GrConicEffect, (color, viewMatrix, coverage, 73 return new GrConicEffect(color, viewMatrix, coverage, kFillAA_Gr ProcessorEdgeType,
74 kFillAA_GrProcessorEdgeType, 74 localMatrix, usesLocalCoords);
75 localMatrix, usesLocalCoords)) ;
76 case kHairlineAA_GrProcessorEdgeType: 75 case kHairlineAA_GrProcessorEdgeType:
77 if (!caps.shaderCaps()->shaderDerivativeSupport()) { 76 if (!caps.shaderCaps()->shaderDerivativeSupport()) {
78 return NULL; 77 return NULL;
79 } 78 }
80 return SkNEW_ARGS(GrConicEffect, (color, viewMatrix, coverage, 79 return new GrConicEffect(color, viewMatrix, coverage,
81 kHairlineAA_GrProcessorEdgeTyp e, 80 kHairlineAA_GrProcessorEdgeType, localM atrix,
82 localMatrix, usesLocalCoords)) ; 81 usesLocalCoords);
83 case kFillBW_GrProcessorEdgeType: 82 case kFillBW_GrProcessorEdgeType:
84 return SkNEW_ARGS(GrConicEffect, (color, viewMatrix, coverage, 83 return new GrConicEffect(color, viewMatrix, coverage, kFillBW_Gr ProcessorEdgeType,
85 kFillBW_GrProcessorEdgeType, 84 localMatrix, usesLocalCoords);
86 localMatrix, usesLocalCoords)) ;
87 default: 85 default:
88 return NULL; 86 return NULL;
89 } 87 }
90 } 88 }
91 89
92 virtual ~GrConicEffect(); 90 virtual ~GrConicEffect();
93 91
94 const char* name() const override { return "Conic"; } 92 const char* name() const override { return "Conic"; }
95 93
96 inline const Attribute* inPosition() const { return fInPosition; } 94 inline const Attribute* inPosition() const { return fInPosition; }
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 const GrPrimitiveEdgeType edgeType, 146 const GrPrimitiveEdgeType edgeType,
149 const GrCaps& caps, 147 const GrCaps& caps,
150 const SkMatrix& localMatrix, 148 const SkMatrix& localMatrix,
151 bool usesLocalCoords, 149 bool usesLocalCoords,
152 uint8_t coverage = 0xff) { 150 uint8_t coverage = 0xff) {
153 switch (edgeType) { 151 switch (edgeType) {
154 case kFillAA_GrProcessorEdgeType: 152 case kFillAA_GrProcessorEdgeType:
155 if (!caps.shaderCaps()->shaderDerivativeSupport()) { 153 if (!caps.shaderCaps()->shaderDerivativeSupport()) {
156 return NULL; 154 return NULL;
157 } 155 }
158 return SkNEW_ARGS(GrQuadEffect, (color, viewMatrix, coverage, 156 return new GrQuadEffect(color, viewMatrix, coverage, kFillAA_GrP rocessorEdgeType,
159 kFillAA_GrProcessorEdgeType, 157 localMatrix, usesLocalCoords);
160 localMatrix, usesLocalCoords));
161 case kHairlineAA_GrProcessorEdgeType: 158 case kHairlineAA_GrProcessorEdgeType:
162 if (!caps.shaderCaps()->shaderDerivativeSupport()) { 159 if (!caps.shaderCaps()->shaderDerivativeSupport()) {
163 return NULL; 160 return NULL;
164 } 161 }
165 return SkNEW_ARGS(GrQuadEffect, (color, viewMatrix, coverage, 162 return new GrQuadEffect(color, viewMatrix, coverage,
166 kHairlineAA_GrProcessorEdgeType , 163 kHairlineAA_GrProcessorEdgeType, localMa trix,
167 localMatrix, usesLocalCoords)); 164 usesLocalCoords);
168 case kFillBW_GrProcessorEdgeType: 165 case kFillBW_GrProcessorEdgeType:
169 return SkNEW_ARGS(GrQuadEffect, (color, viewMatrix, coverage, 166 return new GrQuadEffect(color, viewMatrix, coverage, kFillBW_GrP rocessorEdgeType,
170 kFillBW_GrProcessorEdgeType, 167 localMatrix, usesLocalCoords);
171 localMatrix, usesLocalCoords));
172 default: 168 default:
173 return NULL; 169 return NULL;
174 } 170 }
175 } 171 }
176 172
177 virtual ~GrQuadEffect(); 173 virtual ~GrQuadEffect();
178 174
179 const char* name() const override { return "Quad"; } 175 const char* name() const override { return "Quad"; }
180 176
181 inline const Attribute* inPosition() const { return fInPosition; } 177 inline const Attribute* inPosition() const { return fInPosition; }
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
232 public: 228 public:
233 static GrGeometryProcessor* Create(GrColor color, 229 static GrGeometryProcessor* Create(GrColor color,
234 const SkMatrix& viewMatrix, 230 const SkMatrix& viewMatrix,
235 const GrPrimitiveEdgeType edgeType, 231 const GrPrimitiveEdgeType edgeType,
236 const GrCaps& caps) { 232 const GrCaps& caps) {
237 switch (edgeType) { 233 switch (edgeType) {
238 case kFillAA_GrProcessorEdgeType: 234 case kFillAA_GrProcessorEdgeType:
239 if (!caps.shaderCaps()->shaderDerivativeSupport()) { 235 if (!caps.shaderCaps()->shaderDerivativeSupport()) {
240 return NULL; 236 return NULL;
241 } 237 }
242 return SkNEW_ARGS(GrCubicEffect, (color, viewMatrix, kFillAA_GrP rocessorEdgeType)); 238 return new GrCubicEffect(color, viewMatrix, kFillAA_GrProcessorE dgeType);
243 case kHairlineAA_GrProcessorEdgeType: 239 case kHairlineAA_GrProcessorEdgeType:
244 if (!caps.shaderCaps()->shaderDerivativeSupport()) { 240 if (!caps.shaderCaps()->shaderDerivativeSupport()) {
245 return NULL; 241 return NULL;
246 } 242 }
247 return SkNEW_ARGS(GrCubicEffect, (color, viewMatrix, 243 return new GrCubicEffect(color, viewMatrix, kHairlineAA_GrProces sorEdgeType);
248 kHairlineAA_GrProcessorEdgeTyp e));
249 case kFillBW_GrProcessorEdgeType: 244 case kFillBW_GrProcessorEdgeType:
250 return SkNEW_ARGS(GrCubicEffect, (color, viewMatrix, 245 return new GrCubicEffect(color, viewMatrix, kFillBW_GrProcessorE dgeType);
251 kFillBW_GrProcessorEdgeType));
252 default: 246 default:
253 return NULL; 247 return NULL;
254 } 248 }
255 } 249 }
256 250
257 virtual ~GrCubicEffect(); 251 virtual ~GrCubicEffect();
258 252
259 const char* name() const override { return "Cubic"; } 253 const char* name() const override { return "Cubic"; }
260 254
261 inline const Attribute* inPosition() const { return fInPosition; } 255 inline const Attribute* inPosition() const { return fInPosition; }
(...skipping 20 matching lines...) Expand all
282 GrPrimitiveEdgeType fEdgeType; 276 GrPrimitiveEdgeType fEdgeType;
283 const Attribute* fInPosition; 277 const Attribute* fInPosition;
284 const Attribute* fInCubicCoeffs; 278 const Attribute* fInCubicCoeffs;
285 279
286 GR_DECLARE_GEOMETRY_PROCESSOR_TEST; 280 GR_DECLARE_GEOMETRY_PROCESSOR_TEST;
287 281
288 typedef GrGeometryProcessor INHERITED; 282 typedef GrGeometryProcessor INHERITED;
289 }; 283 };
290 284
291 #endif 285 #endif
OLDNEW
« no previous file with comments | « src/gpu/batches/GrTInstanceBatch.h ('k') | src/gpu/effects/GrBezierEffect.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698