| 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 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 219 | 219 |
| 220 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 (NULL == gp); | 229 } while (nullptr == gp); |
| 230 return gp; | 230 return gp; |
| 231 } | 231 } |
| 232 | 232 |
| 233 ////////////////////////////////////////////////////////////////////////////// | 233 ////////////////////////////////////////////////////////////////////////////// |
| 234 // Quad | 234 // Quad |
| 235 ////////////////////////////////////////////////////////////////////////////// | 235 ////////////////////////////////////////////////////////////////////////////// |
| 236 | 236 |
| 237 class GrGLQuadEffect : public GrGLGeometryProcessor { | 237 class GrGLQuadEffect : public GrGLGeometryProcessor { |
| 238 public: | 238 public: |
| 239 GrGLQuadEffect(const GrGeometryProcessor&, | 239 GrGLQuadEffect(const GrGeometryProcessor&, |
| (...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 428 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 (NULL == gp); | 438 } while (nullptr == gp); |
| 439 return gp; | 439 return gp; |
| 440 } | 440 } |
| 441 | 441 |
| 442 ////////////////////////////////////////////////////////////////////////////// | 442 ////////////////////////////////////////////////////////////////////////////// |
| 443 // Cubic | 443 // Cubic |
| 444 ////////////////////////////////////////////////////////////////////////////// | 444 ////////////////////////////////////////////////////////////////////////////// |
| 445 | 445 |
| 446 class GrGLCubicEffect : public GrGLGeometryProcessor { | 446 class GrGLCubicEffect : public GrGLGeometryProcessor { |
| 447 public: | 447 public: |
| 448 GrGLCubicEffect(const GrGeometryProcessor&, | 448 GrGLCubicEffect(const GrGeometryProcessor&, |
| (...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 646 GR_DEFINE_GEOMETRY_PROCESSOR_TEST(GrCubicEffect); | 646 GR_DEFINE_GEOMETRY_PROCESSOR_TEST(GrCubicEffect); |
| 647 | 647 |
| 648 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 (NULL == gp); | 656 } while (nullptr == gp); |
| 657 return gp; | 657 return gp; |
| 658 } | 658 } |
| 659 | 659 |
| OLD | NEW |