diff options
author | caryclark <caryclark@google.com> | 2015-06-01 10:21:31 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-06-01 10:21:31 -0700 |
commit | c00e1dd93d2c0e3ce6c76c38ccb75de5ddb9663c (patch) | |
tree | 041e375dbb439012c58f07aadc12e929a29e4a66 | |
parent | 7fe8ee4cb7396754bfdb8c3bc1bf7c09af7459dd (diff) |
another double square
This is also a case where the square term is passed to a helper
function that squares the error term a second time.
R=reed@google.com
BUG=skia:3877
Review URL: https://codereview.chromium.org/1152623005
-rw-r--r-- | src/core/SkStroke.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/core/SkStroke.cpp b/src/core/SkStroke.cpp index 2589cf6408..2296315915 100644 --- a/src/core/SkStroke.cpp +++ b/src/core/SkStroke.cpp @@ -907,7 +907,7 @@ SkPathStroker::ResultType SkPathStroker::strokeCloseEnough(const SkPoint stroke[ const SkPoint ray[2], SkQuadConstruct* quadPts STROKER_DEBUG_PARAMS(int depth)) const { SkPoint strokeMid = SkEvalQuadAt(stroke, SK_ScalarHalf); // measure the distance from the curve to the quad-stroke midpoint, compare to radius - if (points_within_dist(ray[0], strokeMid, fInvResScaleSquared)) { // if the difference is small + if (points_within_dist(ray[0], strokeMid, fInvResScale)) { // if the difference is small if (sharp_angle(quadPts->fQuad)) { return STROKER_RESULT(kSplit_ResultType, depth, quadPts, "sharp_angle (1) =%g,%g, %g,%g, %g,%g", @@ -916,8 +916,8 @@ SkPathStroker::ResultType SkPathStroker::strokeCloseEnough(const SkPoint stroke[ quadPts->fQuad[2].fX, quadPts->fQuad[2].fY); } return STROKER_RESULT(kQuad_ResultType, depth, quadPts, - "points_within_dist(ray[0]=%g,%g, strokeMid=%g,%g, fInvResScaleSquared=%g)", - ray[0].fX, ray[0].fY, strokeMid.fX, strokeMid.fY, fInvResScaleSquared); + "points_within_dist(ray[0]=%g,%g, strokeMid=%g,%g, fInvResScale=%g)", + ray[0].fX, ray[0].fY, strokeMid.fX, strokeMid.fY, fInvResScale); } // measure the distance to quad's bounds (quick reject) // an alternative : look for point in triangle |