зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1053766 - Use the statechange notification blocker to avoid some transient notifications. r=botond
This commit is contained in:
Родитель
1a41b340db
Коммит
c5a974fa18
|
@ -1309,7 +1309,10 @@ nsEventStatus AsyncPanZoomController::OnTouchEnd(const MultiTouchInput& aEvent)
|
|||
mX.SetVelocity(0);
|
||||
mY.SetVelocity(0);
|
||||
// Clear our state so that we don't stay in the PANNING state
|
||||
// if DispatchFling() gives the fling to somone else.
|
||||
// if DispatchFling() gives the fling to somone else. However,
|
||||
// don't send the state change notification until we've determined
|
||||
// what our final state is to avoid notification churn.
|
||||
StateChangeNotificationBlocker blocker(this);
|
||||
SetState(NOTHING);
|
||||
APZC_LOG("%p starting a fling animation\n", this);
|
||||
// Make a local copy of the tree manager pointer and check that it's not
|
||||
|
@ -2468,6 +2471,11 @@ bool AsyncPanZoomController::AdvanceAnimations(const TimeStamp& aSampleTime)
|
|||
{
|
||||
AssertOnCompositorThread();
|
||||
|
||||
// Don't send any state-change notifications until the end of the function,
|
||||
// because we may go through some intermediate states while we finish
|
||||
// animations and start new ones.
|
||||
StateChangeNotificationBlocker blocker(this);
|
||||
|
||||
// The eventual return value of this function. The compositor needs to know
|
||||
// whether or not to advance by a frame as soon as it can. For example, if a
|
||||
// fling is happening, it has to keep compositing so that the animation is
|
||||
|
|
Загрузка…
Ссылка в новой задаче