Bug 29137 - [WinCE] Loss of accuracy: Using abs() instead of fabs() in addArcTo()
Summary: [WinCE] Loss of accuracy: Using abs() instead of fabs() in addArcTo()
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Platform (show other bugs)
Version: 528+ (Nightly build)
Hardware: Other Other
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-09-10 12:00 PDT by Jakob Petsovits
Modified: 2010-09-15 16:40 PDT (History)
2 users (show)

See Also:


Attachments
Use fabs() in order to fix addArcTo(). (2.00 KB, patch)
2009-09-10 12:06 PDT, Jakob Petsovits
eric: review-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jakob Petsovits 2009-09-10 12:00:33 PDT
PlatformPathWinCE does lots of calculations on doubles, but in one place in addArcTo() it's unintentionally using the integer abs() function instead of fabs(), thus losing accuracy, which can lead to incorrect drawing of arcs.

See the patch below which fixes this.
Comment 1 Jakob Petsovits 2009-09-10 12:06:20 PDT
Created attachment 39365 [details]
Use fabs() in order to fix addArcTo().

No new tests (OOPS!)... what should I do about that? Does WinCE come with pixel tests? If so, how can I generate some without running some WinCE emulator? Can we skip the tests because it's an obvious bug anyways, and I'm not hugely motivated to write some? the answer my friend, etc.
Comment 2 Eric Seidel (no email) 2009-09-15 23:12:59 PDT
Comment on attachment 39365 [details]
Use fabs() in order to fix addArcTo().

Every change requires tests or explanation as to why testing is impossible/impractical.  I'm not sure that wince has pixel tests, which would be an explanation as to why it's impossible.
Comment 3 George Staikos 2009-09-17 13:13:33 PDT
It has no pixel tests, therefore I think it should be r+.  If no objection I will do so.
Comment 4 Patrick R. Gansterer 2010-07-31 12:46:46 PDT
I think we can close this bug now, because the same change was landed with http://trac.webkit.org/changeset/63976.
Comment 5 Patrick R. Gansterer 2010-09-15 16:40:19 PDT
Landed with http://trac.webkit.org/changeset/63976.