| 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/GrGLEffect.h" | 10 #include "gl/GrGLEffect.h" |
| (...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 137 | 137 |
| 138 bool GrConicEffect::onIsEqual(const GrEffect& other) const { | 138 bool GrConicEffect::onIsEqual(const GrEffect& other) const { |
| 139 const GrConicEffect& ce = CastEffect<GrConicEffect>(other); | 139 const GrConicEffect& ce = CastEffect<GrConicEffect>(other); |
| 140 return (ce.fEdgeType == fEdgeType); | 140 return (ce.fEdgeType == fEdgeType); |
| 141 } | 141 } |
| 142 | 142 |
| 143 ////////////////////////////////////////////////////////////////////////////// | 143 ////////////////////////////////////////////////////////////////////////////// |
| 144 | 144 |
| 145 GR_DEFINE_EFFECT_TEST(GrConicEffect); | 145 GR_DEFINE_EFFECT_TEST(GrConicEffect); |
| 146 | 146 |
| 147 GrEffectRef* GrConicEffect::TestCreate(SkMWCRandom* random, | 147 GrEffectRef* GrConicEffect::TestCreate(SkRandom* random, |
| 148 GrContext*, | 148 GrContext*, |
| 149 const GrDrawTargetCaps& caps, | 149 const GrDrawTargetCaps& caps, |
| 150 GrTexture*[]) { | 150 GrTexture*[]) { |
| 151 const GrBezierEdgeType edgeType = static_cast<GrBezierEdgeType>(random->next
ULessThan(3)); | 151 const GrBezierEdgeType edgeType = static_cast<GrBezierEdgeType>(random->next
ULessThan(3)); |
| 152 return GrConicEffect::Create(edgeType, caps); | 152 return GrConicEffect::Create(edgeType, caps); |
| 153 } | 153 } |
| 154 | 154 |
| 155 ////////////////////////////////////////////////////////////////////////////// | 155 ////////////////////////////////////////////////////////////////////////////// |
| 156 // Quad | 156 // Quad |
| 157 ////////////////////////////////////////////////////////////////////////////// | 157 ////////////////////////////////////////////////////////////////////////////// |
| (...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 271 | 271 |
| 272 bool GrQuadEffect::onIsEqual(const GrEffect& other) const { | 272 bool GrQuadEffect::onIsEqual(const GrEffect& other) const { |
| 273 const GrQuadEffect& ce = CastEffect<GrQuadEffect>(other); | 273 const GrQuadEffect& ce = CastEffect<GrQuadEffect>(other); |
| 274 return (ce.fEdgeType == fEdgeType); | 274 return (ce.fEdgeType == fEdgeType); |
| 275 } | 275 } |
| 276 | 276 |
| 277 ////////////////////////////////////////////////////////////////////////////// | 277 ////////////////////////////////////////////////////////////////////////////// |
| 278 | 278 |
| 279 GR_DEFINE_EFFECT_TEST(GrQuadEffect); | 279 GR_DEFINE_EFFECT_TEST(GrQuadEffect); |
| 280 | 280 |
| 281 GrEffectRef* GrQuadEffect::TestCreate(SkMWCRandom* random, | 281 GrEffectRef* GrQuadEffect::TestCreate(SkRandom* random, |
| 282 GrContext*, | 282 GrContext*, |
| 283 const GrDrawTargetCaps& caps, | 283 const GrDrawTargetCaps& caps, |
| 284 GrTexture*[]) { | 284 GrTexture*[]) { |
| 285 const GrBezierEdgeType edgeType = static_cast<GrBezierEdgeType>(random->next
ULessThan(3)); | 285 const GrBezierEdgeType edgeType = static_cast<GrBezierEdgeType>(random->next
ULessThan(3)); |
| 286 return GrQuadEffect::Create(edgeType, caps); | 286 return GrQuadEffect::Create(edgeType, caps); |
| 287 } | 287 } |
| 288 | 288 |
| 289 ////////////////////////////////////////////////////////////////////////////// | 289 ////////////////////////////////////////////////////////////////////////////// |
| 290 // Cubic | 290 // Cubic |
| 291 ////////////////////////////////////////////////////////////////////////////// | 291 ////////////////////////////////////////////////////////////////////////////// |
| (...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 416 | 416 |
| 417 bool GrCubicEffect::onIsEqual(const GrEffect& other) const { | 417 bool GrCubicEffect::onIsEqual(const GrEffect& other) const { |
| 418 const GrCubicEffect& ce = CastEffect<GrCubicEffect>(other); | 418 const GrCubicEffect& ce = CastEffect<GrCubicEffect>(other); |
| 419 return (ce.fEdgeType == fEdgeType); | 419 return (ce.fEdgeType == fEdgeType); |
| 420 } | 420 } |
| 421 | 421 |
| 422 ////////////////////////////////////////////////////////////////////////////// | 422 ////////////////////////////////////////////////////////////////////////////// |
| 423 | 423 |
| 424 GR_DEFINE_EFFECT_TEST(GrCubicEffect); | 424 GR_DEFINE_EFFECT_TEST(GrCubicEffect); |
| 425 | 425 |
| 426 GrEffectRef* GrCubicEffect::TestCreate(SkMWCRandom* random, | 426 GrEffectRef* GrCubicEffect::TestCreate(SkRandom* random, |
| 427 GrContext*, | 427 GrContext*, |
| 428 const GrDrawTargetCaps& caps, | 428 const GrDrawTargetCaps& caps, |
| 429 GrTexture*[]) { | 429 GrTexture*[]) { |
| 430 const GrBezierEdgeType edgeType = static_cast<GrBezierEdgeType>(random->next
ULessThan(3)); | 430 const GrBezierEdgeType edgeType = static_cast<GrBezierEdgeType>(random->next
ULessThan(3)); |
| 431 return GrCubicEffect::Create(edgeType, caps); | 431 return GrCubicEffect::Create(edgeType, caps); |
| 432 } | 432 } |
| OLD | NEW |