[Webkit-unassigned] [Bug 55257] Support creating compositing layers for scrollable and overflowing objects

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Feb 25 16:17:46 PST 2011


https://bugs.webkit.org/show_bug.cgi?id=55257





--- Comment #4 from Daniel Sievers <sievers at google.com>  2011-02-25 16:17:46 PST ---
(From update of attachment 83890)
View in context: https://bugs.webkit.org/attachment.cgi?id=83890&action=review

>> Source/WebCore/rendering/RenderLayer.cpp:3816
>> +        || isComposited();
> 
> Why do you need to change this logic?  It doesn't seem like this patch should change this logic.

>From what I understand isSelfPaintingLayer() decides whether a layer paints itself or some parent does it and is used in a bunch of places that deal with painting and hit testing. Especially with the latter I'm concerned that we need to give the correct answer here. Doesn't a layer have to be self-painting anyway, if we are using hw compositing and it got its own compositing layer? So pre-existing cases should not be affected.

The thing here is that the pre-existing cases rely on things known before layout only, and the decision can be made more statically based on type and style. For the more general 'blocks that overflow' case, it seemed to work best to force the decision from requiresCompositingLayerForScrollableOverflow() and then just make sure isSelfPainting() layer gives good answers if we happened to make the layer composited.

>> Source/WebCore/rendering/RenderLayerCompositor.cpp:-1206
>> -    return m_hasAcceleratedCompositing && layer->isSelfPaintingLayer();
> 
> Why do you need to change this?

This function is used in needsToBeComposited() and other places to see if the layer could be composited. It doesn't mean it necessarily will (the requiresCompositing*() functions will determine if it actually will be).

Usually the check to create compositing layers is done before layout. If we set m_compositingDependsOnGeometry we will revisit things after layout.

Since we don't know until after layout whether we really want to composite it, we have to be permissive here and then make the final decision after layout. Also I only want to set m_compositingDependsOnGeometry if there is a reasonable chance (based on style known before layout, i.e. overflow : 'scroll' or 'auto') that we might want to create a layer.

>> Source/WebCore/rendering/RenderLayerCompositor.cpp:1305
>> +            return false;
> 
> This feels awkward - is not redundant with the check at 1309-1310?

Actually, the check below uses contentSize, while the layout size would be the visible size. If a site uses a hidden (e.g. 1x1 iframe) to preload flash or so, I think the content size would have the full content dimensions, while the visible/layout size is 1x1.

>> Source/WebCore/rendering/RenderLayerCompositor.h:244
>> +    bool requiresCompositingForScrollableOverflow(RenderObject*) const;
> 
> This comment seems out of date now.

Oops, will move this back down.

-- 
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