The overlap map in RenderLayerCompositor currently doesn't consider clipping. So, if there is a large layer that is clipped, it may cause other layers to unnecessarily become composited, even though they aren't truly overlapping once clip is considered.
I can haz testcase?
Created attachment 98815 [details]
Here's a test case. I have a patch too, but it changes the expected output from limit-layer-bounds-clipping-ancestor, so I need to clean that up first.
Created attachment 98830 [details]
(In reply to comment #3)
> Created an attachment (id=98830) [details]
Comment on attachment 98830 [details]
View in context: https://bugs.webkit.org/attachment.cgi?id=98830&action=review
> + IntRect clipRect = layer->backgroundClipRect(rootRenderLayer(), true);
This is another walk up the layer tree, sadly.
That one should hit cache (saved m_clipRects on the parent layer) most of the time, at least.
(In reply to comment #6)
> That one should hit cache (saved m_clipRects on the parent layer) most of the time, at least.
No, temporaryClipRects = true.
Committed r91114: <http://trac.webkit.org/changeset/91114>
The perf hit from this was significant: bug 84410