Bug 58098 - Optimize filling rounded rects that are actually ellipses
Summary: Optimize filling rounded rects that are actually ellipses
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: 528+ (Nightly build)
Hardware: Mac (Intel) OS X 10.6
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-04-07 16:52 PDT by Ian Henderson
Modified: 2011-06-01 14:49 PDT (History)
3 users (show)

See Also:


Attachments
proposed patch (2.44 KB, patch)
2011-04-07 16:53 PDT, Ian Henderson
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ian Henderson 2011-04-07 16:52:28 PDT
In CG, drawing an ellipse directly is faster than constructing and filling a rounded rect path.  We should optimize fillRoundedRect in the case that it's just drawing an ellipse.
Comment 1 Ian Henderson 2011-04-07 16:53:57 PDT
Created attachment 88734 [details]
proposed patch
Comment 2 WebKit Commit Bot 2011-04-07 22:37:32 PDT
The commit-queue encountered the following flaky tests while processing attachment 88734 [details]:

http/tests/inspector/console-websocket-error.html bug 57392 (authors: pfeldman@chromium.org and yutak@chromium.org)
The commit-queue is continuing to process your patch.
Comment 3 WebKit Commit Bot 2011-04-07 22:39:10 PDT
Comment on attachment 88734 [details]
proposed patch

Clearing flags on attachment: 88734

Committed r83253: <http://trac.webkit.org/changeset/83253>
Comment 4 WebKit Commit Bot 2011-04-07 22:39:16 PDT
All reviewed patches have been landed.  Closing bug.
Comment 5 WebKit Commit Bot 2011-04-07 22:59:18 PDT
The commit-queue encountered the following flaky tests while processing attachment 88734 [details]:

animations/suspend-resume-animation.html bug 48161 (author: cmarrin@apple.com)
The commit-queue is continuing to process your patch.
Comment 6 Simon Fraser (smfr) 2011-06-01 13:20:59 PDT
I think this change broke filling circles in canvas when there is a gradient pattern, since the code no longer goes through the fillPath() logic
Comment 7 Eric Seidel (no email) 2011-06-01 13:36:14 PDT
Why is fillRoundedRect ever drawing an ellipse?
Comment 8 Simon Fraser (smfr) 2011-06-01 14:20:52 PDT
border-radius: 50%
Comment 9 Eric Seidel (no email) 2011-06-01 14:31:04 PDT
(In reply to comment #8)
> border-radius: 50%

Is that really the case we're optimizing for?  I can see how it would be *much* faster to let CG do the elipse, but seems like an odd motivation for this change.
Comment 10 Simon Fraser (smfr) 2011-06-01 14:42:38 PDT
Drawing circles with css border-radius is fairly common, and some benchmarks to it. I think it's worth the optimization.
Comment 11 Eric Seidel (no email) 2011-06-01 14:49:16 PDT
OK.  I'll have to trust you on this one. :)  Does seem like an easy way to draw a circle in CSS.