OLD | NEW |
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 Loading... |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |