Fixed point no longer crashes when GL enabled in gm tests.

http://codereview.appspot.com/4532073/


git-svn-id: http://skia.googlecode.com/svn/trunk@1394 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
bungeman@google.com 2011-05-20 19:11:50 +00:00
parent e4c98ff48d
commit 8c5753ea2e
3 changed files with 3 additions and 4 deletions

View File

@ -40,6 +40,7 @@
#define GrScalarHalf(a) SkScalarHalf(a)
#define GrScalarAve(a,b) SkScalarAve(a,b)
#define GrMul(a,b) SkScalarMul(a,b)
#define GrScalarDiv(a,b) SkScalarDiv(a, b)
#define GrScalarToFloat(a) SkScalarToFloat(a)
#define GrFloatToScalar(a) SkScalarToFloat(a)
#define GrIntToScalar(a) SkIntToScalar(a)

View File

@ -203,8 +203,7 @@ void GrDefaultPathRenderer::onDrawPath(GrDrawTarget* target,
// TODO: deal with perspective in some better way.
tol /= 10;
} else {
GrScalar sinv = GR_Scalar1 / stretch;
tol = GrMul(tol, sinv);
tol = GrScalarDiv(tol, stretch);
}
GrScalar tolSqd = GrMul(tol, tol);

View File

@ -145,8 +145,7 @@ void GrTesselatedPathRenderer::drawPath(GrDrawTarget* target,
// TODO: deal with perspective in some better way.
tol /= 10;
} else {
GrScalar sinv = GR_Scalar1 / stretch;
tol = GrMul(tol, sinv);
tol = GrScalarDiv(tol, stretch);
}
GrScalar tolSqd = GrMul(tol, tol);