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 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
63 Geometry* geoData(int index) override { | 63 Geometry* geoData(int index) override { |
64 SkASSERT(0 == index); | 64 SkASSERT(0 == index); |
65 return &fGeometry; | 65 return &fGeometry; |
66 } | 66 } |
67 | 67 |
68 const Geometry* geoData(int index) const override { | 68 const Geometry* geoData(int index) const override { |
69 SkASSERT(0 == index); | 69 SkASSERT(0 == index); |
70 return &fGeometry; | 70 return &fGeometry; |
71 } | 71 } |
72 | 72 |
73 void generateGeometry(Target* target) override { | 73 void generateGeometry(Target* target) const override { |
74 QuadHelper helper; | 74 QuadHelper helper; |
75 size_t vertexStride = this->geometryProcessor()->getVertexStride(); | 75 size_t vertexStride = this->geometryProcessor()->getVertexStride(); |
76 SkASSERT(vertexStride == sizeof(Vertex)); | 76 SkASSERT(vertexStride == sizeof(Vertex)); |
77 Vertex* verts = reinterpret_cast<Vertex*>(helper.init(target, vertexStri
de, 1)); | 77 Vertex* verts = reinterpret_cast<Vertex*>(helper.init(target, vertexStri
de, 1)); |
78 if (!verts) { | 78 if (!verts) { |
79 return; | 79 return; |
80 } | 80 } |
81 | 81 |
82 verts[0].fPosition.setRectFan(fGeometry.fBounds.fLeft, fGeometry.fBounds
.fTop, | 82 verts[0].fPosition.setRectFan(fGeometry.fBounds.fLeft, fGeometry.fBounds
.fTop, |
83 fGeometry.fBounds.fRight, fGeometry.fBound
s.fBottom, | 83 fGeometry.fBounds.fRight, fGeometry.fBound
s.fBottom, |
(...skipping 379 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
463 Geometry* geoData(int index) override { | 463 Geometry* geoData(int index) override { |
464 SkASSERT(0 == index); | 464 SkASSERT(0 == index); |
465 return &fGeometry; | 465 return &fGeometry; |
466 } | 466 } |
467 | 467 |
468 const Geometry* geoData(int index) const override { | 468 const Geometry* geoData(int index) const override { |
469 SkASSERT(0 == index); | 469 SkASSERT(0 == index); |
470 return &fGeometry; | 470 return &fGeometry; |
471 } | 471 } |
472 | 472 |
473 void generateGeometry(Target* target) override { | 473 void generateGeometry(Target* target) const override { |
474 QuadHelper helper; | 474 QuadHelper helper; |
475 size_t vertexStride = this->geometryProcessor()->getVertexStride(); | 475 size_t vertexStride = this->geometryProcessor()->getVertexStride(); |
476 SkASSERT(vertexStride == sizeof(Vertex)); | 476 SkASSERT(vertexStride == sizeof(Vertex)); |
477 Vertex* verts = reinterpret_cast<Vertex*>(helper.init(target, vertexStri
de, 1)); | 477 Vertex* verts = reinterpret_cast<Vertex*>(helper.init(target, vertexStri
de, 1)); |
478 if (!verts) { | 478 if (!verts) { |
479 return; | 479 return; |
480 } | 480 } |
481 verts[0].fPosition.setRectFan(fGeometry.fBounds.fLeft, fGeometry.fBounds
.fTop, | 481 verts[0].fPosition.setRectFan(fGeometry.fBounds.fLeft, fGeometry.fBounds
.fTop, |
482 fGeometry.fBounds.fRight, fGeometry.fBound
s.fBottom, | 482 fGeometry.fBounds.fRight, fGeometry.fBound
s.fBottom, |
483 sizeof(Vertex)); | 483 sizeof(Vertex)); |
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
635 private: | 635 private: |
636 typedef GM INHERITED; | 636 typedef GM INHERITED; |
637 }; | 637 }; |
638 | 638 |
639 DEF_GM(return new BezierCubicEffects;) | 639 DEF_GM(return new BezierCubicEffects;) |
640 DEF_GM(return new BezierConicEffects;) | 640 DEF_GM(return new BezierConicEffects;) |
641 DEF_GM(return new BezierQuadEffects;) | 641 DEF_GM(return new BezierQuadEffects;) |
642 } | 642 } |
643 | 643 |
644 #endif | 644 #endif |
OLD | NEW |