зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1374882 - Add a TimingParams ctor on the compositor. r=birtles
MozReview-Commit-ID: BFiwrphRND0 --HG-- extra : rebase_source : 79bb7aed8ec25f9b10a34276dec78577c3af7b86
This commit is contained in:
Родитель
2f471b7a63
Коммит
8894ec184b
|
@ -47,6 +47,25 @@ struct TimingParams
|
|||
mDelay = TimeDuration::FromMilliseconds(aDelay);
|
||||
}
|
||||
|
||||
TimingParams(const TimeDuration& aDuration,
|
||||
const TimeDuration& aDelay,
|
||||
const TimeDuration& aEndDelay,
|
||||
float aIterations,
|
||||
float aIterationStart,
|
||||
dom::PlaybackDirection aDirection,
|
||||
dom::FillMode aFillMode,
|
||||
Maybe<ComputedTimingFunction>&& aFunction)
|
||||
: mDelay(aDelay)
|
||||
, mEndDelay(aEndDelay)
|
||||
, mIterations(aIterations)
|
||||
, mIterationStart(aIterationStart)
|
||||
, mDirection(aDirection)
|
||||
, mFill(aFillMode)
|
||||
, mFunction(aFunction)
|
||||
{
|
||||
mDuration.emplace(aDuration);
|
||||
}
|
||||
|
||||
template <class OptionsType>
|
||||
static TimingParams FromOptionsType(
|
||||
const OptionsType& aOptions,
|
||||
|
|
|
@ -188,18 +188,17 @@ AnimationHelper::SampleAnimationForEachNode(TimeStamp aTime,
|
|||
: (aTime - animation.originTime() -
|
||||
animation.startTime().get_TimeDuration())
|
||||
.MultDouble(animation.playbackRate());
|
||||
TimingParams timing;
|
||||
timing.mDuration.emplace(animation.duration());
|
||||
timing.mDelay = animation.delay();
|
||||
timing.mEndDelay = animation.endDelay();
|
||||
timing.mIterations = animation.iterations();
|
||||
timing.mIterationStart = animation.iterationStart();
|
||||
timing.mDirection =
|
||||
static_cast<dom::PlaybackDirection>(animation.direction());
|
||||
timing.mFill = static_cast<dom::FillMode>(animation.fillMode());
|
||||
timing.mFunction =
|
||||
AnimationUtils::TimingFunctionToComputedTimingFunction(
|
||||
animation.easingFunction());
|
||||
TimingParams timing {
|
||||
animation.duration(),
|
||||
animation.delay(),
|
||||
animation.endDelay(),
|
||||
animation.iterations(),
|
||||
animation.iterationStart(),
|
||||
static_cast<dom::PlaybackDirection>(animation.direction()),
|
||||
static_cast<dom::FillMode>(animation.fillMode()),
|
||||
Move(AnimationUtils::TimingFunctionToComputedTimingFunction(
|
||||
animation.easingFunction()))
|
||||
};
|
||||
|
||||
ComputedTiming computedTiming =
|
||||
dom::AnimationEffectReadOnly::GetComputedTimingAt(
|
||||
|
|
Загрузка…
Ссылка в новой задаче