Bug 107547

Summary: [Qt] Box shadows on a transparency layer is very slow
Product: WebKit Reporter: Allan Sandfeld Jensen <allan.jensen>
Component: Layout and RenderingAssignee: Allan Sandfeld Jensen <allan.jensen>
Status: RESOLVED FIXED    
Severity: Normal CC: noam, nowrep, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on: 107549    
Bug Blocks: 88186, 103747    
Attachments:
Description Flags
Patch
none
Patch none

Description Allan Sandfeld Jensen 2013-01-22 03:59:12 PST
If box shadows are applied on top of a transparency layer, the result is very slow painting. An example is the page http://paste.chakra-project.org/3755/.

The issue is that the ShadowBlur layer ends up being the entire size of box element, instead of just the size of the transparency layer. This happens because the clipping set on QPainter is much larger than the area QPainter is painting to. One way to avoid it, is to set an initial clipping to the area QPainter is painting to, so that later clipping (set by intersection), can not end up larger than the layer.
Comment 1 Allan Sandfeld Jensen 2013-01-22 04:01:36 PST
Created attachment 183958 [details]
Patch
Comment 2 David Rosca 2013-01-22 04:23:56 PST
I can confirm that the patch helps the issue. Unfortunately, it's not ideal.
Rendering the page provided changed from unusably slow to slow on my machine (i5).
Comment 3 Allan Sandfeld Jensen 2013-01-22 04:40:18 PST
Committed r140412: <http://trac.webkit.org/changeset/140412>
Comment 4 Allan Sandfeld Jensen 2013-01-22 05:54:49 PST
Created attachment 183976 [details]
Patch

Do not change clips used by QPainter, instead ensure clipBounds return a clip intersected with the window bounds
Comment 5 WebKit Review Bot 2013-01-31 06:09:33 PST
Comment on attachment 183976 [details]
Patch

Clearing flags on attachment: 183976

Committed r141413: <http://trac.webkit.org/changeset/141413>
Comment 6 WebKit Review Bot 2013-01-31 06:09:37 PST
All reviewed patches have been landed.  Closing bug.