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 439 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
450 | 450 |
451 Geometry* geoData(int index) override { | 451 Geometry* geoData(int index) override { |
452 SkASSERT(0 == index); | 452 SkASSERT(0 == index); |
453 return &fGeometry; | 453 return &fGeometry; |
454 } | 454 } |
455 | 455 |
456 void onGenerateGeometry(GrBatchTarget* batchTarget, const GrPipeline* pipeli
ne) override { | 456 void onGenerateGeometry(GrBatchTarget* batchTarget, const GrPipeline* pipeli
ne) override { |
457 QuadHelper helper; | 457 QuadHelper helper; |
458 size_t vertexStride = this->geometryProcessor()->getVertexStride(); | 458 size_t vertexStride = this->geometryProcessor()->getVertexStride(); |
459 SkASSERT(vertexStride == sizeof(Vertex)); | 459 SkASSERT(vertexStride == sizeof(Vertex)); |
460 GrDrawTarget::DrawInfo drawInfo; | |
461 Vertex* verts = reinterpret_cast<Vertex*>(helper.init(batchTarget, verte
xStride, 1)); | 460 Vertex* verts = reinterpret_cast<Vertex*>(helper.init(batchTarget, verte
xStride, 1)); |
462 if (!verts) { | 461 if (!verts) { |
463 return; | 462 return; |
464 } | 463 } |
465 verts[0].fPosition.setRectFan(fGeometry.fBounds.fLeft, fGeometry.fBounds
.fTop, | 464 verts[0].fPosition.setRectFan(fGeometry.fBounds.fLeft, fGeometry.fBounds
.fTop, |
466 fGeometry.fBounds.fRight, fGeometry.fBound
s.fBottom, | 465 fGeometry.fBounds.fRight, fGeometry.fBound
s.fBottom, |
467 sizeof(Vertex)); | 466 sizeof(Vertex)); |
468 fDevToUV.apply<4, sizeof(Vertex), sizeof(SkPoint)>(verts); | 467 fDevToUV.apply<4, sizeof(Vertex), sizeof(SkPoint)>(verts); |
469 helper.issueDraws(batchTarget); | 468 helper.issueDraws(batchTarget); |
470 } | 469 } |
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
616 typedef GM INHERITED; | 615 typedef GM INHERITED; |
617 }; | 616 }; |
618 | 617 |
619 DEF_GM( return SkNEW(BezierCubicEffects); ) | 618 DEF_GM( return SkNEW(BezierCubicEffects); ) |
620 DEF_GM( return SkNEW(BezierConicEffects); ) | 619 DEF_GM( return SkNEW(BezierConicEffects); ) |
621 DEF_GM( return SkNEW(BezierQuadEffects); ) | 620 DEF_GM( return SkNEW(BezierQuadEffects); ) |
622 | 621 |
623 } | 622 } |
624 | 623 |
625 #endif | 624 #endif |
OLD | NEW |