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

Side by Side Diff: gm/beziereffects.cpp

Issue 1121463002: Move bounds to GrBatch (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: tweaks Created 5 years, 7 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 | gm/convexpolyeffect.cpp » ('j') | src/gpu/GrAARectRenderer.cpp » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 1
2 /* 2 /*
3 * Copyright 2013 Google Inc. 3 * Copyright 2013 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 225 matching lines...) Expand 10 before | Expand all | Expand 10 after
236 GrPipelineBuilder pipelineBuilder; 236 GrPipelineBuilder pipelineBuilder;
237 pipelineBuilder.setRenderTarget(rt); 237 pipelineBuilder.setRenderTarget(rt);
238 238
239 BezierCubicOrConicTestBatch::Geometry geometry; 239 BezierCubicOrConicTestBatch::Geometry geometry;
240 geometry.fColor = gp->color(); 240 geometry.fColor = gp->color();
241 geometry.fBounds = bounds; 241 geometry.fBounds = bounds;
242 242
243 SkAutoTUnref<GrBatch> batch( 243 SkAutoTUnref<GrBatch> batch(
244 BezierCubicOrConicTestBatch::Create(gp, geometry, kl mEqs, klmSigns[c])); 244 BezierCubicOrConicTestBatch::Create(gp, geometry, kl mEqs, klmSigns[c]));
245 245
246 tt.target()->drawBatch(&pipelineBuilder, batch, NULL); 246 tt.target()->drawBatch(&pipelineBuilder, batch);
247 } 247 }
248 ++col; 248 ++col;
249 if (numCols == col) { 249 if (numCols == col) {
250 col = 0; 250 col = 0;
251 ++row; 251 ++row;
252 } 252 }
253 } 253 }
254 } 254 }
255 } 255 }
256 256
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
380 GrPipelineBuilder pipelineBuilder; 380 GrPipelineBuilder pipelineBuilder;
381 pipelineBuilder.setRenderTarget(rt); 381 pipelineBuilder.setRenderTarget(rt);
382 382
383 BezierCubicOrConicTestBatch::Geometry geometry; 383 BezierCubicOrConicTestBatch::Geometry geometry;
384 geometry.fColor = gp->color(); 384 geometry.fColor = gp->color();
385 geometry.fBounds = bounds; 385 geometry.fBounds = bounds;
386 386
387 SkAutoTUnref<GrBatch> batch( 387 SkAutoTUnref<GrBatch> batch(
388 BezierCubicOrConicTestBatch::Create(gp, geometry, kl mEqs, 1.f)); 388 BezierCubicOrConicTestBatch::Create(gp, geometry, kl mEqs, 1.f));
389 389
390 tt.target()->drawBatch(&pipelineBuilder, batch, NULL); 390 tt.target()->drawBatch(&pipelineBuilder, batch);
391 } 391 }
392 ++col; 392 ++col;
393 if (numCols == col) { 393 if (numCols == col) {
394 col = 0; 394 col = 0;
395 ++row; 395 ++row;
396 } 396 }
397 } 397 }
398 } 398 }
399 } 399 }
400 400
(...skipping 233 matching lines...) Expand 10 before | Expand all | Expand 10 after
634 pipelineBuilder.setRenderTarget(rt); 634 pipelineBuilder.setRenderTarget(rt);
635 635
636 GrPathUtils::QuadUVMatrix DevToUV(pts); 636 GrPathUtils::QuadUVMatrix DevToUV(pts);
637 637
638 BezierQuadTestBatch::Geometry geometry; 638 BezierQuadTestBatch::Geometry geometry;
639 geometry.fColor = gp->color(); 639 geometry.fColor = gp->color();
640 geometry.fBounds = bounds; 640 geometry.fBounds = bounds;
641 641
642 SkAutoTUnref<GrBatch> batch(BezierQuadTestBatch::Create(gp, geometry, DevToUV)); 642 SkAutoTUnref<GrBatch> batch(BezierQuadTestBatch::Create(gp, geometry, DevToUV));
643 643
644 tt.target()->drawBatch(&pipelineBuilder, batch, NULL); 644 tt.target()->drawBatch(&pipelineBuilder, batch);
645 } 645 }
646 ++col; 646 ++col;
647 if (numCols == col) { 647 if (numCols == col) {
648 col = 0; 648 col = 0;
649 ++row; 649 ++row;
650 } 650 }
651 } 651 }
652 } 652 }
653 } 653 }
654 654
655 private: 655 private:
656 typedef GM INHERITED; 656 typedef GM INHERITED;
657 }; 657 };
658 658
659 DEF_GM( return SkNEW(BezierCubicEffects); ) 659 DEF_GM( return SkNEW(BezierCubicEffects); )
660 DEF_GM( return SkNEW(BezierConicEffects); ) 660 DEF_GM( return SkNEW(BezierConicEffects); )
661 DEF_GM( return SkNEW(BezierQuadEffects); ) 661 DEF_GM( return SkNEW(BezierQuadEffects); )
662 662
663 } 663 }
664 664
665 #endif 665 #endif
OLDNEW
« no previous file with comments | « no previous file | gm/convexpolyeffect.cpp » ('j') | src/gpu/GrAARectRenderer.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698