[Webkit-unassigned] [Bug 30994] New: Better Ellipses

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sun Nov 1 06:34:25 PST 2009


https://bugs.webkit.org/show_bug.cgi?id=30994

           Summary: Better Ellipses
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: PC
        OS/Version: Mac OS X 10.5
            Status: UNCONFIRMED
          Severity: Normal
          Priority: P2
         Component: WebCore Misc.
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: codedread at gmail.com


Created an attachment (id=42274)
 --> (https://bugs.webkit.org/attachment.cgi?id=42274)
Patch to use ellipse-drawing

I noticed that ellipses are actually drawn as 100-sided polygons instead of arc
paths.

Surely this was done for a reason, so I was hoping to find out what that reason
was.  Is it proven to be better performing across the various 2D graphics APIs
that WebKit supports?  Perhaps to better support mobile devices the 100-sided
polygon approach was chosen?

I'm attaching a patch that uses path.addEllipse instead of the 100 addLineTo()
commands.  I will also add a simple test case.  Compiling these changes into
Safari I can actually tell the difference between Chrome rendering and
WebKit-rendering on the test case.  In Chrome I can definitely see "corners" in
the ellipse.

I also took the opportunity to add some 'const' declarations into the
WebCore/platform/graphics/Path.cpp in the vain hope that it might actually help
compilers optimize things a little better.  I did not actually confirm whether
the compiled assembly _is_ better, but at the very least I've never heard of
'const' hurting performance.  What's the culture here?  Do these types of
things need to be separate patches?

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list