| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2015 Google Inc. | 2 * Copyright 2015 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 "GrPLSPathRenderer.h" | 8 #include "GrPLSPathRenderer.h" |
| 9 | 9 |
| 10 #include "SkChunkAlloc.h" | 10 #include "SkChunkAlloc.h" |
| (...skipping 412 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 423 fInPosition = &this->addVertexAttrib(Attribute("inPosition", kVec2f_GrVe
rtexAttribType, | 423 fInPosition = &this->addVertexAttrib(Attribute("inPosition", kVec2f_GrVe
rtexAttribType, |
| 424 kHigh_GrSLPrecision)); | 424 kHigh_GrSLPrecision)); |
| 425 fInVertex1 = &this->addVertexAttrib(Attribute("inVertex1", kVec2f_GrVert
exAttribType, | 425 fInVertex1 = &this->addVertexAttrib(Attribute("inVertex1", kVec2f_GrVert
exAttribType, |
| 426 kHigh_GrSLPrecision)); | 426 kHigh_GrSLPrecision)); |
| 427 fInVertex2 = &this->addVertexAttrib(Attribute("inVertex2", kVec2f_GrVert
exAttribType, | 427 fInVertex2 = &this->addVertexAttrib(Attribute("inVertex2", kVec2f_GrVert
exAttribType, |
| 428 kHigh_GrSLPrecision)); | 428 kHigh_GrSLPrecision)); |
| 429 fInVertex3 = &this->addVertexAttrib(Attribute("inVertex3", kVec2f_GrVert
exAttribType, | 429 fInVertex3 = &this->addVertexAttrib(Attribute("inVertex3", kVec2f_GrVert
exAttribType, |
| 430 kHigh_GrSLPrecision)); | 430 kHigh_GrSLPrecision)); |
| 431 fInWindings = &this->addVertexAttrib(Attribute("inWindings", kInt_GrVert
exAttribType, | 431 fInWindings = &this->addVertexAttrib(Attribute("inWindings", kInt_GrVert
exAttribType, |
| 432 kLow_GrSLPrecision)); | 432 kLow_GrSLPrecision)); |
| 433 this->setWillReadFragmentPosition(); | 433 this->enableBuiltInState(kFragmentPosition_BuiltInState); |
| 434 } | 434 } |
| 435 | 435 |
| 436 const Attribute* fInPosition; | 436 const Attribute* fInPosition; |
| 437 const Attribute* fInVertex1; | 437 const Attribute* fInVertex1; |
| 438 const Attribute* fInVertex2; | 438 const Attribute* fInVertex2; |
| 439 const Attribute* fInVertex3; | 439 const Attribute* fInVertex3; |
| 440 const Attribute* fInWindings; | 440 const Attribute* fInWindings; |
| 441 SkMatrix fLocalMatrix; | 441 SkMatrix fLocalMatrix; |
| 442 bool fUsesLocalCoords; | 442 bool fUsesLocalCoords; |
| 443 | 443 |
| (...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 612 fInPosition = &this->addVertexAttrib(Attribute("inPosition", kVec2f_GrVe
rtexAttribType, | 612 fInPosition = &this->addVertexAttrib(Attribute("inPosition", kVec2f_GrVe
rtexAttribType, |
| 613 kHigh_GrSLPrecision)); | 613 kHigh_GrSLPrecision)); |
| 614 fInUV = &this->addVertexAttrib(Attribute("inUV", kVec2f_GrVertexAttribTy
pe, | 614 fInUV = &this->addVertexAttrib(Attribute("inUV", kVec2f_GrVertexAttribTy
pe, |
| 615 kHigh_GrSLPrecision)); | 615 kHigh_GrSLPrecision)); |
| 616 fInEndpoint1 = &this->addVertexAttrib(Attribute("inEndpoint1", kVec2f_Gr
VertexAttribType, | 616 fInEndpoint1 = &this->addVertexAttrib(Attribute("inEndpoint1", kVec2f_Gr
VertexAttribType, |
| 617 kHigh_GrSLPrecision)); | 617 kHigh_GrSLPrecision)); |
| 618 fInEndpoint2 = &this->addVertexAttrib(Attribute("inEndpoint2", kVec2f_Gr
VertexAttribType, | 618 fInEndpoint2 = &this->addVertexAttrib(Attribute("inEndpoint2", kVec2f_Gr
VertexAttribType, |
| 619 kHigh_GrSLPrecision)); | 619 kHigh_GrSLPrecision)); |
| 620 fInWindings = &this->addVertexAttrib(Attribute("inWindings", kInt_GrVer
texAttribType, | 620 fInWindings = &this->addVertexAttrib(Attribute("inWindings", kInt_GrVer
texAttribType, |
| 621 kLow_GrSLPrecision)); | 621 kLow_GrSLPrecision)); |
| 622 this->setWillReadFragmentPosition(); | 622 this->enableBuiltInState(kFragmentPosition_BuiltInState); |
| 623 } | 623 } |
| 624 | 624 |
| 625 const Attribute* fInPosition; | 625 const Attribute* fInPosition; |
| 626 const Attribute* fInUV; | 626 const Attribute* fInUV; |
| 627 const Attribute* fInEndpoint1; | 627 const Attribute* fInEndpoint1; |
| 628 const Attribute* fInEndpoint2; | 628 const Attribute* fInEndpoint2; |
| 629 const Attribute* fInWindings; | 629 const Attribute* fInWindings; |
| 630 SkMatrix fLocalMatrix; | 630 SkMatrix fLocalMatrix; |
| 631 bool fUsesLocalCoords; | 631 bool fUsesLocalCoords; |
| 632 | 632 |
| (...skipping 369 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1002 DRAW_BATCH_TEST_DEFINE(PLSPathBatch) { | 1002 DRAW_BATCH_TEST_DEFINE(PLSPathBatch) { |
| 1003 PLSPathBatch::Geometry geometry; | 1003 PLSPathBatch::Geometry geometry; |
| 1004 geometry.fColor = GrRandomColor(random); | 1004 geometry.fColor = GrRandomColor(random); |
| 1005 geometry.fViewMatrix = GrTest::TestMatrixInvertible(random); | 1005 geometry.fViewMatrix = GrTest::TestMatrixInvertible(random); |
| 1006 geometry.fPath = GrTest::TestPathConvex(random); | 1006 geometry.fPath = GrTest::TestPathConvex(random); |
| 1007 | 1007 |
| 1008 return PLSPathBatch::Create(geometry); | 1008 return PLSPathBatch::Create(geometry); |
| 1009 } | 1009 } |
| 1010 | 1010 |
| 1011 #endif | 1011 #endif |
| OLD | NEW |