mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1078122 part 2 - Encapsulate mIsRunningOnCompositor in AnimationPlayer; r=dholbert
This commit is contained in:
parent
75670f2118
commit
b46fbc6e51
@ -35,9 +35,9 @@ protected:
|
||||
|
||||
public:
|
||||
explicit AnimationPlayer(AnimationTimeline* aTimeline)
|
||||
: mIsRunningOnCompositor(false)
|
||||
, mTimeline(aTimeline)
|
||||
: mTimeline(aTimeline)
|
||||
, mIsPaused(false)
|
||||
, mIsRunningOnCompositor(false)
|
||||
{
|
||||
}
|
||||
|
||||
@ -92,6 +92,9 @@ public:
|
||||
return GetSource() && GetSource()->IsInEffect();
|
||||
}
|
||||
|
||||
void SetIsRunningOnCompositor() { mIsRunningOnCompositor = true; }
|
||||
void ClearIsRunningOnCompositor() { mIsRunningOnCompositor = false; }
|
||||
|
||||
// Returns true if this animation does not currently need to update
|
||||
// style on the main thread (e.g. because it is empty, or is
|
||||
// running on the compositor).
|
||||
@ -99,7 +102,6 @@ public:
|
||||
|
||||
// The beginning of the delay period.
|
||||
Nullable<TimeDuration> mStartTime; // Timeline timescale
|
||||
bool mIsRunningOnCompositor;
|
||||
|
||||
nsRefPtr<AnimationTimeline> mTimeline;
|
||||
nsRefPtr<Animation> mSource;
|
||||
@ -111,6 +113,7 @@ protected:
|
||||
|
||||
Nullable<TimeDuration> mHoldTime; // Player timescale
|
||||
bool mIsPaused;
|
||||
bool mIsRunningOnCompositor;
|
||||
};
|
||||
|
||||
} // namespace dom
|
||||
|
@ -412,7 +412,7 @@ AddAnimationsForProperty(nsIFrame* aFrame, nsCSSProperty aProperty,
|
||||
continue;
|
||||
}
|
||||
AddAnimationForProperty(aFrame, aProperty, player, aLayer, aData, aPending);
|
||||
player->mIsRunningOnCompositor = true;
|
||||
player->SetIsRunningOnCompositor();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -311,7 +311,7 @@ nsAnimationManager::CheckAnimationRule(nsStyleContext* aStyleContext,
|
||||
}
|
||||
|
||||
// Reset compositor state so animation will be re-synchronized.
|
||||
oldPlayer->mIsRunningOnCompositor = false;
|
||||
oldPlayer->ClearIsRunningOnCompositor();
|
||||
|
||||
// Handle changes in play state.
|
||||
// CSSAnimationPlayer takes care of override behavior so that,
|
||||
|
@ -834,7 +834,7 @@ nsTransitionManager::FlushTransitions(FlushFlags aFlags)
|
||||
} else if ((computedTiming.mPhase ==
|
||||
ComputedTiming::AnimationPhase_Active) &&
|
||||
canThrottleTick &&
|
||||
!player->mIsRunningOnCompositor) {
|
||||
!player->IsRunningOnCompositor()) {
|
||||
// Start a transition with a delay where we should start the
|
||||
// transition proper.
|
||||
collection->UpdateAnimationGeneration(mPresContext);
|
||||
|
Loading…
Reference in New Issue
Block a user