Bug 1931798. Only check for apz listeners when building compositor hit test info. r=gfx-reviewers,nical

The info that we get from the check is only used for compositor hit test info and it takes a decent amount of time to check.

Differential Revision: https://phabricator.services.mozilla.com/D229290
This commit is contained in:
Timothy Nikkel
2024-11-20 08:18:42 +00:00
parent b31e9afd29
commit fe0adb47d6

View File

@@ -467,12 +467,16 @@ void nsSubDocumentFrame::BuildDisplayList(nsDisplayListBuilder* aBuilder,
visible, dirty); visible, dirty);
if (subdocRootFrame) { if (subdocRootFrame) {
if (aBuilder->BuildCompositorHitTestInfo()) {
bool hasDocumentLevelListenersForApzAwareEvents = bool hasDocumentLevelListenersForApzAwareEvents =
gfxPlatform::AsyncPanZoomEnabled() && gfxPlatform::AsyncPanZoomEnabled() &&
nsLayoutUtils::HasDocumentLevelListenersForApzAwareEvents(presShell); nsLayoutUtils::HasDocumentLevelListenersForApzAwareEvents(
presShell);
aBuilder->SetAncestorHasApzAwareEventHandler( aBuilder->SetAncestorHasApzAwareEventHandler(
hasDocumentLevelListenersForApzAwareEvents); hasDocumentLevelListenersForApzAwareEvents);
}
subdocRootFrame->BuildDisplayListForStackingContext(aBuilder, subdocRootFrame->BuildDisplayListForStackingContext(aBuilder,
&childItems); &childItems);
if (!aBuilder->IsForEventDelivery()) { if (!aBuilder->IsForEventDelivery()) {