Improve gpu path subdiv with perspective, remove tolerance scale, fix comment
Review URL: http://codereview.appspot.com/4993041/
git-svn-id: http://skia.googlecode.com/svn/trunk@2239 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/gpu/src/GrTesselatedPathRenderer.cpp b/gpu/src/GrTesselatedPathRenderer.cpp
index 15e3cc0..dd281ed 100644
--- a/gpu/src/GrTesselatedPathRenderer.cpp
+++ b/gpu/src/GrTesselatedPathRenderer.cpp
@@ -351,18 +351,9 @@
GrAssert(GrDrawTarget::kBoth_DrawFace == fTarget->getDrawFace());
GrMatrix viewM = fTarget->getViewMatrix();
- // In order to tesselate the path we get a bound on how much the matrix can
- // stretch when mapping to screen coordinates.
- GrScalar stretch = viewM.getMaxStretch();
- bool useStretch = stretch > 0;
- GrScalar tol = fCurveTolerance;
- if (!useStretch) {
- // TODO: deal with perspective in some better way.
- tol /= 10;
- } else {
- tol = GrScalarDiv(tol, stretch);
- }
+ GrScalar tol = GR_Scalar1;
+ tol = GrPathUtils::scaleToleranceToSrc(tol, viewM);
GrScalar tolSqd = GrMul(tol, tol);
int subpathCnt;