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
This commit is contained in:
bsalomon@google.com 2012-12-11 15:32:04 +00:00
parent c7b4be7f11
commit fb883bf804
2 changed files with 2 additions and 2 deletions

View File

@ -426,7 +426,7 @@ GrEffect* GrConical2Gradient::TestCreate(SkRandom* random,
SkPoint center2; SkPoint center2;
SkScalar radius2; SkScalar radius2;
do { do {
center1.set(random->nextUScalar1(), random->nextUScalar1()); center2.set(random->nextUScalar1(), random->nextUScalar1());
radius2 = random->nextUScalar1 (); radius2 = random->nextUScalar1 ();
// If the circles are identical the factory will give us an empty shader. // If the circles are identical the factory will give us an empty shader.
} while (radius1 == radius2 && center1 == center2); } while (radius1 == radius2 && center1 == center2);

View File

@ -462,7 +462,7 @@ GrEffect* GrRadial2Gradient::TestCreate(SkRandom* random,
SkPoint center2; SkPoint center2;
SkScalar radius2; SkScalar radius2;
do { do {
center1.set(random->nextUScalar1(), random->nextUScalar1()); center2.set(random->nextUScalar1(), random->nextUScalar1());
radius2 = random->nextUScalar1 (); radius2 = random->nextUScalar1 ();
// There is a bug in two point radial gradients with idenitical radii // There is a bug in two point radial gradients with idenitical radii
} while (radius1 == radius2); } while (radius1 == radius2);