OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2012 Google Inc. | 2 * Copyright 2012 Google Inc. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
6 */ | 6 */ |
7 | 7 |
8 #include "GrAARectRenderer.h" | 8 #include "GrAARectRenderer.h" |
9 #include "GrBatch.h" | 9 #include "GrBatch.h" |
10 #include "GrBatchTarget.h" | 10 #include "GrBatchTarget.h" |
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
133 this->generateAAFillRectGeometry(vertices, | 133 this->generateAAFillRectGeometry(vertices, |
134 i * kVertsPerAAFillRect * vertexStr
ide, | 134 i * kVertsPerAAFillRect * vertexStr
ide, |
135 vertexStride, | 135 vertexStride, |
136 args.fColor, | 136 args.fColor, |
137 args.fViewMatrix, | 137 args.fViewMatrix, |
138 args.fRect, | 138 args.fRect, |
139 args.fDevRect, | 139 args.fDevRect, |
140 canTweakAlphaForCoverage); | 140 canTweakAlphaForCoverage); |
141 } | 141 } |
142 | 142 |
143 helper.issueDraws(batchTarget); | 143 helper.issueDraw(batchTarget); |
144 } | 144 } |
145 | 145 |
146 SkSTArray<1, Geometry, true>* geoData() { return &fGeoData; } | 146 SkSTArray<1, Geometry, true>* geoData() { return &fGeoData; } |
147 | 147 |
148 private: | 148 private: |
149 AAFillRectBatch(const Geometry& geometry) { | 149 AAFillRectBatch(const Geometry& geometry) { |
150 this->initClassID<AAFillRectBatch>(); | 150 this->initClassID<AAFillRectBatch>(); |
151 fGeoData.push_back(geometry); | 151 fGeoData.push_back(geometry); |
152 | 152 |
153 this->setBounds(geometry.fDevRect); | 153 this->setBounds(geometry.fDevRect); |
(...skipping 344 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
498 vertexStride, | 498 vertexStride, |
499 outerVertexNum, | 499 outerVertexNum, |
500 innerVertexNum, | 500 innerVertexNum, |
501 args.fColor, | 501 args.fColor, |
502 args.fDevOutside, | 502 args.fDevOutside, |
503 args.fDevOutsideAssist, | 503 args.fDevOutsideAssist, |
504 args.fDevInside, | 504 args.fDevInside, |
505 args.fMiterStroke, | 505 args.fMiterStroke, |
506 canTweakAlphaForCoverage); | 506 canTweakAlphaForCoverage); |
507 } | 507 } |
508 helper.issueDraws(batchTarget); | 508 helper.issueDraw(batchTarget); |
509 } | 509 } |
510 | 510 |
511 SkSTArray<1, Geometry, true>* geoData() { return &fGeoData; } | 511 SkSTArray<1, Geometry, true>* geoData() { return &fGeoData; } |
512 | 512 |
513 private: | 513 private: |
514 AAStrokeRectBatch(const Geometry& geometry, const SkMatrix& viewMatrix) { | 514 AAStrokeRectBatch(const Geometry& geometry, const SkMatrix& viewMatrix) { |
515 this->initClassID<AAStrokeRectBatch>(); | 515 this->initClassID<AAStrokeRectBatch>(); |
516 fBatch.fViewMatrix = viewMatrix; | 516 fBatch.fViewMatrix = viewMatrix; |
517 fGeoData.push_back(geometry); | 517 fGeoData.push_back(geometry); |
518 | 518 |
(...skipping 336 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
855 geo.fColor = GrRandomColor(random); | 855 geo.fColor = GrRandomColor(random); |
856 geo.fDevOutside = outside; | 856 geo.fDevOutside = outside; |
857 geo.fDevOutsideAssist = outsideAssist; | 857 geo.fDevOutsideAssist = outsideAssist; |
858 geo.fDevInside = inside; | 858 geo.fDevInside = inside; |
859 geo.fMiterStroke = miterStroke; | 859 geo.fMiterStroke = miterStroke; |
860 | 860 |
861 return AAStrokeRectBatch::Create(geo, GrTest::TestMatrix(random)); | 861 return AAStrokeRectBatch::Create(geo, GrTest::TestMatrix(random)); |
862 } | 862 } |
863 | 863 |
864 #endif | 864 #endif |
OLD | NEW |