Changeset 249091 in webkit
- Timestamp:
- Aug 24, 2019 7:14:30 PM (5 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r249090 r249091 1 2019-08-24 Simon Fraser <simon.fraser@apple.com> 2 3 Have RenderLayer::calculateClipRects() use offsetFromAncestor() when possible 4 https://bugs.webkit.org/show_bug.cgi?id=201066 5 6 Reviewed by Dean Jackson. 7 8 offsetFromAncestor() is a layer tree walk, so faster than localToContainerPoint(), 9 but we can't use it when there are transforms on the layer and intermediates up 10 to the ancestor. 11 12 canUseConvertToLayerCoords() was trying to answer the question about whether it's 13 OK to use offsetFromAncestor() (which calls convertToLayerCoords() internally), but 14 it has insufficient information to make a determination. Leave this issue alone, but 15 at least rename canUseConvertToLayerCoords(). 16 17 * rendering/RenderLayer.cpp: 18 (WebCore::RenderLayer::updateLayerPositions): 19 (WebCore::RenderLayer::calculateClipRects const): 20 * rendering/RenderLayer.h: 21 1 22 2019-08-24 Simon Fraser <simon.fraser@apple.com> 2 23 -
trunk/Source/WebCore/rendering/RenderLayer.cpp
r249088 r249091 940 940 else { 941 941 // FIXME: It looks suspicious to call convertToLayerCoords here 942 // as canUse ConvertToLayerCoordsmay be true for an ancestor layer.942 // as canUseOffsetFromAncestor may be true for an ancestor layer. 943 943 offsetFromRoot = offsetFromAncestor(root()); 944 944 } … … 5658 5658 #endif 5659 5659 // This layer establishes a clip of some kind. 5660 5661 // This offset cannot use convertToLayerCoords, because sometimes our rootLayer may be across 5662 // some transformed layer boundary, for example, in the RenderLayerCompositor overlapMap, where 5663 // clipRects are needed in view space. 5664 LayoutPoint offset(renderer().localToContainerPoint(FloatPoint(), &clipRectsContext.rootLayer->renderer())); 5660 LayoutPoint offset; 5661 if (!m_hasTransformedAncestor && canUseOffsetFromAncestor()) 5662 offset = toLayoutPoint(offsetFromAncestor(clipRectsContext.rootLayer, AdjustForColumns)); 5663 else 5664 offset = LayoutPoint(renderer().localToContainerPoint(FloatPoint(), &clipRectsContext.rootLayer->renderer())); 5665 5665 5666 if (clipRects.fixed() && &clipRectsContext.rootLayer->renderer() == &renderer().view()) 5666 5667 offset -= toLayoutSize(renderer().view().frameView().scrollPositionForFixedPosition()); … … 6289 6290 continue; 6290 6291 6291 if (!childLayer->canUse ConvertToLayerCoords())6292 if (!childLayer->canUseOffsetFromAncestor()) 6292 6293 continue; 6293 6294 -
trunk/Source/WebCore/rendering/RenderLayer.h
r249088 r249091 635 635 bool hasAncestorWithFilterOutsets() const; 636 636 637 bool canUseConvertToLayerCoords() const 638 { 639 // These RenderObject have an impact on their layers' without them knowing about it. 637 bool canUseOffsetFromAncestor() const 638 { 639 // FIXME: This really needs to know if there are transforms on this layer and any of the layers 640 // between it and the ancestor in question. 640 641 return !renderer().hasTransform() && !renderer().isSVGRoot(); 641 642 }
Note: See TracChangeset
for help on using the changeset viewer.