mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-21 09:15:35 +00:00
Bug 1548687 - Remove unnecessary root layers id argument. r=botond
The APZCTreeManager already knows its root layers id, so we don't need to be passing it all over the place. I previously verified via a try push with an assertion that the incoming aRootLayersId is always equal to mRootLayersId. Differential Revision: https://phabricator.services.mozilla.com/D35200 --HG-- extra : moz-landing-system : lando
This commit is contained in:
parent
3d724ce105
commit
51689ccfe3
@ -62,7 +62,7 @@ class APZUpdater {
|
||||
void UpdateFocusState(LayersId aRootLayerTreeId,
|
||||
WRRootId aOriginatingWrRootId,
|
||||
const FocusTarget& aFocusTarget);
|
||||
void UpdateHitTestingTree(LayersId aRootLayerTreeId, Layer* aRoot,
|
||||
void UpdateHitTestingTree(Layer* aRoot,
|
||||
bool aIsFirstPaint, LayersId aOriginatingLayersId,
|
||||
uint32_t aPaintSequenceNumber);
|
||||
/**
|
||||
|
@ -359,8 +359,7 @@ void APZCTreeManager::SetAllowedTouchBehavior(
|
||||
|
||||
template <class ScrollNode>
|
||||
void // ScrollNode is a LayerMetricsWrapper or a WebRenderScrollDataWrapper
|
||||
APZCTreeManager::UpdateHitTestingTreeImpl(LayersId aRootLayerTreeId,
|
||||
const ScrollNode& aRoot,
|
||||
APZCTreeManager::UpdateHitTestingTreeImpl(const ScrollNode& aRoot,
|
||||
bool aIsFirstPaint,
|
||||
WRRootId aOriginatingWrRootId,
|
||||
uint32_t aPaintSequenceNumber) {
|
||||
@ -378,7 +377,7 @@ APZCTreeManager::UpdateHitTestingTreeImpl(LayersId aRootLayerTreeId,
|
||||
testData->StartNewPaint(aPaintSequenceNumber);
|
||||
}
|
||||
|
||||
TreeBuildingState state(aRootLayerTreeId, aIsFirstPaint, aOriginatingWrRootId,
|
||||
TreeBuildingState state(mRootLayersId, aIsFirstPaint, aOriginatingWrRootId,
|
||||
testData, aPaintSequenceNumber);
|
||||
|
||||
// We do this business with collecting the entire tree into an array because
|
||||
@ -410,7 +409,7 @@ APZCTreeManager::UpdateHitTestingTreeImpl(LayersId aRootLayerTreeId,
|
||||
std::stack<AncestorTransform> ancestorTransforms;
|
||||
HitTestingTreeNode* parent = nullptr;
|
||||
HitTestingTreeNode* next = nullptr;
|
||||
LayersId layersId = aRootLayerTreeId;
|
||||
LayersId layersId = mRootLayersId;
|
||||
wr::RenderRoot renderRoot = wr::RenderRoot::Default;
|
||||
ancestorTransforms.push(AncestorTransform());
|
||||
state.mParentHasPerspective.push(false);
|
||||
@ -599,7 +598,7 @@ APZCTreeManager::UpdateHitTestingTreeImpl(LayersId aRootLayerTreeId,
|
||||
mRootNode->Dump(" ");
|
||||
}
|
||||
#endif
|
||||
CollectTransformsForChromeMainThread(aRootLayerTreeId);
|
||||
CollectTransformsForChromeMainThread();
|
||||
}
|
||||
|
||||
void APZCTreeManager::UpdateFocusState(LayersId aRootLayerTreeId,
|
||||
@ -614,25 +613,24 @@ void APZCTreeManager::UpdateFocusState(LayersId aRootLayerTreeId,
|
||||
mFocusState.Update(aRootLayerTreeId, aOriginatingLayersId, aFocusTarget);
|
||||
}
|
||||
|
||||
void APZCTreeManager::UpdateHitTestingTree(LayersId aRootLayerTreeId,
|
||||
Layer* aRoot, bool aIsFirstPaint,
|
||||
void APZCTreeManager::UpdateHitTestingTree(Layer* aRoot, bool aIsFirstPaint,
|
||||
LayersId aOriginatingLayersId,
|
||||
uint32_t aPaintSequenceNumber) {
|
||||
AssertOnUpdaterThread();
|
||||
|
||||
LayerMetricsWrapper root(aRoot);
|
||||
UpdateHitTestingTreeImpl(aRootLayerTreeId, root, aIsFirstPaint,
|
||||
UpdateHitTestingTreeImpl(root, aIsFirstPaint,
|
||||
WRRootId::NonWebRender(aOriginatingLayersId),
|
||||
aPaintSequenceNumber);
|
||||
}
|
||||
|
||||
void APZCTreeManager::UpdateHitTestingTree(
|
||||
LayersId aRootLayerTreeId, const WebRenderScrollDataWrapper& aScrollWrapper,
|
||||
const WebRenderScrollDataWrapper& aScrollWrapper,
|
||||
bool aIsFirstPaint, WRRootId aOriginatingWrRootId,
|
||||
uint32_t aPaintSequenceNumber) {
|
||||
AssertOnUpdaterThread();
|
||||
|
||||
UpdateHitTestingTreeImpl(aRootLayerTreeId, aScrollWrapper, aIsFirstPaint,
|
||||
UpdateHitTestingTreeImpl(aScrollWrapper, aIsFirstPaint,
|
||||
aOriginatingWrRootId, aPaintSequenceNumber);
|
||||
}
|
||||
|
||||
@ -3259,10 +3257,9 @@ bool APZCTreeManager::GetAPZTestData(LayersId aLayersId,
|
||||
return true;
|
||||
}
|
||||
|
||||
void APZCTreeManager::CollectTransformsForChromeMainThread(
|
||||
LayersId aRootLayerTreeId) {
|
||||
void APZCTreeManager::CollectTransformsForChromeMainThread() {
|
||||
RefPtr<GeckoContentController> controller =
|
||||
GetContentController(aRootLayerTreeId);
|
||||
GetContentController(mRootLayersId);
|
||||
if (!controller) {
|
||||
return;
|
||||
}
|
||||
|
@ -183,11 +183,9 @@ class APZCTreeManager : public IAPZCTreeManager, public APZInputBridge {
|
||||
*
|
||||
* This must be called on the updater thread as it walks the layer tree.
|
||||
*
|
||||
* @param aRootLayerTreeId The layer tree ID of the root layer corresponding
|
||||
* to this APZCTreeManager
|
||||
* @param aRoot The root of the (full) layer tree
|
||||
* @param aFirstPaintLayersId The layers id of the subtree to which
|
||||
* aIsFirstPaint applies.
|
||||
* @param aOriginatingLayersId The layers id of the subtree that triggered
|
||||
* this repaint, and to which aIsFirstPaint applies.
|
||||
* @param aIsFirstPaint True if the layers update that this is called in
|
||||
* response to included a first-paint. If this is true,
|
||||
* the part of the tree that is affected by the
|
||||
@ -198,7 +196,7 @@ class APZCTreeManager : public IAPZCTreeManager, public APZInputBridge {
|
||||
* process' layer subtree has its own sequence
|
||||
* numbers.
|
||||
*/
|
||||
void UpdateHitTestingTree(LayersId aRootLayerTreeId, Layer* aRoot,
|
||||
void UpdateHitTestingTree(Layer* aRoot,
|
||||
bool aIsFirstPaint, LayersId aOriginatingLayersId,
|
||||
uint32_t aPaintSequenceNumber);
|
||||
|
||||
@ -208,8 +206,7 @@ class APZCTreeManager : public IAPZCTreeManager, public APZInputBridge {
|
||||
* tree. This version is used when WebRender is enabled because we don't have
|
||||
* shadow layers in that scenario.
|
||||
*/
|
||||
void UpdateHitTestingTree(LayersId aRootLayerTreeId,
|
||||
const WebRenderScrollDataWrapper& aScrollWrapper,
|
||||
void UpdateHitTestingTree(const WebRenderScrollDataWrapper& aScrollWrapper,
|
||||
bool aIsFirstPaint, WRRootId aOriginatingWrRootId,
|
||||
uint32_t aPaintSequenceNumber);
|
||||
|
||||
@ -507,7 +504,7 @@ class APZCTreeManager : public IAPZCTreeManager, public APZInputBridge {
|
||||
* transforms from layer coordinate space to root coordinate space, and
|
||||
* sends these over to the main thread of the chrome process.
|
||||
*/
|
||||
void CollectTransformsForChromeMainThread(LayersId aRootLayerTreeId);
|
||||
void CollectTransformsForChromeMainThread();
|
||||
|
||||
/**
|
||||
* Compute the updated shadow transform for a scroll thumb layer that
|
||||
@ -641,8 +638,7 @@ class APZCTreeManager : public IAPZCTreeManager, public APZInputBridge {
|
||||
|
||||
/* Helpers */
|
||||
template <class ScrollNode>
|
||||
void UpdateHitTestingTreeImpl(LayersId aRootLayerTreeId,
|
||||
const ScrollNode& aRoot, bool aIsFirstPaint,
|
||||
void UpdateHitTestingTreeImpl(const ScrollNode& aRoot, bool aIsFirstPaint,
|
||||
WRRootId aOriginatingWrRootId,
|
||||
uint32_t aPaintSequenceNumber);
|
||||
|
||||
|
@ -177,13 +177,13 @@ void APZUpdater::UpdateFocusState(LayersId aRootLayerTreeId,
|
||||
aOriginatingWrRootId.mLayersId, aFocusTarget));
|
||||
}
|
||||
|
||||
void APZUpdater::UpdateHitTestingTree(LayersId aRootLayerTreeId, Layer* aRoot,
|
||||
void APZUpdater::UpdateHitTestingTree(Layer* aRoot,
|
||||
bool aIsFirstPaint,
|
||||
LayersId aOriginatingWrRootId,
|
||||
uint32_t aPaintSequenceNumber) {
|
||||
MOZ_ASSERT(CompositorThreadHolder::IsInCompositorThread());
|
||||
AssertOnUpdaterThread();
|
||||
mApz->UpdateHitTestingTree(aRootLayerTreeId, aRoot, aIsFirstPaint,
|
||||
mApz->UpdateHitTestingTree(aRoot, aIsFirstPaint,
|
||||
aOriginatingWrRootId, aPaintSequenceNumber);
|
||||
}
|
||||
|
||||
@ -216,7 +216,6 @@ void APZUpdater::UpdateScrollDataAndTreeState(
|
||||
return;
|
||||
}
|
||||
self->mApz->UpdateHitTestingTree(
|
||||
aRootLayerTreeId.mLayersId,
|
||||
WebRenderScrollDataWrapper(
|
||||
*self, aRootLayerTreeId, &(root->second)),
|
||||
aScrollData.IsFirstPaint(), aOriginatingWrRootId,
|
||||
@ -241,7 +240,6 @@ void APZUpdater::UpdateScrollOffsets(WRRootId aRootLayerTreeId,
|
||||
return;
|
||||
}
|
||||
self->mApz->UpdateHitTestingTree(
|
||||
aRootLayerTreeId.mLayersId,
|
||||
WebRenderScrollDataWrapper(
|
||||
*self, aRootLayerTreeId, &(root->second)),
|
||||
/*isFirstPaint*/ false, aOriginatingWrRootId,
|
||||
|
@ -47,7 +47,7 @@ class APZEventRegionsTester : public APZCTreeManagerTester {
|
||||
|
||||
registration = MakeUnique<ScopedLayerTreeRegistration>(manager, LayersId{0},
|
||||
root, mcc);
|
||||
manager->UpdateHitTestingTree(LayersId{0}, root, false, LayersId{0}, 0);
|
||||
manager->UpdateHitTestingTree(root, false, LayersId{0}, 0);
|
||||
rootApzc = ApzcOf(root);
|
||||
}
|
||||
|
||||
@ -70,7 +70,7 @@ class APZEventRegionsTester : public APZCTreeManagerTester {
|
||||
|
||||
registration = MakeUnique<ScopedLayerTreeRegistration>(manager, LayersId{0},
|
||||
root, mcc);
|
||||
manager->UpdateHitTestingTree(LayersId{0}, root, false, LayersId{0}, 0);
|
||||
manager->UpdateHitTestingTree(root, false, LayersId{0}, 0);
|
||||
rootApzc = ApzcOf(root);
|
||||
}
|
||||
|
||||
@ -111,7 +111,7 @@ class APZEventRegionsTester : public APZCTreeManagerTester {
|
||||
|
||||
registration = MakeUnique<ScopedLayerTreeRegistration>(manager, LayersId{0},
|
||||
root, mcc);
|
||||
manager->UpdateHitTestingTree(LayersId{0}, root, false, LayersId{0}, 0);
|
||||
manager->UpdateHitTestingTree(root, false, LayersId{0}, 0);
|
||||
rootApzc = ApzcOf(root);
|
||||
}
|
||||
|
||||
@ -136,7 +136,7 @@ class APZEventRegionsTester : public APZCTreeManagerTester {
|
||||
|
||||
registration = MakeUnique<ScopedLayerTreeRegistration>(manager, LayersId{0},
|
||||
root, mcc);
|
||||
manager->UpdateHitTestingTree(LayersId{0}, root, false, LayersId{0}, 0);
|
||||
manager->UpdateHitTestingTree(root, false, LayersId{0}, 0);
|
||||
}
|
||||
|
||||
void CreateBug1117712LayerTree() {
|
||||
@ -178,7 +178,7 @@ class APZEventRegionsTester : public APZCTreeManagerTester {
|
||||
|
||||
registration = MakeUnique<ScopedLayerTreeRegistration>(manager, LayersId{0},
|
||||
root, mcc);
|
||||
manager->UpdateHitTestingTree(LayersId{0}, root, false, LayersId{0}, 0);
|
||||
manager->UpdateHitTestingTree(root, false, LayersId{0}, 0);
|
||||
}
|
||||
};
|
||||
|
||||
@ -265,7 +265,7 @@ TEST_F(APZEventRegionsTester, Obscuration) {
|
||||
CreateObscuringLayerTree();
|
||||
ScopedLayerTreeRegistration registration(manager, LayersId{0}, root, mcc);
|
||||
|
||||
manager->UpdateHitTestingTree(LayersId{0}, root, false, LayersId{0}, 0);
|
||||
manager->UpdateHitTestingTree(root, false, LayersId{0}, 0);
|
||||
|
||||
RefPtr<TestAsyncPanZoomController> parent = ApzcOf(layers[1]);
|
||||
TestAsyncPanZoomController* child = ApzcOf(layers[2]);
|
||||
|
@ -147,7 +147,7 @@ TEST_F(APZHitTestingTester, HitTesting1) {
|
||||
|
||||
// Now we have a root APZC that will match the page
|
||||
SetScrollableFrameMetrics(root, ScrollableLayerGuid::START_SCROLL_ID);
|
||||
manager->UpdateHitTestingTree(LayersId{0}, root, false, LayersId{0},
|
||||
manager->UpdateHitTestingTree(root, false, LayersId{0},
|
||||
paintSequenceNumber++);
|
||||
hit = GetTargetAPZC(ScreenPoint(15, 15));
|
||||
EXPECT_EQ(ApzcOf(root), hit.get());
|
||||
@ -160,7 +160,7 @@ TEST_F(APZHitTestingTester, HitTesting1) {
|
||||
// Now we have a sub APZC with a better fit
|
||||
SetScrollableFrameMetrics(layers[3],
|
||||
ScrollableLayerGuid::START_SCROLL_ID + 1);
|
||||
manager->UpdateHitTestingTree(LayersId{0}, root, false, LayersId{0},
|
||||
manager->UpdateHitTestingTree(root, false, LayersId{0},
|
||||
paintSequenceNumber++);
|
||||
EXPECT_NE(ApzcOf(root), ApzcOf(layers[3]));
|
||||
hit = GetTargetAPZC(ScreenPoint(25, 25));
|
||||
@ -179,7 +179,7 @@ TEST_F(APZHitTestingTester, HitTesting1) {
|
||||
// Now test hit testing when we have two scrollable layers
|
||||
SetScrollableFrameMetrics(layers[4],
|
||||
ScrollableLayerGuid::START_SCROLL_ID + 2);
|
||||
manager->UpdateHitTestingTree(LayersId{0}, root, false, LayersId{0},
|
||||
manager->UpdateHitTestingTree(root, false, LayersId{0},
|
||||
paintSequenceNumber++);
|
||||
hit = GetTargetAPZC(ScreenPoint(15, 15));
|
||||
EXPECT_EQ(ApzcOf(layers[4]), hit.get());
|
||||
@ -218,7 +218,7 @@ TEST_F(APZHitTestingTester, HitTesting2) {
|
||||
CreateHitTesting2LayerTree();
|
||||
ScopedLayerTreeRegistration registration(manager, LayersId{0}, root, mcc);
|
||||
|
||||
manager->UpdateHitTestingTree(LayersId{0}, root, false, LayersId{0}, 0);
|
||||
manager->UpdateHitTestingTree(root, false, LayersId{0}, 0);
|
||||
|
||||
// At this point, the following holds (all coordinates in screen pixels):
|
||||
// layers[0] has content from (0,0)-(200,200), clipped by composition bounds
|
||||
@ -363,7 +363,7 @@ TEST_F(APZHitTestingTester, HitTesting3) {
|
||||
|
||||
ScopedLayerTreeRegistration registration(manager, LayersId{0}, root, mcc);
|
||||
|
||||
manager->UpdateHitTestingTree(LayersId{0}, root, false, LayersId{0}, 0);
|
||||
manager->UpdateHitTestingTree(root, false, LayersId{0}, 0);
|
||||
|
||||
RefPtr<AsyncPanZoomController> hit = GetTargetAPZC(ScreenPoint(75, 75));
|
||||
EXPECT_EQ(ApzcOf(layers[1]), hit.get());
|
||||
@ -374,7 +374,7 @@ TEST_F(APZHitTestingTester, ComplexMultiLayerTree) {
|
||||
|
||||
CreateComplexMultiLayerTree();
|
||||
ScopedLayerTreeRegistration registration(manager, LayersId{0}, root, mcc);
|
||||
manager->UpdateHitTestingTree(LayersId{0}, root, false, LayersId{0}, 0);
|
||||
manager->UpdateHitTestingTree(root, false, LayersId{0}, 0);
|
||||
|
||||
/* The layer tree looks like this:
|
||||
|
||||
@ -464,7 +464,7 @@ TEST_F(APZHitTestingTester, TestRepaintFlushOnNewInputBlock) {
|
||||
|
||||
CreateSimpleScrollingLayer();
|
||||
ScopedLayerTreeRegistration registration(manager, LayersId{0}, root, mcc);
|
||||
manager->UpdateHitTestingTree(LayersId{0}, root, false, LayersId{0}, 0);
|
||||
manager->UpdateHitTestingTree(root, false, LayersId{0}, 0);
|
||||
RefPtr<TestAsyncPanZoomController> apzcroot = ApzcOf(root);
|
||||
|
||||
// At this point, the following holds (all coordinates in screen pixels):
|
||||
@ -537,7 +537,7 @@ TEST_F(APZHitTestingTester, TestRepaintFlushOnWheelEvents) {
|
||||
|
||||
CreateSimpleScrollingLayer();
|
||||
ScopedLayerTreeRegistration registration(manager, LayersId{0}, root, mcc);
|
||||
manager->UpdateHitTestingTree(LayersId{0}, root, false, LayersId{0}, 0);
|
||||
manager->UpdateHitTestingTree(root, false, LayersId{0}, 0);
|
||||
TestAsyncPanZoomController* apzcroot = ApzcOf(root);
|
||||
|
||||
EXPECT_CALL(*mcc, RequestContentRepaint(_)).Times(AtLeast(3));
|
||||
@ -567,7 +567,7 @@ TEST_F(APZHitTestingTester, TestForceDisableApz) {
|
||||
CreateSimpleScrollingLayer();
|
||||
DisableApzOn(root);
|
||||
ScopedLayerTreeRegistration registration(manager, LayersId{0}, root, mcc);
|
||||
manager->UpdateHitTestingTree(LayersId{0}, root, false, LayersId{0}, 0);
|
||||
manager->UpdateHitTestingTree(root, false, LayersId{0}, 0);
|
||||
TestAsyncPanZoomController* apzcroot = ApzcOf(root);
|
||||
|
||||
ScreenPoint origin(100, 50);
|
||||
@ -614,7 +614,7 @@ TEST_F(APZHitTestingTester, TestForceDisableApz) {
|
||||
TEST_F(APZHitTestingTester, Bug1148350) {
|
||||
CreateBug1148350LayerTree();
|
||||
ScopedLayerTreeRegistration registration(manager, LayersId{0}, root, mcc);
|
||||
manager->UpdateHitTestingTree(LayersId{0}, root, false, LayersId{0}, 0);
|
||||
manager->UpdateHitTestingTree(root, false, LayersId{0}, 0);
|
||||
|
||||
MockFunction<void(std::string checkPointName)> check;
|
||||
{
|
||||
@ -644,7 +644,7 @@ TEST_F(APZHitTestingTester, Bug1148350) {
|
||||
|
||||
layers[0]->SetVisibleRegion(LayerIntRegion(LayerIntRect(0, 50, 200, 150)));
|
||||
layers[0]->SetBaseTransform(Matrix4x4::Translation(0, 50, 0));
|
||||
manager->UpdateHitTestingTree(LayersId{0}, root, false, LayersId{0}, 0);
|
||||
manager->UpdateHitTestingTree(root, false, LayersId{0}, 0);
|
||||
|
||||
TouchUp(manager, ScreenIntPoint(100, 100), mcc->Time());
|
||||
mcc->RunThroughDelayedTasks();
|
||||
@ -684,7 +684,7 @@ TEST_F(APZHitTestingTester, HitTestingRespectsScrollClip_Bug1257288) {
|
||||
|
||||
// Build the hit testing tree.
|
||||
ScopedLayerTreeRegistration registration(manager, LayersId{0}, root, mcc);
|
||||
manager->UpdateHitTestingTree(LayersId{0}, root, false, LayersId{0}, 0);
|
||||
manager->UpdateHitTestingTree(root, false, LayersId{0}, 0);
|
||||
|
||||
// Pan on a region that's inside layers[2]'s layer clip, but outside
|
||||
// its subframe metadata's scroll clip.
|
||||
|
@ -14,7 +14,7 @@ TEST_F(APZCTreeManagerTester, WheelInterruptedByMouseDrag) {
|
||||
// Set up a scrollable layer
|
||||
CreateSimpleScrollingLayer();
|
||||
ScopedLayerTreeRegistration registration(manager, LayersId{0}, root, mcc);
|
||||
manager->UpdateHitTestingTree(LayersId{0}, root, false, LayersId{0}, 0);
|
||||
manager->UpdateHitTestingTree(root, false, LayersId{0}, 0);
|
||||
RefPtr<TestAsyncPanZoomController> apzc = ApzcOf(root);
|
||||
|
||||
uint64_t dragBlockId = 0;
|
||||
|
@ -27,7 +27,7 @@ class APZScrollHandoffTester : public APZCTreeManagerTester {
|
||||
SetScrollHandoff(layers[1], root);
|
||||
registration = MakeUnique<ScopedLayerTreeRegistration>(manager, LayersId{0},
|
||||
root, mcc);
|
||||
manager->UpdateHitTestingTree(LayersId{0}, root, false, LayersId{0}, 0);
|
||||
manager->UpdateHitTestingTree(root, false, LayersId{0}, 0);
|
||||
rootApzc = ApzcOf(root);
|
||||
rootApzc->GetFrameMetrics().SetIsRootContent(
|
||||
true); // make root APZC zoomable
|
||||
@ -53,7 +53,7 @@ class APZScrollHandoffTester : public APZCTreeManagerTester {
|
||||
// No ScopedLayerTreeRegistration as that just needs to be done once per
|
||||
// test and this is the second layer tree for a particular test.
|
||||
MOZ_ASSERT(registration);
|
||||
manager->UpdateHitTestingTree(LayersId{0}, root, false, LayersId{0}, 0);
|
||||
manager->UpdateHitTestingTree(root, false, LayersId{0}, 0);
|
||||
rootApzc = ApzcOf(root);
|
||||
}
|
||||
|
||||
@ -88,7 +88,7 @@ class APZScrollHandoffTester : public APZCTreeManagerTester {
|
||||
SetScrollHandoff(layers[4], layers[3]);
|
||||
registration = MakeUnique<ScopedLayerTreeRegistration>(manager, LayersId{0},
|
||||
root, mcc);
|
||||
manager->UpdateHitTestingTree(LayersId{0}, root, false, LayersId{0}, 0);
|
||||
manager->UpdateHitTestingTree(root, false, LayersId{0}, 0);
|
||||
}
|
||||
|
||||
// Creates a layer tree with a parent layer that is only scrollable
|
||||
@ -107,7 +107,7 @@ class APZScrollHandoffTester : public APZCTreeManagerTester {
|
||||
SetScrollHandoff(layers[1], root);
|
||||
registration = MakeUnique<ScopedLayerTreeRegistration>(manager, LayersId{0},
|
||||
root, mcc);
|
||||
manager->UpdateHitTestingTree(LayersId{0}, root, false, LayersId{0}, 0);
|
||||
manager->UpdateHitTestingTree(root, false, LayersId{0}, 0);
|
||||
rootApzc = ApzcOf(root);
|
||||
}
|
||||
|
||||
@ -128,7 +128,7 @@ class APZScrollHandoffTester : public APZCTreeManagerTester {
|
||||
SetScrollHandoff(layers[1], root);
|
||||
registration = MakeUnique<ScopedLayerTreeRegistration>(manager, LayersId{0},
|
||||
root, mcc);
|
||||
manager->UpdateHitTestingTree(LayersId{0}, root, false, LayersId{0}, 0);
|
||||
manager->UpdateHitTestingTree(root, false, LayersId{0}, 0);
|
||||
rootApzc = ApzcOf(root);
|
||||
rootApzc->GetScrollMetadata().SetHasScrollgrab(true);
|
||||
}
|
||||
|
@ -41,7 +41,7 @@ TEST_F(APZCSnappingTester, Bug1265510) {
|
||||
|
||||
UniquePtr<ScopedLayerTreeRegistration> registration =
|
||||
MakeUnique<ScopedLayerTreeRegistration>(manager, LayersId{0}, root, mcc);
|
||||
manager->UpdateHitTestingTree(LayersId{0}, root, false, LayersId{0}, 0);
|
||||
manager->UpdateHitTestingTree(root, false, LayersId{0}, 0);
|
||||
|
||||
TestAsyncPanZoomController* outer = ApzcOf(layers[0]);
|
||||
TestAsyncPanZoomController* inner = ApzcOf(layers[1]);
|
||||
@ -121,7 +121,7 @@ TEST_F(APZCSnappingTester, Snap_After_Pinch) {
|
||||
|
||||
UniquePtr<ScopedLayerTreeRegistration> registration =
|
||||
MakeUnique<ScopedLayerTreeRegistration>(manager, LayersId{0}, root, mcc);
|
||||
manager->UpdateHitTestingTree(LayersId{0}, root, false, LayersId{0}, 0);
|
||||
manager->UpdateHitTestingTree(root, false, LayersId{0}, 0);
|
||||
|
||||
RefPtr<TestAsyncPanZoomController> apzc = ApzcOf(root);
|
||||
|
||||
|
@ -41,7 +41,7 @@ TEST_F(APZCSnappingOnMomentumTester, Snap_On_Momentum) {
|
||||
|
||||
UniquePtr<ScopedLayerTreeRegistration> registration =
|
||||
MakeUnique<ScopedLayerTreeRegistration>(manager, LayersId{0}, root, mcc);
|
||||
manager->UpdateHitTestingTree(LayersId{0}, root, false, LayersId{0}, 0);
|
||||
manager->UpdateHitTestingTree(root, false, LayersId{0}, 0);
|
||||
|
||||
RefPtr<TestAsyncPanZoomController> apzc = ApzcOf(root);
|
||||
|
||||
|
@ -15,7 +15,7 @@ TEST_F(APZCTreeManagerTester, ScrollablePaintedLayers) {
|
||||
// both layers have the same scrollId
|
||||
SetScrollableFrameMetrics(layers[1], ScrollableLayerGuid::START_SCROLL_ID);
|
||||
SetScrollableFrameMetrics(layers[2], ScrollableLayerGuid::START_SCROLL_ID);
|
||||
manager->UpdateHitTestingTree(LayersId{0}, root, false, LayersId{0}, 0);
|
||||
manager->UpdateHitTestingTree(root, false, LayersId{0}, 0);
|
||||
|
||||
TestAsyncPanZoomController* nullAPZC = nullptr;
|
||||
// so they should have the same APZC
|
||||
@ -27,14 +27,14 @@ TEST_F(APZCTreeManagerTester, ScrollablePaintedLayers) {
|
||||
// Change the scrollId of layers[1], and verify the APZC changes
|
||||
SetScrollableFrameMetrics(layers[1],
|
||||
ScrollableLayerGuid::START_SCROLL_ID + 1);
|
||||
manager->UpdateHitTestingTree(LayersId{0}, root, false, LayersId{0}, 0);
|
||||
manager->UpdateHitTestingTree(root, false, LayersId{0}, 0);
|
||||
EXPECT_NE(ApzcOf(layers[1]), ApzcOf(layers[2]));
|
||||
|
||||
// Change the scrollId of layers[2] to match that of layers[1], ensure we get
|
||||
// the same APZC for both again
|
||||
SetScrollableFrameMetrics(layers[2],
|
||||
ScrollableLayerGuid::START_SCROLL_ID + 1);
|
||||
manager->UpdateHitTestingTree(LayersId{0}, root, false, LayersId{0}, 0);
|
||||
manager->UpdateHitTestingTree(root, false, LayersId{0}, 0);
|
||||
EXPECT_EQ(ApzcOf(layers[1]), ApzcOf(layers[2]));
|
||||
}
|
||||
|
||||
@ -42,7 +42,7 @@ TEST_F(APZCTreeManagerTester, Bug1068268) {
|
||||
CreatePotentiallyLeakingTree();
|
||||
ScopedLayerTreeRegistration registration(manager, LayersId{0}, root, mcc);
|
||||
|
||||
manager->UpdateHitTestingTree(LayersId{0}, root, false, LayersId{0}, 0);
|
||||
manager->UpdateHitTestingTree(root, false, LayersId{0}, 0);
|
||||
RefPtr<HitTestingTreeNode> root = manager->GetRootNode();
|
||||
RefPtr<HitTestingTreeNode> node2 = root->GetFirstChild()->GetFirstChild();
|
||||
RefPtr<HitTestingTreeNode> node5 = root->GetLastChild()->GetLastChild();
|
||||
@ -63,7 +63,7 @@ TEST_F(APZCTreeManagerTester, Bug1068268) {
|
||||
TEST_F(APZCTreeManagerTester, Bug1194876) {
|
||||
CreateBug1194876Tree();
|
||||
ScopedLayerTreeRegistration registration(manager, LayersId{0}, root, mcc);
|
||||
manager->UpdateHitTestingTree(LayersId{0}, root, false, LayersId{0}, 0);
|
||||
manager->UpdateHitTestingTree(root, false, LayersId{0}, 0);
|
||||
|
||||
uint64_t blockId;
|
||||
nsTArray<ScrollableLayerGuid> targets;
|
||||
@ -103,7 +103,7 @@ TEST_F(APZCTreeManagerTester, Bug1198900) {
|
||||
// crash.
|
||||
CreateSimpleDTCScrollingLayer();
|
||||
ScopedLayerTreeRegistration registration(manager, LayersId{0}, root, mcc);
|
||||
manager->UpdateHitTestingTree(LayersId{0}, root, false, LayersId{0}, 0);
|
||||
manager->UpdateHitTestingTree(root, false, LayersId{0}, 0);
|
||||
|
||||
ScreenPoint origin(100, 50);
|
||||
ScrollWheelInput swi(MillisecondsSinceStartup(mcc->Time()), mcc->Time(), 0,
|
||||
@ -124,7 +124,7 @@ TEST_F(APZCTreeManagerTester, Bug1551582) {
|
||||
// bounds of 200x200, leading to a scroll range of (0,0,300,300).
|
||||
CreateSimpleScrollingLayer();
|
||||
ScopedLayerTreeRegistration registration(manager, LayersId{0}, root, mcc);
|
||||
manager->UpdateHitTestingTree(LayersId{0}, root, false, LayersId{0}, 0);
|
||||
manager->UpdateHitTestingTree(root, false, LayersId{0}, 0);
|
||||
|
||||
// Simulate the main thread scrolling to the end of the scroll range.
|
||||
ModifyFrameMetrics(root, [](FrameMetrics& aMetrics) {
|
||||
@ -132,7 +132,7 @@ TEST_F(APZCTreeManagerTester, Bug1551582) {
|
||||
aMetrics.SetScrollGeneration(1);
|
||||
aMetrics.SetScrollOffsetUpdateType(FrameMetrics::eMainThread);
|
||||
});
|
||||
manager->UpdateHitTestingTree(LayersId{0}, root, false, LayersId{0}, 0);
|
||||
manager->UpdateHitTestingTree(root, false, LayersId{0}, 0);
|
||||
|
||||
// Sanity check.
|
||||
RefPtr<TestAsyncPanZoomController> apzc = ApzcOf(root);
|
||||
@ -145,7 +145,7 @@ TEST_F(APZCTreeManagerTester, Bug1551582) {
|
||||
ModifyFrameMetrics(root, [](FrameMetrics& aMetrics) {
|
||||
aMetrics.SetScrollableRect(CSSRect(0, 0, 400, 400));
|
||||
});
|
||||
manager->UpdateHitTestingTree(LayersId{0}, root, false, LayersId{0}, 0);
|
||||
manager->UpdateHitTestingTree(root, false, LayersId{0}, 0);
|
||||
|
||||
// Check that APZ has clamped the scroll offset to (200,200) for us.
|
||||
compositedScrollOffset = apzc->GetCompositedScrollOffset();
|
||||
@ -156,7 +156,7 @@ TEST_F(APZCTreeManagerTester, Bug1557424) {
|
||||
// bounds of 200x200, leading to a scroll range of (0,0,300,300).
|
||||
CreateSimpleScrollingLayer();
|
||||
ScopedLayerTreeRegistration registration(manager, LayersId{0}, root, mcc);
|
||||
manager->UpdateHitTestingTree(LayersId{0}, root, false, LayersId{0}, 0);
|
||||
manager->UpdateHitTestingTree(root, false, LayersId{0}, 0);
|
||||
|
||||
// Simulate the main thread scrolling to the end of the scroll range.
|
||||
ModifyFrameMetrics(root, [](FrameMetrics& aMetrics) {
|
||||
@ -164,7 +164,7 @@ TEST_F(APZCTreeManagerTester, Bug1557424) {
|
||||
aMetrics.SetScrollGeneration(1);
|
||||
aMetrics.SetScrollOffsetUpdateType(FrameMetrics::eMainThread);
|
||||
});
|
||||
manager->UpdateHitTestingTree(LayersId{0}, root, false, LayersId{0}, 0);
|
||||
manager->UpdateHitTestingTree(root, false, LayersId{0}, 0);
|
||||
|
||||
// Sanity check.
|
||||
RefPtr<TestAsyncPanZoomController> apzc = ApzcOf(root);
|
||||
@ -177,7 +177,7 @@ TEST_F(APZCTreeManagerTester, Bug1557424) {
|
||||
ModifyFrameMetrics(root, [](FrameMetrics& aMetrics) {
|
||||
aMetrics.SetCompositionBounds(ParentLayerRect(0, 0, 300, 300));
|
||||
});
|
||||
manager->UpdateHitTestingTree(LayersId{0}, root, false, LayersId{0}, 0);
|
||||
manager->UpdateHitTestingTree(root, false, LayersId{0}, 0);
|
||||
|
||||
// Check that APZ has clamped the scroll offset to (200,200) for us.
|
||||
compositedScrollOffset = apzc->GetCompositedScrollOffset();
|
||||
|
@ -852,7 +852,7 @@ void CompositorBridgeParent::NotifyShadowTreeTransaction(
|
||||
WRRootId::NonWebRender(aId), aFocusTarget);
|
||||
if (aHitTestUpdate) {
|
||||
mApzUpdater->UpdateHitTestingTree(
|
||||
mRootLayerTreeID, mLayerManager->GetRoot(), aIsFirstPaint, aId,
|
||||
mLayerManager->GetRoot(), aIsFirstPaint, aId,
|
||||
aPaintSequenceNumber);
|
||||
}
|
||||
}
|
||||
@ -1247,7 +1247,7 @@ void CompositorBridgeParent::ShadowLayersUpdated(
|
||||
if (aHitTestUpdate) {
|
||||
AutoResolveRefLayers resolve(mCompositionManager);
|
||||
|
||||
mApzUpdater->UpdateHitTestingTree(mRootLayerTreeID, root,
|
||||
mApzUpdater->UpdateHitTestingTree(root,
|
||||
aInfo.isFirstPaint(), mRootLayerTreeID,
|
||||
aInfo.paintSequenceNumber());
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user