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:
parent
c7b4be7f11
commit
fb883bf804
@ -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);
|
||||||
|
@ -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);
|
||||||
|
Loading…
Reference in New Issue
Block a user