From 0934f7f7ab6da35c21ff20cae6395b8f46bf53df Mon Sep 17 00:00:00 2001 From: Marco Castelluccio Date: Sun, 1 Dec 2024 01:23:57 +0000 Subject: [PATCH] Bug 1934146. Only build compositor hit test info if we are painting to the window. r=layout-reviewers,emilio If we aren't painting to the window then the hit test info has no where to go as we must be painting to a flat simple surface. I moved the bools closer together so they doesn't require two memory reads. A couple of less fuzzy required in reftest snapshot due to no longer having hit test info items. Differential Revision: https://phabricator.services.mozilla.com/D230629 UltraBlame original commit: 15ed73287645c809601c764e4d200f6e2009728b --- layout/painting/nsDisplayList.cpp | 29 ++++++++--------------- layout/painting/nsDisplayList.h | 14 +++++------ layout/reftests/bugs/reftest.list | 4 ++-- layout/reftests/transform-3d/reftest.list | 4 ++-- 4 files changed, 21 insertions(+), 30 deletions(-) diff --git a/layout/painting/nsDisplayList.cpp b/layout/painting/nsDisplayList.cpp index 53f33bb43b635..5b6bc66214e9c 100644 --- a/layout/painting/nsDisplayList.cpp +++ b/layout/painting/nsDisplayList.cpp @@ -3680,6 +3680,16 @@ mIsPaintingToWindow ( false ) +mAsyncPanZoomEnabled +( +nsLayoutUtils +: +: +AsyncPanZoomEnabled +( +aReferenceFrame +) +) mUseHighQualityScaling ( false @@ -3718,16 +3728,6 @@ mContainsNonMinimalDisplayPort ( false ) -mAsyncPanZoomEnabled -( -nsLayoutUtils -: -: -AsyncPanZoomEnabled -( -aReferenceFrame -) -) mBuildingInvisibleItems ( false @@ -3778,15 +3778,6 @@ MOZ_COUNT_CTOR nsDisplayListBuilder ) ; -mBuildCompositorHitTestInfo -= -mAsyncPanZoomEnabled -& -& -IsForPainting -( -) -; ShouldRebuildDisplayListDueToPrefChange ( ) diff --git a/layout/painting/nsDisplayList.h b/layout/painting/nsDisplayList.h index 020bd7110fc80..ee0dd6ac7a11a 100644 --- a/layout/painting/nsDisplayList.h +++ b/layout/painting/nsDisplayList.h @@ -1210,7 +1210,10 @@ BuildCompositorHitTestInfo const { return -mBuildCompositorHitTestInfo +mAsyncPanZoomEnabled +& +& +mIsPaintingToWindow ; } bool @@ -5655,6 +5658,9 @@ bool mIsPaintingToWindow ; bool +mAsyncPanZoomEnabled +; +bool mUseHighQualityScaling ; bool @@ -5679,9 +5685,6 @@ bool mContainsNonMinimalDisplayPort ; bool -mAsyncPanZoomEnabled -; -bool mBuildingInvisibleItems ; bool @@ -5691,9 +5694,6 @@ bool mInInvalidSubtree ; bool -mBuildCompositorHitTestInfo -; -bool mDisablePartialUpdates ; bool diff --git a/layout/reftests/bugs/reftest.list b/layout/reftests/bugs/reftest.list index bed1b9e361bf6..f38e967b1ae63 100644 --- a/layout/reftests/bugs/reftest.list +++ b/layout/reftests/bugs/reftest.list @@ -31268,10 +31268,10 @@ fuzzy if ( useDrawSnapshot -33 +0 - 33 -218 +0 - 218 ) diff --git a/layout/reftests/transform-3d/reftest.list b/layout/reftests/transform-3d/reftest.list index 8c46f6442f699..2108cad8424df 100644 --- a/layout/reftests/transform-3d/reftest.list +++ b/layout/reftests/transform-3d/reftest.list @@ -2044,10 +2044,10 @@ fuzzy if ( useDrawSnapshot -4 +0 - 4 -13 +0 - 13 )