OLD | NEW |
1 | 1 |
2 /* | 2 /* |
3 * Copyright 2012 Google Inc. | 3 * Copyright 2012 Google Inc. |
4 * | 4 * |
5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
7 */ | 7 */ |
8 | 8 |
9 #include "SkTwoPointRadialGradient.h" | 9 #include "SkTwoPointRadialGradient.h" |
10 | 10 |
(...skipping 470 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
481 | 481 |
482 typedef GrGradientEffect INHERITED; | 482 typedef GrGradientEffect INHERITED; |
483 }; | 483 }; |
484 | 484 |
485 ///////////////////////////////////////////////////////////////////// | 485 ///////////////////////////////////////////////////////////////////// |
486 | 486 |
487 GR_DEFINE_EFFECT_TEST(GrRadial2Gradient); | 487 GR_DEFINE_EFFECT_TEST(GrRadial2Gradient); |
488 | 488 |
489 GrEffectRef* GrRadial2Gradient::TestCreate(SkMWCRandom* random, | 489 GrEffectRef* GrRadial2Gradient::TestCreate(SkMWCRandom* random, |
490 GrContext* context, | 490 GrContext* context, |
| 491 const GrDrawTargetCaps&, |
491 GrTexture**) { | 492 GrTexture**) { |
492 SkPoint center1 = {random->nextUScalar1(), random->nextUScalar1()}; | 493 SkPoint center1 = {random->nextUScalar1(), random->nextUScalar1()}; |
493 SkScalar radius1 = random->nextUScalar1(); | 494 SkScalar radius1 = random->nextUScalar1(); |
494 SkPoint center2; | 495 SkPoint center2; |
495 SkScalar radius2; | 496 SkScalar radius2; |
496 do { | 497 do { |
497 center2.set(random->nextUScalar1(), random->nextUScalar1()); | 498 center2.set(random->nextUScalar1(), random->nextUScalar1()); |
498 radius2 = random->nextUScalar1 (); | 499 radius2 = random->nextUScalar1 (); |
499 // There is a bug in two point radial gradients with identical radii | 500 // There is a bug in two point radial gradients with identical radii |
500 } while (radius1 == radius2); | 501 } while (radius1 == radius2); |
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
709 } | 710 } |
710 | 711 |
711 #else | 712 #else |
712 | 713 |
713 GrEffectRef* SkTwoPointRadialGradient::asNewEffect(GrContext*, const SkPaint&) c
onst { | 714 GrEffectRef* SkTwoPointRadialGradient::asNewEffect(GrContext*, const SkPaint&) c
onst { |
714 SkDEBUGFAIL("Should not call in GPU-less build"); | 715 SkDEBUGFAIL("Should not call in GPU-less build"); |
715 return NULL; | 716 return NULL; |
716 } | 717 } |
717 | 718 |
718 #endif | 719 #endif |
OLD | NEW |