зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1245285 - part 2, Prevent Zoom and Overscroll animations from repainting durring animation r=botond
This commit is contained in:
Родитель
d63c83b829
Коммит
0ab3435006
|
@ -49,11 +49,14 @@ public:
|
|||
return Move(mDeferredTasks);
|
||||
}
|
||||
|
||||
public:
|
||||
virtual WheelScrollAnimation* AsWheelScrollAnimation() {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
virtual bool WantsRepaints() {
|
||||
return true;
|
||||
}
|
||||
|
||||
protected:
|
||||
// Protected destructor, to discourage deletion outside of Release():
|
||||
virtual ~AsyncPanZoomAnimation()
|
||||
|
|
|
@ -647,6 +647,11 @@ public:
|
|||
return true;
|
||||
}
|
||||
|
||||
virtual bool WantsRepaints() override
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
private:
|
||||
TimeDuration mDuration;
|
||||
const TimeDuration mTotalDuration;
|
||||
|
@ -698,6 +703,12 @@ public:
|
|||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
virtual bool WantsRepaints() override
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
private:
|
||||
AsyncPanZoomController& mApzc;
|
||||
};
|
||||
|
@ -2940,12 +2951,15 @@ bool AsyncPanZoomController::UpdateAnimation(const TimeStamp& aSampleTime,
|
|||
|
||||
if (mAnimation) {
|
||||
bool continueAnimation = mAnimation->Sample(mFrameMetrics, sampleTimeDelta);
|
||||
bool wantsRepaints = mAnimation->WantsRepaints();
|
||||
*aOutDeferredTasks = mAnimation->TakeDeferredTasks();
|
||||
if (!continueAnimation) {
|
||||
mAnimation = nullptr;
|
||||
SetState(NOTHING);
|
||||
}
|
||||
RequestContentRepaint();
|
||||
if (wantsRepaints) {
|
||||
RequestContentRepaint();
|
||||
}
|
||||
UpdateSharedCompositorFrameMetrics();
|
||||
return true;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче