Bug 87212 - Cache absolute clip rects on RenderLayer for compositing overlap testing
Summary: Cache absolute clip rects on RenderLayer for compositing overlap testing
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Layout and Rendering (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Simon Fraser (smfr)
URL:
Keywords: InRadar
Depends on:
Blocks: 84410
  Show dependency treegraph
 
Reported: 2012-05-22 22:10 PDT by Simon Fraser (smfr)
Modified: 2012-11-14 17:01 PST (History)
8 users (show)

See Also:


Attachments
Patch (not ready for review) (27.80 KB, patch)
2012-05-23 23:02 PDT, Simon Fraser (smfr)
no flags Details | Formatted Diff | Diff
Patch (34.70 KB, patch)
2012-05-25 13:50 PDT, Simon Fraser (smfr)
hyatt: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Simon Fraser (smfr) 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.
Comment 1 Simon Fraser (smfr) 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).
Comment 2 Simon Fraser (smfr) 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.
Comment 3 Simon Fraser (smfr) 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.
Comment 4 Simon Fraser (smfr) 2012-05-23 23:02:47 PDT
Created attachment 143739 [details]
Patch (not ready for review)
Comment 5 WebKit Review Bot 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.
Comment 6 Simon Fraser (smfr) 2012-05-25 13:50:42 PDT
Created attachment 144142 [details]
Patch
Comment 7 Dave Hyatt 2012-05-25 13:53:57 PDT
Comment on attachment 144142 [details]
Patch

r=me
Comment 8 Simon Fraser (smfr) 2012-05-25 14:17:49 PDT
http://trac.webkit.org/changeset/118562
Comment 9 Radar WebKit Bug Importer 2012-11-14 17:01:22 PST
<rdar://problem/12705253>