Bug 87212

Summary: Cache absolute clip rects on RenderLayer for compositing overlap testing
Product: WebKit Reporter: Simon Fraser (smfr) <simon.fraser>
Component: Layout and RenderingAssignee: Simon Fraser (smfr) <simon.fraser>
Status: RESOLVED FIXED    
Severity: Normal CC: dino, enne, eric, hyatt, jamesr, simon.fraser, webkit-bug-importer, webkit.review.bot
Priority: P2 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on:    
Bug Blocks: 84410    
Attachments:
Description Flags
Patch (not ready for review)
none
Patch hyatt: review+

Simon Fraser (smfr)
Reported 2012-05-22 22:10:51 PDT
Split out of bug 84410: http://trac.webkit.org/changeset/91114 added call to backgroundClipRect() relative to the root layer. This is very expensive to compute on every layer.
Attachments
Patch (not ready for review) (27.80 KB, patch)
2012-05-23 23:02 PDT, Simon Fraser (smfr)
no flags
Patch (34.70 KB, patch)
2012-05-25 13:50 PDT, Simon Fraser (smfr)
hyatt: review+
Simon Fraser (smfr)
Comment 1 2012-05-22 22:12:16 PDT
I have a hacky patch working, but the call to layer->updateLayerPosition() in RenderLayerCompositor::computeCompositingRequirements() is clearing cached clip rects. That call should not be necessary (it's been there from the first version of that file).
Simon Fraser (smfr)
Comment 2 2012-05-22 22:40:46 PDT
Fixing this gets CPU usage on a reduction of http://alliances.commandandconquer.com/en/ down from 100% to 30%, even before the patch on 84410.
Simon Fraser (smfr)
Comment 3 2012-05-23 21:21:07 PDT
Random statistic of the day: in general browsing of top news sites, about 30-40% of RenderLayers had clipRects associated with them.
Simon Fraser (smfr)
Comment 4 2012-05-23 23:02:47 PDT
Created attachment 143739 [details] Patch (not ready for review)
WebKit Review Bot
Comment 5 2012-05-23 23:05:14 PDT
Attachment 143739 [details] did not pass style-queue: Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/WebCore/ChangeLog', u'Source/WebCor..." exit_code: 1 Source/WebCore/ChangeLog:8: You should remove the 'No new tests' and either add and list tests, or explain why no new tests were possible. [changelog/nonewtests] [5] Total errors found: 1 in 7 files If any of these errors are false positives, please file a bug against check-webkit-style.
Simon Fraser (smfr)
Comment 6 2012-05-25 13:50:42 PDT
Dave Hyatt
Comment 7 2012-05-25 13:53:57 PDT
Comment on attachment 144142 [details] Patch r=me
Simon Fraser (smfr)
Comment 8 2012-05-25 14:17:49 PDT
Radar WebKit Bug Importer
Comment 9 2012-11-14 17:01:22 PST
Note You need to log in before you can comment on or make changes to this bug.