WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
64584
Avoid rounded rect corner-drawing overhead if no corners are visible
https://bugs.webkit.org/show_bug.cgi?id=64584
Summary
Avoid rounded rect corner-drawing overhead if no corners are visible
Ian Henderson
Reported
2011-07-14 23:21:19 PDT
We fall into a slow path when drawing a border for an element with nonzero border-radius. If the rounded corners are outside the clip rect, however, we can set their radius to zero without visual effect.
Attachments
proposed patch
(9.96 KB, patch)
2011-07-14 23:31 PDT
,
Ian Henderson
simon.fraser
: review-
simon.fraser
: commit-queue-
Details
Formatted Diff
Diff
test case
(465 bytes, text/html)
2011-07-15 11:14 PDT
,
Ian Henderson
no flags
Details
updated patch
(10.32 KB, patch)
2011-07-15 11:25 PDT
,
Ian Henderson
no flags
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Ian Henderson
Comment 1
2011-07-14 23:31:56 PDT
Created
attachment 100939
[details]
proposed patch
Ian Henderson
Comment 2
2011-07-15 00:02:55 PDT
<
rdar://problem/9326550
>
Simon Fraser (smfr)
Comment 3
2011-07-15 08:31:03 PDT
Comment on
attachment 100939
[details]
proposed patch View in context:
https://bugs.webkit.org/attachment.cgi?id=100939&action=review
Let's see one more version. I'd also like to see an interactive testcase attached to the bug (maybe a roundrect inside a scrollable overflow region) so that behavior can be checked manually.
> Source/WebCore/ChangeLog:8 > + No new tests, behavior is unaffected.
Well, behavior is affected, but not in a way that should affect visible rendering.
> Source/WebCore/rendering/RenderBoxModelObject.cpp:1425 > + // If one of the corners falls outside the clip region, pretend it has no radius.
The comment should mention that this is done for performance reasons.
> Source/WebCore/rendering/RenderBoxModelObject.cpp:1450 > + outerBorder.setRadii(adjustedOuterRadii);
You could avoid setting this if you didn't change any corners. I think you should also skip this entire block if rect is entirely inside the clip.
Ian Henderson
Comment 4
2011-07-15 11:14:01 PDT
Created
attachment 101007
[details]
test case Here's a test case—normal, dotted, and dashed borders with positive border-radius in overflow: scroll divs.
Ian Henderson
Comment 5
2011-07-15 11:25:27 PDT
Created
attachment 101011
[details]
updated patch Addressed Simon's comments and moved the corner-adjusting code into a separate static function.
Simon Fraser (smfr)
Comment 6
2011-07-15 11:31:08 PDT
Comment on
attachment 101011
[details]
updated patch Nice.
WebKit Review Bot
Comment 7
2011-07-15 12:27:43 PDT
Comment on
attachment 101011
[details]
updated patch Clearing flags on attachment: 101011 Committed
r91090
: <
http://trac.webkit.org/changeset/91090
>
WebKit Review Bot
Comment 8
2011-07-15 12:27:48 PDT
All reviewed patches have been landed. Closing bug.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug