| 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/GrGLProcessor.h" | 10 #include "gl/GrGLProcessor.h" |
| (...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 204 fInConicCoeffs = &this->addVertexAttrib(Attribute("inConicCoeffs", | 204 fInConicCoeffs = &this->addVertexAttrib(Attribute("inConicCoeffs", |
| 205 kVec4f_GrVertexAttribType)
); | 205 kVec4f_GrVertexAttribType)
); |
| 206 } | 206 } |
| 207 | 207 |
| 208 ////////////////////////////////////////////////////////////////////////////// | 208 ////////////////////////////////////////////////////////////////////////////// |
| 209 | 209 |
| 210 GR_DEFINE_GEOMETRY_PROCESSOR_TEST(GrConicEffect); | 210 GR_DEFINE_GEOMETRY_PROCESSOR_TEST(GrConicEffect); |
| 211 | 211 |
| 212 GrGeometryProcessor* GrConicEffect::TestCreate(SkRandom* random, | 212 GrGeometryProcessor* GrConicEffect::TestCreate(SkRandom* random, |
| 213 GrContext*, | 213 GrContext*, |
| 214 const GrDrawTargetCaps& caps, | 214 const GrCaps& caps, |
| 215 GrTexture*[]) { | 215 GrTexture*[]) { |
| 216 GrGeometryProcessor* gp; | 216 GrGeometryProcessor* gp; |
| 217 do { | 217 do { |
| 218 GrPrimitiveEdgeType edgeType = static_cast<GrPrimitiveEdgeType>( | 218 GrPrimitiveEdgeType edgeType = static_cast<GrPrimitiveEdgeType>( |
| 219 random->nextULessThan(kGrPro
cessorEdgeTypeCnt)); | 219 random->nextULessThan(kGrPro
cessorEdgeTypeCnt)); |
| 220 gp = GrConicEffect::Create(GrRandomColor(random), GrTest::TestMatrix(ran
dom), | 220 gp = GrConicEffect::Create(GrRandomColor(random), GrTest::TestMatrix(ran
dom), |
| 221 edgeType, caps, | 221 edgeType, caps, |
| 222 GrTest::TestMatrix(random), random->nextBool(
)); | 222 GrTest::TestMatrix(random), random->nextBool(
)); |
| 223 } while (NULL == gp); | 223 } while (NULL == gp); |
| 224 return gp; | 224 return gp; |
| (...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 405 fInHairQuadEdge = &this->addVertexAttrib(Attribute("inHairQuadEdge", | 405 fInHairQuadEdge = &this->addVertexAttrib(Attribute("inHairQuadEdge", |
| 406 kVec4f_GrVertexAttribTyp
e)); | 406 kVec4f_GrVertexAttribTyp
e)); |
| 407 } | 407 } |
| 408 | 408 |
| 409 ////////////////////////////////////////////////////////////////////////////// | 409 ////////////////////////////////////////////////////////////////////////////// |
| 410 | 410 |
| 411 GR_DEFINE_GEOMETRY_PROCESSOR_TEST(GrQuadEffect); | 411 GR_DEFINE_GEOMETRY_PROCESSOR_TEST(GrQuadEffect); |
| 412 | 412 |
| 413 GrGeometryProcessor* GrQuadEffect::TestCreate(SkRandom* random, | 413 GrGeometryProcessor* GrQuadEffect::TestCreate(SkRandom* random, |
| 414 GrContext*, | 414 GrContext*, |
| 415 const GrDrawTargetCaps& caps, | 415 const GrCaps& caps, |
| 416 GrTexture*[]) { | 416 GrTexture*[]) { |
| 417 GrGeometryProcessor* gp; | 417 GrGeometryProcessor* gp; |
| 418 do { | 418 do { |
| 419 GrPrimitiveEdgeType edgeType = static_cast<GrPrimitiveEdgeType>( | 419 GrPrimitiveEdgeType edgeType = static_cast<GrPrimitiveEdgeType>( |
| 420 random->nextULessThan(kGrProcessorEdgeTypeCnt)); | 420 random->nextULessThan(kGrProcessorEdgeTypeCnt)); |
| 421 gp = GrQuadEffect::Create(GrRandomColor(random), | 421 gp = GrQuadEffect::Create(GrRandomColor(random), |
| 422 GrTest::TestMatrix(random), | 422 GrTest::TestMatrix(random), |
| 423 edgeType, caps, | 423 edgeType, caps, |
| 424 GrTest::TestMatrix(random), | 424 GrTest::TestMatrix(random), |
| 425 random->nextBool()); | 425 random->nextBool()); |
| (...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 618 fInCubicCoeffs = &this->addVertexAttrib(Attribute("inCubicCoeffs", | 618 fInCubicCoeffs = &this->addVertexAttrib(Attribute("inCubicCoeffs", |
| 619 kVec4f_GrVertexAttribTyp
e)); | 619 kVec4f_GrVertexAttribTyp
e)); |
| 620 } | 620 } |
| 621 | 621 |
| 622 ////////////////////////////////////////////////////////////////////////////// | 622 ////////////////////////////////////////////////////////////////////////////// |
| 623 | 623 |
| 624 GR_DEFINE_GEOMETRY_PROCESSOR_TEST(GrCubicEffect); | 624 GR_DEFINE_GEOMETRY_PROCESSOR_TEST(GrCubicEffect); |
| 625 | 625 |
| 626 GrGeometryProcessor* GrCubicEffect::TestCreate(SkRandom* random, | 626 GrGeometryProcessor* GrCubicEffect::TestCreate(SkRandom* random, |
| 627 GrContext*, | 627 GrContext*, |
| 628 const GrDrawTargetCaps& caps, | 628 const GrCaps& caps, |
| 629 GrTexture*[]) { | 629 GrTexture*[]) { |
| 630 GrGeometryProcessor* gp; | 630 GrGeometryProcessor* gp; |
| 631 do { | 631 do { |
| 632 GrPrimitiveEdgeType edgeType = static_cast<GrPrimitiveEdgeType>( | 632 GrPrimitiveEdgeType edgeType = static_cast<GrPrimitiveEdgeType>( |
| 633 random->nextULessThan(kGrPro
cessorEdgeTypeCnt)); | 633 random->nextULessThan(kGrPro
cessorEdgeTypeCnt)); |
| 634 gp = GrCubicEffect::Create(GrRandomColor(random), | 634 gp = GrCubicEffect::Create(GrRandomColor(random), |
| 635 GrTest::TestMatrix(random), edgeType, caps); | 635 GrTest::TestMatrix(random), edgeType, caps); |
| 636 } while (NULL == gp); | 636 } while (NULL == gp); |
| 637 return gp; | 637 return gp; |
| 638 } | 638 } |
| 639 | 639 |
| OLD | NEW |