| 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 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 229 GR_DEFINE_GEOMETRY_PROCESSOR_TEST(GrConicEffect); | 229 GR_DEFINE_GEOMETRY_PROCESSOR_TEST(GrConicEffect); |
| 230 | 230 |
| 231 GrGeometryProcessor* GrConicEffect::TestCreate(SkRandom* random, | 231 GrGeometryProcessor* GrConicEffect::TestCreate(SkRandom* random, |
| 232 GrContext*, | 232 GrContext*, |
| 233 const GrDrawTargetCaps& caps, | 233 const GrDrawTargetCaps& caps, |
| 234 GrTexture*[]) { | 234 GrTexture*[]) { |
| 235 GrGeometryProcessor* gp; | 235 GrGeometryProcessor* gp; |
| 236 do { | 236 do { |
| 237 GrPrimitiveEdgeType edgeType = static_cast<GrPrimitiveEdgeType>( | 237 GrPrimitiveEdgeType edgeType = static_cast<GrPrimitiveEdgeType>( |
| 238 random->nextULessThan(kGrPro
cessorEdgeTypeCnt)); | 238 random->nextULessThan(kGrPro
cessorEdgeTypeCnt)); |
| 239 gp = GrConicEffect::Create(GrRandomColor(random), GrProcessorUnitTest::T
estMatrix(random), | 239 gp = GrConicEffect::Create(GrRandomColor(random), GrTest::TestMatrix(ran
dom), |
| 240 edgeType, caps, | 240 edgeType, caps, |
| 241 GrProcessorUnitTest::TestMatrix(random)); | 241 GrTest::TestMatrix(random)); |
| 242 } while (NULL == gp); | 242 } while (NULL == gp); |
| 243 return gp; | 243 return gp; |
| 244 } | 244 } |
| 245 | 245 |
| 246 ////////////////////////////////////////////////////////////////////////////// | 246 ////////////////////////////////////////////////////////////////////////////// |
| 247 // Quad | 247 // Quad |
| 248 ////////////////////////////////////////////////////////////////////////////// | 248 ////////////////////////////////////////////////////////////////////////////// |
| 249 | 249 |
| 250 struct QuadBatchTracker { | 250 struct QuadBatchTracker { |
| 251 GrGPInput fInputColorType; | 251 GrGPInput fInputColorType; |
| (...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 451 | 451 |
| 452 GrGeometryProcessor* GrQuadEffect::TestCreate(SkRandom* random, | 452 GrGeometryProcessor* GrQuadEffect::TestCreate(SkRandom* random, |
| 453 GrContext*, | 453 GrContext*, |
| 454 const GrDrawTargetCaps& caps, | 454 const GrDrawTargetCaps& caps, |
| 455 GrTexture*[]) { | 455 GrTexture*[]) { |
| 456 GrGeometryProcessor* gp; | 456 GrGeometryProcessor* gp; |
| 457 do { | 457 do { |
| 458 GrPrimitiveEdgeType edgeType = static_cast<GrPrimitiveEdgeType>( | 458 GrPrimitiveEdgeType edgeType = static_cast<GrPrimitiveEdgeType>( |
| 459 random->nextULessThan(kGrProcessorEdgeTypeCnt)); | 459 random->nextULessThan(kGrProcessorEdgeTypeCnt)); |
| 460 gp = GrQuadEffect::Create(GrRandomColor(random), | 460 gp = GrQuadEffect::Create(GrRandomColor(random), |
| 461 GrProcessorUnitTest::TestMatrix(random), | 461 GrTest::TestMatrix(random), |
| 462 edgeType, caps, | 462 edgeType, caps, |
| 463 GrProcessorUnitTest::TestMatrix(random)); | 463 GrTest::TestMatrix(random)); |
| 464 } while (NULL == gp); | 464 } while (NULL == gp); |
| 465 return gp; | 465 return gp; |
| 466 } | 466 } |
| 467 | 467 |
| 468 ////////////////////////////////////////////////////////////////////////////// | 468 ////////////////////////////////////////////////////////////////////////////// |
| 469 // Cubic | 469 // Cubic |
| 470 ////////////////////////////////////////////////////////////////////////////// | 470 ////////////////////////////////////////////////////////////////////////////// |
| 471 | 471 |
| 472 struct CubicBatchTracker { | 472 struct CubicBatchTracker { |
| 473 GrGPInput fInputColorType; | 473 GrGPInput fInputColorType; |
| (...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 691 | 691 |
| 692 GrGeometryProcessor* GrCubicEffect::TestCreate(SkRandom* random, | 692 GrGeometryProcessor* GrCubicEffect::TestCreate(SkRandom* random, |
| 693 GrContext*, | 693 GrContext*, |
| 694 const GrDrawTargetCaps& caps, | 694 const GrDrawTargetCaps& caps, |
| 695 GrTexture*[]) { | 695 GrTexture*[]) { |
| 696 GrGeometryProcessor* gp; | 696 GrGeometryProcessor* gp; |
| 697 do { | 697 do { |
| 698 GrPrimitiveEdgeType edgeType = static_cast<GrPrimitiveEdgeType>( | 698 GrPrimitiveEdgeType edgeType = static_cast<GrPrimitiveEdgeType>( |
| 699 random->nextULessThan(kGrPro
cessorEdgeTypeCnt)); | 699 random->nextULessThan(kGrPro
cessorEdgeTypeCnt)); |
| 700 gp = GrCubicEffect::Create(GrRandomColor(random), | 700 gp = GrCubicEffect::Create(GrRandomColor(random), |
| 701 GrProcessorUnitTest::TestMatrix(random), edge
Type, caps); | 701 GrTest::TestMatrix(random), edgeType, caps); |
| 702 } while (NULL == gp); | 702 } while (NULL == gp); |
| 703 return gp; | 703 return gp; |
| 704 } | 704 } |
| 705 | 705 |
| OLD | NEW |