mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07: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
b2a12d2fec
commit
a8e1f5993f
@ -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