Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(3538)

Issue 7100056: Fix bug in cubic-clipper (SkEdgeClipper). When we chop the cubic on Top/Bottom (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
11 years, 9 months ago by reed1
Modified:
11 years, 9 months ago
Reviewers:
caryclark1
CC:
skia-review_googlegroups.com
Base URL:
http://skia.googlecode.com/svn/
Visibility:
Public.

Description

Fix bug in cubic-clipper (SkEdgeClipper). When we chop the cubic on Top/Bottom of the cliprect, we (correctly) clamp the Y coordinate of the control-point right next to the on-curve point that was chopped (this ensures we don't go slightly outside of the clip-rect due to imperfect T value calculation). However, the code was also clamping the other control-point as well, resulting in warping the cubic, which could sometimes force it outside of the clip. The fix is to just remove the line of code that clampped the 2nd control-point. unittest added to reproduce a test cubic that triggered an assert, due to the cubic being outside of the cliprect. The test (w/o the fix) will assert in a SK_DEBUG build. Committed: https://code.google.com/p/skia/source/detail?r=7184

Patch Set 1 #

Patch Set 2 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+41 lines, -3 lines) Patch
M trunk/src/core/SkEdgeClipper.cpp View 1 2 chunks +1 line, -3 lines 0 comments Download
M trunk/tests/PathTest.cpp View 2 chunks +40 lines, -0 lines 0 comments Download

Messages

Total messages: 2
reed1
11 years, 9 months ago (2013-01-15 15:44:35 UTC) #1
caryclark1
11 years, 9 months ago (2013-01-15 15:48:00 UTC) #2
lgtm
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b