mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-27 06:43:32 +00:00
Bug 927349 part 19 - Don't add pending animations to layers when their refresh driver is under test control; r=jwatt
This commit is contained in:
parent
83ead697c2
commit
24eaa57ecc
@ -65,9 +65,10 @@ public:
|
||||
// be a no-op.
|
||||
void FastForward(const TimeStamp& aTimeStamp);
|
||||
|
||||
nsRefreshDriver* GetRefreshDriver() const;
|
||||
|
||||
protected:
|
||||
TimeStamp GetCurrentTimeStamp() const;
|
||||
nsRefreshDriver* GetRefreshDriver() const;
|
||||
|
||||
nsCOMPtr<nsIDocument> mDocument;
|
||||
|
||||
|
@ -424,6 +424,23 @@ AddAnimationsForProperty(nsIFrame* aFrame, nsCSSProperty aProperty,
|
||||
player->IsRunning())) {
|
||||
continue;
|
||||
}
|
||||
|
||||
// Don't add animations that are pending when their corresponding
|
||||
// refresh driver is under test control. This is because any pending
|
||||
// animations on layers will have their start time updated with the
|
||||
// current timestamp but when the refresh driver is under test control
|
||||
// its refresh times are unrelated to timestamp values.
|
||||
//
|
||||
// Instead we leave the animation running on the main thread and the
|
||||
// next time the refresh driver is advanced it will trigger any pending
|
||||
// animations.
|
||||
if (player->PlayState() == AnimationPlayState::Pending) {
|
||||
nsRefreshDriver* driver = player->Timeline()->GetRefreshDriver();
|
||||
if (driver && driver->IsTestControllingRefreshesEnabled()) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
AddAnimationForProperty(aFrame, aProperty, player, aLayer, aData, aPending);
|
||||
player->SetIsRunningOnCompositor();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user