aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-12-11 15:32:04 +0000
committerGravatar bsalomon@google.com <bsalomon@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2012-12-11 15:32:04 +0000
commitfb883bf80422c4763921b3d6e2a9ac81596e77bf (patch)
tree8f349bece86b815266a0dd1732957324a48b0827
parentc7b4be7f110bc7b487c3c3f28d82877584e74c2f (diff)
Fix generation of random two point gradients for program unit test.
git-svn-id: http://skia.googlecode.com/svn/trunk@6751 2bbb7eff-a529-9590-31e7-b0007b416f81
-rw-r--r--src/effects/gradients/SkTwoPointConicalGradient.cpp2
-rw-r--r--src/effects/gradients/SkTwoPointRadialGradient.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/effects/gradients/SkTwoPointConicalGradient.cpp b/src/effects/gradients/SkTwoPointConicalGradient.cpp
index 4538eb29a7..5c06bce45c 100644
--- a/src/effects/gradients/SkTwoPointConicalGradient.cpp
+++ b/src/effects/gradients/SkTwoPointConicalGradient.cpp
@@ -426,7 +426,7 @@ GrEffect* GrConical2Gradient::TestCreate(SkRandom* random,
SkPoint center2;
SkScalar radius2;
do {
- center1.set(random->nextUScalar1(), random->nextUScalar1());
+ center2.set(random->nextUScalar1(), random->nextUScalar1());
radius2 = random->nextUScalar1 ();
// If the circles are identical the factory will give us an empty shader.
} while (radius1 == radius2 && center1 == center2);
diff --git a/src/effects/gradients/SkTwoPointRadialGradient.cpp b/src/effects/gradients/SkTwoPointRadialGradient.cpp
index 3f75d0ff9a..71b31260da 100644
--- a/src/effects/gradients/SkTwoPointRadialGradient.cpp
+++ b/src/effects/gradients/SkTwoPointRadialGradient.cpp
@@ -462,7 +462,7 @@ GrEffect* GrRadial2Gradient::TestCreate(SkRandom* random,
SkPoint center2;
SkScalar radius2;
do {
- center1.set(random->nextUScalar1(), random->nextUScalar1());
+ center2.set(random->nextUScalar1(), random->nextUScalar1());
radius2 = random->nextUScalar1 ();
// There is a bug in two point radial gradients with idenitical radii
} while (radius1 == radius2);