diff options
author | reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2013-05-08 21:08:21 +0000 |
---|---|---|
committer | reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2013-05-08 21:08:21 +0000 |
commit | 3eff3592acfa6c7b6d4e85c91f0a200eddb09db7 (patch) | |
tree | 99875a4804bdc6ad2129f9103b3f8ce197f219bc /src/core/SkEdgeClipper.cpp | |
parent | 6843bdb7061364c100990e7e0feb3757fca08bb0 (diff) |
need to clamp all of the cubic points after a chop, in case our finite precision
meant we didn't compute values below the chop-point.
crbug:234190
R=caryclark@google.com
Review URL: https://codereview.chromium.org/14607012
git-svn-id: http://skia.googlecode.com/svn/trunk@9071 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src/core/SkEdgeClipper.cpp')
-rw-r--r-- | src/core/SkEdgeClipper.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/core/SkEdgeClipper.cpp b/src/core/SkEdgeClipper.cpp index b166bc67f0..fa9c30f4a1 100644 --- a/src/core/SkEdgeClipper.cpp +++ b/src/core/SkEdgeClipper.cpp @@ -283,11 +283,12 @@ static void chop_cubic_in_Y(SkPoint pts[4], const SkRect& clip) { SkPoint tmp[7]; SkChopCubicAt(pts, tmp, t); - // tmp[3, 4].fY should all be to the below clip.fTop, and + // tmp[3, 4, 5].fY should all be to the below clip.fTop, and // still be monotonic in Y. Since we can't trust the numerics of // the chopper, we force those conditions now tmp[3].fY = clip.fTop; clamp_ge(tmp[4].fY, clip.fTop); + clamp_ge(tmp[5].fY, tmp[4].fY); pts[0] = tmp[3]; pts[1] = tmp[4]; |