mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 941138 - Move the code to update the cached transform. r=botond
This commit is contained in:
parent
ab79c85864
commit
abb983b7c2
@ -400,9 +400,6 @@ APZCTreeManager::GetTouchInputBlockAPZC(const WidgetTouchEvent& aEvent,
|
||||
// Prepare for possible overscroll handoff.
|
||||
BuildOverscrollHandoffChain(apzc);
|
||||
}
|
||||
gfx3DMatrix transformToApzc, transformToGecko;
|
||||
// Reset the cached apz transform
|
||||
mCachedTransformToApzcForInputBlock = transformToApzc;
|
||||
if (!apzc) {
|
||||
return apzc.forget();
|
||||
}
|
||||
@ -417,10 +414,6 @@ APZCTreeManager::GetTouchInputBlockAPZC(const WidgetTouchEvent& aEvent,
|
||||
apzc = RootAPZCForLayersId(apzc);
|
||||
APZC_LOG("Using APZC %p as the root APZC for multi-touch\n", apzc.get());
|
||||
}
|
||||
if (apzc) {
|
||||
// Cache apz transform so it can be used for future events in this block.
|
||||
GetInputTransforms(apzc, mCachedTransformToApzcForInputBlock, transformToGecko);
|
||||
}
|
||||
return apzc.forget();
|
||||
}
|
||||
|
||||
@ -439,6 +432,14 @@ APZCTreeManager::ProcessTouchEvent(const WidgetTouchEvent& aEvent,
|
||||
mTouchCount++;
|
||||
ScreenPoint point = ScreenPoint(aEvent.touches[0]->mRefPoint.x, aEvent.touches[0]->mRefPoint.y);
|
||||
mApzcForInputBlock = GetTouchInputBlockAPZC(aEvent, point);
|
||||
if (mApzcForInputBlock) {
|
||||
// Cache apz transform so it can be used for future events in this block.
|
||||
gfx3DMatrix transformToGecko;
|
||||
GetInputTransforms(mApzcForInputBlock, mCachedTransformToApzcForInputBlock, transformToGecko);
|
||||
} else {
|
||||
// Reset the cached apz transform
|
||||
mCachedTransformToApzcForInputBlock = gfx3DMatrix();
|
||||
}
|
||||
}
|
||||
|
||||
if (mApzcForInputBlock) {
|
||||
|
Loading…
Reference in New Issue
Block a user