| 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 "GrBezierEffect.h" | 8 #include "GrBezierEffect.h" | 
| 9 | 9 | 
| 10 #include "gl/GrGLFragmentProcessor.h" | 10 #include "gl/GrGLFragmentProcessor.h" | 
| (...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 210     fInPosition = &this->addVertexAttrib(Attribute("inPosition", kVec2f_GrVertex
     AttribType, | 210     fInPosition = &this->addVertexAttrib(Attribute("inPosition", kVec2f_GrVertex
     AttribType, | 
| 211                                                    kHigh_GrSLPrecision)); | 211                                                    kHigh_GrSLPrecision)); | 
| 212     fInConicCoeffs = &this->addVertexAttrib(Attribute("inConicCoeffs", | 212     fInConicCoeffs = &this->addVertexAttrib(Attribute("inConicCoeffs", | 
| 213                                                       kVec4f_GrVertexAttribType)
     ); | 213                                                       kVec4f_GrVertexAttribType)
     ); | 
| 214 } | 214 } | 
| 215 | 215 | 
| 216 ////////////////////////////////////////////////////////////////////////////// | 216 ////////////////////////////////////////////////////////////////////////////// | 
| 217 | 217 | 
| 218 GR_DEFINE_GEOMETRY_PROCESSOR_TEST(GrConicEffect); | 218 GR_DEFINE_GEOMETRY_PROCESSOR_TEST(GrConicEffect); | 
| 219 | 219 | 
| 220 const GrGeometryProcessor* GrConicEffect::TestCreate(GrProcessorTestData* d) { | 220 GrGeometryProcessor* GrConicEffect::TestCreate(GrProcessorTestData* d) { | 
| 221     GrGeometryProcessor* gp; | 221     GrGeometryProcessor* gp; | 
| 222     do { | 222     do { | 
| 223         GrPrimitiveEdgeType edgeType = | 223         GrPrimitiveEdgeType edgeType = | 
| 224                 static_cast<GrPrimitiveEdgeType>( | 224                 static_cast<GrPrimitiveEdgeType>( | 
| 225                         d->fRandom->nextULessThan(kGrProcessorEdgeTypeCnt)); | 225                         d->fRandom->nextULessThan(kGrProcessorEdgeTypeCnt)); | 
| 226         gp = GrConicEffect::Create(GrRandomColor(d->fRandom), GrTest::TestMatrix
     (d->fRandom), | 226         gp = GrConicEffect::Create(GrRandomColor(d->fRandom), GrTest::TestMatrix
     (d->fRandom), | 
| 227                                    edgeType, *d->fCaps, | 227                                    edgeType, *d->fCaps, | 
| 228                                    GrTest::TestMatrix(d->fRandom), d->fRandom->n
     extBool()); | 228                                    GrTest::TestMatrix(d->fRandom), d->fRandom->n
     extBool()); | 
| 229     } while (nullptr == gp); | 229     } while (nullptr == gp); | 
| 230     return gp; | 230     return gp; | 
| (...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 418     fInPosition = &this->addVertexAttrib(Attribute("inPosition", kVec2f_GrVertex
     AttribType, | 418     fInPosition = &this->addVertexAttrib(Attribute("inPosition", kVec2f_GrVertex
     AttribType, | 
| 419                                                    kHigh_GrSLPrecision)); | 419                                                    kHigh_GrSLPrecision)); | 
| 420     fInHairQuadEdge = &this->addVertexAttrib(Attribute("inHairQuadEdge", | 420     fInHairQuadEdge = &this->addVertexAttrib(Attribute("inHairQuadEdge", | 
| 421                                                         kVec4f_GrVertexAttribTyp
     e)); | 421                                                         kVec4f_GrVertexAttribTyp
     e)); | 
| 422 } | 422 } | 
| 423 | 423 | 
| 424 ////////////////////////////////////////////////////////////////////////////// | 424 ////////////////////////////////////////////////////////////////////////////// | 
| 425 | 425 | 
| 426 GR_DEFINE_GEOMETRY_PROCESSOR_TEST(GrQuadEffect); | 426 GR_DEFINE_GEOMETRY_PROCESSOR_TEST(GrQuadEffect); | 
| 427 | 427 | 
| 428 const GrGeometryProcessor* GrQuadEffect::TestCreate(GrProcessorTestData* d) { | 428 GrGeometryProcessor* GrQuadEffect::TestCreate(GrProcessorTestData* d) { | 
| 429     GrGeometryProcessor* gp; | 429     GrGeometryProcessor* gp; | 
| 430     do { | 430     do { | 
| 431         GrPrimitiveEdgeType edgeType = static_cast<GrPrimitiveEdgeType>( | 431         GrPrimitiveEdgeType edgeType = static_cast<GrPrimitiveEdgeType>( | 
| 432                 d->fRandom->nextULessThan(kGrProcessorEdgeTypeCnt)); | 432                 d->fRandom->nextULessThan(kGrProcessorEdgeTypeCnt)); | 
| 433         gp = GrQuadEffect::Create(GrRandomColor(d->fRandom), | 433         gp = GrQuadEffect::Create(GrRandomColor(d->fRandom), | 
| 434                                   GrTest::TestMatrix(d->fRandom), | 434                                   GrTest::TestMatrix(d->fRandom), | 
| 435                                   edgeType, *d->fCaps, | 435                                   edgeType, *d->fCaps, | 
| 436                                   GrTest::TestMatrix(d->fRandom), | 436                                   GrTest::TestMatrix(d->fRandom), | 
| 437                                   d->fRandom->nextBool()); | 437                                   d->fRandom->nextBool()); | 
| 438     } while (nullptr == gp); | 438     } while (nullptr == gp); | 
| (...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 638     fInPosition = &this->addVertexAttrib(Attribute("inPosition", kVec2f_GrVertex
     AttribType, | 638     fInPosition = &this->addVertexAttrib(Attribute("inPosition", kVec2f_GrVertex
     AttribType, | 
| 639                                                    kHigh_GrSLPrecision)); | 639                                                    kHigh_GrSLPrecision)); | 
| 640     fInCubicCoeffs = &this->addVertexAttrib(Attribute("inCubicCoeffs", | 640     fInCubicCoeffs = &this->addVertexAttrib(Attribute("inCubicCoeffs", | 
| 641                                                         kVec4f_GrVertexAttribTyp
     e)); | 641                                                         kVec4f_GrVertexAttribTyp
     e)); | 
| 642 } | 642 } | 
| 643 | 643 | 
| 644 ////////////////////////////////////////////////////////////////////////////// | 644 ////////////////////////////////////////////////////////////////////////////// | 
| 645 | 645 | 
| 646 GR_DEFINE_GEOMETRY_PROCESSOR_TEST(GrCubicEffect); | 646 GR_DEFINE_GEOMETRY_PROCESSOR_TEST(GrCubicEffect); | 
| 647 | 647 | 
| 648 const GrGeometryProcessor* GrCubicEffect::TestCreate(GrProcessorTestData* d) { | 648 GrGeometryProcessor* GrCubicEffect::TestCreate(GrProcessorTestData* d) { | 
| 649     GrGeometryProcessor* gp; | 649     GrGeometryProcessor* gp; | 
| 650     do { | 650     do { | 
| 651         GrPrimitiveEdgeType edgeType = | 651         GrPrimitiveEdgeType edgeType = | 
| 652                 static_cast<GrPrimitiveEdgeType>( | 652                 static_cast<GrPrimitiveEdgeType>( | 
| 653                         d->fRandom->nextULessThan(kGrProcessorEdgeTypeCnt)); | 653                         d->fRandom->nextULessThan(kGrProcessorEdgeTypeCnt)); | 
| 654         gp = GrCubicEffect::Create(GrRandomColor(d->fRandom), | 654         gp = GrCubicEffect::Create(GrRandomColor(d->fRandom), | 
| 655                                    GrTest::TestMatrix(d->fRandom), edgeType, *d-
     >fCaps); | 655                                    GrTest::TestMatrix(d->fRandom), edgeType, *d-
     >fCaps); | 
| 656     } while (nullptr == gp); | 656     } while (nullptr == gp); | 
| 657     return gp; | 657     return gp; | 
| 658 } | 658 } | 
| 659 | 659 | 
| OLD | NEW | 
|---|