[Webkit-unassigned] [Bug 71972] Consider all RenderObjects in a GraphicsLayer when marking opaque

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Nov 14 15:20:32 PST 2011


--- Comment #2 from Dana Jansens <danakj at chromium.org>  2011-11-14 15:20:32 PST ---
(In reply to comment #1)
> As above, is there a better tree walk to consider than layout()?

So I'd really like to know where you think this should be going next.  Things I have explored so far:

1. Walk the ROs associated with a RL when the RL is visited in RenderLayerCompositor::calculateCompositedBounds.

I liked this one most as it was modular and clean, and didn't touch any other code.  However it requires 1 new visit to each RenderObject during the computation.

I also have the intuition that calculateCompositedBounds() is not called very frequently, so the computation of the opaque flag will be done more or less when it is necessary, and the extra overhead will not have too much impact.

2. Save the opaque rect for each RO whenever it finishes a layout().  Collect them rects in the RL, so they can be grabbed from each RL that is visited in RenderLayerCompositor::calculateCompositedBounds.

This doesn't require another trip through the ROs.  But it does require looking at something for each opaque RO belonging to the RL.  If everything is opaque, it ends up having the same cost as option 1.**

This code was much more complex and invasive, the layout() function can be called quite frequently, and can be called for arbitrary positions in the RenderObject tree, requiring extra walks up to find its position relative to the RenderLayer.

We could build a Region in the RL, which would save us the cost of **, however this would require visiting the entire RO subtree for a RL whenever something in the subtree was changed.

Thus this option seems to have a cost >= the cost of option 1.

3. You mentioned the painting tree-walk, but that is too late I believe, as we want these opaque flags set before painting to make decisions during the painting process.  Painting is done bottom to top, and the opaque flag depends on the entire RL/RO subtree of a backing, which would require an extra visit to each RO during the painting tree walk.

4. Is there another walk you'd like to consider? I am only familiar with the code as far as I've been touching it in these CLs.

Where do you think this should go?  Thanks.

Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

More information about the webkit-unassigned mailing list