OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright 2013 Google Inc. | 2 * Copyright 2013 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 "GrOvalRenderer.h" | 8 #include "GrOvalRenderer.h" |
9 | 9 |
10 #include "GrBatch.h" | 10 #include "GrBatch.h" |
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
176 const GrGLSLCaps&) const ov erride { | 176 const GrGLSLCaps&) const ov erride { |
177 return SkNEW_ARGS(GLProcessor, (*this, bt)); | 177 return SkNEW_ARGS(GLProcessor, (*this, bt)); |
178 } | 178 } |
179 | 179 |
180 private: | 180 private: |
181 CircleEdgeEffect(GrColor color, bool stroke, const SkMatrix& localMatrix, bo ol usesLocalCoords) | 181 CircleEdgeEffect(GrColor color, bool stroke, const SkMatrix& localMatrix, bo ol usesLocalCoords) |
182 : fColor(color) | 182 : fColor(color) |
183 , fLocalMatrix(localMatrix) | 183 , fLocalMatrix(localMatrix) |
184 , fUsesLocalCoords(usesLocalCoords) { | 184 , fUsesLocalCoords(usesLocalCoords) { |
185 this->initClassID<CircleEdgeEffect>(); | 185 this->initClassID<CircleEdgeEffect>(); |
186 fInPosition = &this->addVertexAttrib(Attribute("inPosition", kVec2f_GrVe rtexAttribType)); | 186 fInPosition = &this->addVertexAttrib(Attribute("inPosition", kVec2f_GrVe rtexAttribType, kHigh_GrSLPrecision)); |
joshualitt
2015/05/20 20:36:10
newline
Stephen White
2015/05/20 20:47:43
Done.
| |
187 fInCircleEdge = &this->addVertexAttrib(Attribute("inCircleEdge", | 187 fInCircleEdge = &this->addVertexAttrib(Attribute("inCircleEdge", |
188 kVec4f_GrVertexAttrib Type)); | 188 kVec4f_GrVertexAttrib Type)); |
189 fStroke = stroke; | 189 fStroke = stroke; |
190 } | 190 } |
191 | 191 |
192 GrColor fColor; | 192 GrColor fColor; |
193 SkMatrix fLocalMatrix; | 193 SkMatrix fLocalMatrix; |
194 const Attribute* fInPosition; | 194 const Attribute* fInPosition; |
195 const Attribute* fInCircleEdge; | 195 const Attribute* fInCircleEdge; |
196 bool fStroke; | 196 bool fStroke; |
(...skipping 352 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
549 return SkNEW_ARGS(GLProcessor, (*this, bt)); | 549 return SkNEW_ARGS(GLProcessor, (*this, bt)); |
550 } | 550 } |
551 | 551 |
552 private: | 552 private: |
553 DIEllipseEdgeEffect(GrColor color, const SkMatrix& viewMatrix, Mode mode, | 553 DIEllipseEdgeEffect(GrColor color, const SkMatrix& viewMatrix, Mode mode, |
554 bool usesLocalCoords) | 554 bool usesLocalCoords) |
555 : fColor(color) | 555 : fColor(color) |
556 , fViewMatrix(viewMatrix) | 556 , fViewMatrix(viewMatrix) |
557 , fUsesLocalCoords(usesLocalCoords) { | 557 , fUsesLocalCoords(usesLocalCoords) { |
558 this->initClassID<DIEllipseEdgeEffect>(); | 558 this->initClassID<DIEllipseEdgeEffect>(); |
559 fInPosition = &this->addVertexAttrib(Attribute("inPosition", kVec2f_GrVe rtexAttribType)); | 559 fInPosition = &this->addVertexAttrib(Attribute("inPosition", kVec2f_GrVe rtexAttribType, kHigh_GrSLPrecision)); |
joshualitt
2015/05/20 20:36:10
newline
Stephen White
2015/05/20 20:47:43
Done.
| |
560 fInEllipseOffsets0 = &this->addVertexAttrib(Attribute("inEllipseOffsets0 ", | 560 fInEllipseOffsets0 = &this->addVertexAttrib(Attribute("inEllipseOffsets0 ", |
561 kVec2f_GrVertexAtt ribType)); | 561 kVec2f_GrVertexAtt ribType)); |
562 fInEllipseOffsets1 = &this->addVertexAttrib(Attribute("inEllipseOffsets1 ", | 562 fInEllipseOffsets1 = &this->addVertexAttrib(Attribute("inEllipseOffsets1 ", |
563 kVec2f_GrVertexAtt ribType)); | 563 kVec2f_GrVertexAtt ribType)); |
564 fMode = mode; | 564 fMode = mode; |
565 } | 565 } |
566 | 566 |
567 const Attribute* fInPosition; | 567 const Attribute* fInPosition; |
568 const Attribute* fInEllipseOffsets0; | 568 const Attribute* fInEllipseOffsets0; |
569 const Attribute* fInEllipseOffsets1; | 569 const Attribute* fInEllipseOffsets1; |
(...skipping 1448 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2018 } | 2018 } |
2019 | 2019 |
2020 BATCH_TEST_DEFINE(RRectBatch) { | 2020 BATCH_TEST_DEFINE(RRectBatch) { |
2021 SkMatrix viewMatrix = GrTest::TestMatrixRectStaysRect(random); | 2021 SkMatrix viewMatrix = GrTest::TestMatrixRectStaysRect(random); |
2022 GrColor color = GrRandomColor(random); | 2022 GrColor color = GrRandomColor(random); |
2023 const SkRRect& rrect = GrTest::TestRRectSimple(random); | 2023 const SkRRect& rrect = GrTest::TestRRectSimple(random); |
2024 return create_rrect_batch(color, viewMatrix, rrect, GrTest::TestStrokeRec(ra ndom)); | 2024 return create_rrect_batch(color, viewMatrix, rrect, GrTest::TestStrokeRec(ra ndom)); |
2025 } | 2025 } |
2026 | 2026 |
2027 #endif | 2027 #endif |
OLD | NEW |