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 211 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
222 GrPipelineBuilder pipelineBuilder; | 222 GrPipelineBuilder pipelineBuilder; |
223 pipelineBuilder.setRenderTarget(rt); | 223 pipelineBuilder.setRenderTarget(rt); |
224 | 224 |
225 BezierCubicOrConicTestBatch::Geometry geometry; | 225 BezierCubicOrConicTestBatch::Geometry geometry; |
226 geometry.fColor = color; | 226 geometry.fColor = color; |
227 geometry.fBounds = bounds; | 227 geometry.fBounds = bounds; |
228 | 228 |
229 SkAutoTUnref<GrBatch> batch( | 229 SkAutoTUnref<GrBatch> batch( |
230 BezierCubicOrConicTestBatch::Create(gp, geometry, kl
mEqs, klmSigns[c])); | 230 BezierCubicOrConicTestBatch::Create(gp, geometry, kl
mEqs, klmSigns[c])); |
231 | 231 |
232 tt.target()->drawBatch(&pipelineBuilder, batch); | 232 tt.target()->drawBatch(pipelineBuilder, batch); |
233 } | 233 } |
234 ++col; | 234 ++col; |
235 if (numCols == col) { | 235 if (numCols == col) { |
236 col = 0; | 236 col = 0; |
237 ++row; | 237 ++row; |
238 } | 238 } |
239 } | 239 } |
240 } | 240 } |
241 } | 241 } |
242 | 242 |
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
367 GrPipelineBuilder pipelineBuilder; | 367 GrPipelineBuilder pipelineBuilder; |
368 pipelineBuilder.setRenderTarget(rt); | 368 pipelineBuilder.setRenderTarget(rt); |
369 | 369 |
370 BezierCubicOrConicTestBatch::Geometry geometry; | 370 BezierCubicOrConicTestBatch::Geometry geometry; |
371 geometry.fColor = color; | 371 geometry.fColor = color; |
372 geometry.fBounds = bounds; | 372 geometry.fBounds = bounds; |
373 | 373 |
374 SkAutoTUnref<GrBatch> batch( | 374 SkAutoTUnref<GrBatch> batch( |
375 BezierCubicOrConicTestBatch::Create(gp, geometry, kl
mEqs, 1.f)); | 375 BezierCubicOrConicTestBatch::Create(gp, geometry, kl
mEqs, 1.f)); |
376 | 376 |
377 tt.target()->drawBatch(&pipelineBuilder, batch); | 377 tt.target()->drawBatch(pipelineBuilder, batch); |
378 } | 378 } |
379 ++col; | 379 ++col; |
380 if (numCols == col) { | 380 if (numCols == col) { |
381 col = 0; | 381 col = 0; |
382 ++row; | 382 ++row; |
383 } | 383 } |
384 } | 384 } |
385 } | 385 } |
386 } | 386 } |
387 | 387 |
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
605 pipelineBuilder.setRenderTarget(rt); | 605 pipelineBuilder.setRenderTarget(rt); |
606 | 606 |
607 GrPathUtils::QuadUVMatrix DevToUV(pts); | 607 GrPathUtils::QuadUVMatrix DevToUV(pts); |
608 | 608 |
609 BezierQuadTestBatch::Geometry geometry; | 609 BezierQuadTestBatch::Geometry geometry; |
610 geometry.fColor = color; | 610 geometry.fColor = color; |
611 geometry.fBounds = bounds; | 611 geometry.fBounds = bounds; |
612 | 612 |
613 SkAutoTUnref<GrBatch> batch(BezierQuadTestBatch::Create(gp,
geometry, DevToUV)); | 613 SkAutoTUnref<GrBatch> batch(BezierQuadTestBatch::Create(gp,
geometry, DevToUV)); |
614 | 614 |
615 tt.target()->drawBatch(&pipelineBuilder, batch); | 615 tt.target()->drawBatch(pipelineBuilder, batch); |
616 } | 616 } |
617 ++col; | 617 ++col; |
618 if (numCols == col) { | 618 if (numCols == col) { |
619 col = 0; | 619 col = 0; |
620 ++row; | 620 ++row; |
621 } | 621 } |
622 } | 622 } |
623 } | 623 } |
624 } | 624 } |
625 | 625 |
626 private: | 626 private: |
627 typedef GM INHERITED; | 627 typedef GM INHERITED; |
628 }; | 628 }; |
629 | 629 |
630 DEF_GM( return SkNEW(BezierCubicEffects); ) | 630 DEF_GM( return SkNEW(BezierCubicEffects); ) |
631 DEF_GM( return SkNEW(BezierConicEffects); ) | 631 DEF_GM( return SkNEW(BezierConicEffects); ) |
632 DEF_GM( return SkNEW(BezierQuadEffects); ) | 632 DEF_GM( return SkNEW(BezierQuadEffects); ) |
633 | 633 |
634 } | 634 } |
635 | 635 |
636 #endif | 636 #endif |
OLD | NEW |