Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 51ab3c3494d25b85e483cce7d6cf717e9cdcb5d3
https://github.com/WebKit/WebKit/commit/51ab3c3494d25b85e483cce7d6cf717e9cdcb5d3
Author: Kishore Sri Venkata Ganesh Bolisetty <[email protected]>
Date: 2026-09-25 (Fri, 25 Sep 2026)
Changed paths:
M Source/WebCore/rendering/LayerOverlapMap.cpp
M Source/WebCore/rendering/LayerOverlapMap.h
M Source/WebCore/rendering/RenderLayerCompositor.cpp
Log Message:
-----------
Reduce OverlapMap clip computations in
RenderLayerCompositor::addToOverlapMap()
rdar://188241977
https://bugs.webkit.org/show_bug.cgi?id=325201
Reviewed by Matt Woodrow.
RectList::append() drops any rect already contained by one of the recent
rects in its clipping scope. addToOverlapMap() computes the clipped bounds
first, so it pays for computeClippedOverlapBounds() -- and the
backgroundClipRect() inside it -- even when the result is immediately
thrown away. On a Twitter scroll that is ~93% of the rects this path adds.
Clipping only shrinks a rect, so the clipped bounds are always a subset of
the unclipped ones, and the coverage test can run before the clip. The
check reuses RectList::isAlreadyCovered(), the same predicate append() uses,
and consults both the main and the speculative overlap stacks, so the
contents of the overlap map are unchanged.
No behavior change, so no new tests; covered by existing compositing tests.
* Source/WebCore/rendering/LayerOverlapMap.cpp:
(WebCore::OverlapMapContainer::isCoveredByRecentRects const):
(WebCore::LayerOverlapMap::isCoveredByRecentRects const):
* Source/WebCore/rendering/LayerOverlapMap.h:
* Source/WebCore/rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::addToOverlapMap const):
Canonical link: https://commits.webkit.org/321910@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications