Bug 1456679 - Don't set non-animated values as AnimatedValue in delay phase. r=kats

We no longer need them since in the previous commit we make sure subsequent
ticks happens for animations in delay phase.

MozReview-Commit-ID: F68wCCsCEiE

--HG--
extra : rebase_source : 0f7d1b3ef45b9dd210473d3c374d193e3ee94e83
This commit is contained in:
Hiroyuki Ikezoe 2018-04-26 08:29:29 +09:00
parent 861eb6a9fb
commit c6556c83a8
3 changed files with 2 additions and 20 deletions

View File

@ -53,8 +53,6 @@ struct OpAddExternalImage {
struct OpAddCompositorAnimations {
CompositorAnimations data;
OptionalTransform transform;
OptionalOpacity opacity;
};
struct OpAddPipelineIdForCompositable {

View File

@ -776,15 +776,6 @@ WebRenderBridgeParent::ProcessWebRenderParentCommands(const InfallibleTArray<Web
if (data.animations().Length()) {
mAnimStorage->SetAnimations(data.id(), data.animations());
mActiveAnimations.insert(data.id());
// Store the default opacity
if (op.opacity().type() == OptionalOpacity::Tfloat) {
mAnimStorage->SetAnimatedValue(data.id(), op.opacity().get_float());
}
// Store the default transform
if (op.transform().type() == OptionalTransform::TMatrix4x4) {
Matrix4x4 transform(Move(op.transform().get_Matrix4x4()));
mAnimStorage->SetAnimatedValue(data.id(), Move(transform));
}
}
break;
}

View File

@ -6701,14 +6701,12 @@ nsDisplayOpacity::CreateWebRenderCommands(mozilla::wr::DisplayListBuilder& aBuil
if (!animationInfo.GetAnimations().IsEmpty()) {
opacityForSC = nullptr;
OptionalOpacity opacityForCompositor = mOpacity;
prop.id = animationsId;
prop.effect_type = wr::WrAnimationType::Opacity;
OpAddCompositorAnimations
anim(CompositorAnimations(animationInfo.GetAnimations(), animationsId),
void_t(), opacityForCompositor);
anim(CompositorAnimations(animationInfo.GetAnimations(), animationsId));
aManager->WrBridge()->AddWebRenderParentCommand(anim);
aManager->AddActiveCompositorAnimationId(animationsId);
} else if (animationsId) {
@ -8554,13 +8552,8 @@ nsDisplayTransform::CreateWebRenderCommands(mozilla::wr::DisplayListBuilder& aBu
prop.id = animationsId;
prop.effect_type = wr::WrAnimationType::Transform;
// Pass default transform to compositor in case gecko fails to
// get animated value after animation sampling.
OptionalTransform transformForCompositor = newTransformMatrix;
OpAddCompositorAnimations
anim(CompositorAnimations(animationInfo.GetAnimations(), animationsId),
transformForCompositor, void_t());
anim(CompositorAnimations(animationInfo.GetAnimations(), animationsId));
aManager->WrBridge()->AddWebRenderParentCommand(anim);
aManager->AddActiveCompositorAnimationId(animationsId);
} else if (animationsId) {