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

Allan Sandfeld Jensen
Reported 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.
Attachments
Patch (1.51 KB, patch)
2013-01-22 04:01 PST, Allan Sandfeld Jensen
no flags
Patch (1.71 KB, patch)
2013-01-22 05:54 PST, Allan Sandfeld Jensen
no flags
Allan Sandfeld Jensen
Comment 1 2013-01-22 04:01:36 PST
David Rosca
Comment 2 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).
Allan Sandfeld Jensen
Comment 3 2013-01-22 04:40:18 PST
Allan Sandfeld Jensen
Comment 4 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
WebKit Review Bot
Comment 5 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>
WebKit Review Bot
Comment 6 2013-01-31 06:09:37 PST
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.