[webkit-reviews] review granted: [Bug 78728] Box shadow drawing takes an unnecessarily slow code path in some single-shadow, opaque-background cases : [Attachment 127213] Let the background cast the shadow directly in some cases where this is possible

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Feb 15 12:44:42 PST 2012


Dave Hyatt <hyatt at apple.com> has granted mitz at webkit.org's request for review:
Bug 78728: Box shadow drawing takes an unnecessarily slow code path in some
single-shadow, opaque-background cases
https://bugs.webkit.org/show_bug.cgi?id=78728

Attachment 127213: Let the background cast the shadow directly in some cases
where this is possible
https://bugs.webkit.org/attachment.cgi?id=127213&action=review

------- Additional Comments from Dave Hyatt <hyatt at apple.com>
It's slightly slower, but you could simplify the patch considerably if you just
moved:

if
(!boxShadowShouldBeAppliedToBackground(determineBackgroundBleedAvoidance(paintI
nfo.context)))
    paintBoxShadow(paintInfo, rect, style(), Normal);

inside RenderBoxModelObject::paintBoxShadow.

Then you wouldn't have to patch a bunch of call sites, and you wouldn't even
have to touch InlineFlowBox.

I'll leave it up to you, though, since your way is ever-so-slightly faster at
the cost of complicating every call site.


More information about the webkit-reviews mailing list