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

Side by Side Diff: gm/convexpolyeffect.cpp

Issue 1306803003: Revert of Remove GrStagedProcessor, remove the word Stage as it applies to FPs (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 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 | « gm/constcolorprocessor.cpp ('k') | gm/rrects.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 /* 2 /*
3 * Copyright 2014 Google Inc. 3 * Copyright 2014 Google Inc.
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 8
9 // This test only works with the GPU backend. 9 // This test only works with the GPU backend.
10 10
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
184 SkPath p; 184 SkPath p;
185 path->transform(m, &p); 185 path->transform(m, &p);
186 186
187 GrPrimitiveEdgeType edgeType = (GrPrimitiveEdgeType) et; 187 GrPrimitiveEdgeType edgeType = (GrPrimitiveEdgeType) et;
188 SkAutoTUnref<GrFragmentProcessor> fp(GrConvexPolyEffect::Create( edgeType, p)); 188 SkAutoTUnref<GrFragmentProcessor> fp(GrConvexPolyEffect::Create( edgeType, p));
189 if (!fp) { 189 if (!fp) {
190 continue; 190 continue;
191 } 191 }
192 192
193 GrPipelineBuilder pipelineBuilder; 193 GrPipelineBuilder pipelineBuilder;
194 pipelineBuilder.addCoverageFragmentProcessor(fp); 194 pipelineBuilder.addCoverageProcessor(fp);
195 pipelineBuilder.setRenderTarget(rt); 195 pipelineBuilder.setRenderTarget(rt);
196 196
197 ConvexPolyTestBatch::Geometry geometry; 197 ConvexPolyTestBatch::Geometry geometry;
198 geometry.fColor = color.fColor; 198 geometry.fColor = color.fColor;
199 geometry.fBounds = p.getBounds(); 199 geometry.fBounds = p.getBounds();
200 200
201 SkAutoTUnref<GrDrawBatch> batch(ConvexPolyTestBatch::Create(gp, geometry)); 201 SkAutoTUnref<GrDrawBatch> batch(ConvexPolyTestBatch::Create(gp, geometry));
202 202
203 tt.target()->drawBatch(pipelineBuilder, batch); 203 tt.target()->drawBatch(pipelineBuilder, batch);
204 204
(...skipping 28 matching lines...) Expand all
233 } 233 }
234 SkRect rect = *iter.get(); 234 SkRect rect = *iter.get();
235 rect.offset(x, y); 235 rect.offset(x, y);
236 GrPrimitiveEdgeType edgeType = (GrPrimitiveEdgeType) et; 236 GrPrimitiveEdgeType edgeType = (GrPrimitiveEdgeType) et;
237 SkAutoTUnref<GrFragmentProcessor> fp(GrConvexPolyEffect::Create( edgeType, rect)); 237 SkAutoTUnref<GrFragmentProcessor> fp(GrConvexPolyEffect::Create( edgeType, rect));
238 if (!fp) { 238 if (!fp) {
239 continue; 239 continue;
240 } 240 }
241 241
242 GrPipelineBuilder pipelineBuilder; 242 GrPipelineBuilder pipelineBuilder;
243 pipelineBuilder.addCoverageFragmentProcessor(fp); 243 pipelineBuilder.addCoverageProcessor(fp);
244 pipelineBuilder.setRenderTarget(rt); 244 pipelineBuilder.setRenderTarget(rt);
245 245
246 ConvexPolyTestBatch::Geometry geometry; 246 ConvexPolyTestBatch::Geometry geometry;
247 geometry.fColor = color.fColor; 247 geometry.fColor = color.fColor;
248 geometry.fBounds = rect; 248 geometry.fBounds = rect;
249 249
250 SkAutoTUnref<GrDrawBatch> batch(ConvexPolyTestBatch::Create(gp, geometry)); 250 SkAutoTUnref<GrDrawBatch> batch(ConvexPolyTestBatch::Create(gp, geometry));
251 251
252 tt.target()->drawBatch(pipelineBuilder, batch); 252 tt.target()->drawBatch(pipelineBuilder, batch);
253 253
(...skipping 18 matching lines...) Expand all
272 SkTLList<SkPath> fPaths; 272 SkTLList<SkPath> fPaths;
273 SkTLList<SkRect> fRects; 273 SkTLList<SkRect> fRects;
274 274
275 typedef GM INHERITED; 275 typedef GM INHERITED;
276 }; 276 };
277 277
278 DEF_GM( return SkNEW(ConvexPolyEffect); ) 278 DEF_GM( return SkNEW(ConvexPolyEffect); )
279 } 279 }
280 280
281 #endif 281 #endif
OLDNEW
« no previous file with comments | « gm/constcolorprocessor.cpp ('k') | gm/rrects.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698