зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1454324 - Set non-animated values to the layer only if there is no running animation. r=kats
In the next patch, we skip updating animation value for the layer if the animation value isn't changed. So without this patch, we will have to update animation value even if the value isn't changed at all. MozReview-Commit-ID: 9tU7BTkNOHL --HG-- extra : rebase_source : 0dbaaab9e52108c843f2d378785a67a8f374994c
This commit is contained in:
Родитель
05604b4dce
Коммит
1695970073
|
@ -595,6 +595,8 @@ ApplyAnimatedValue(Layer* aLayer,
|
|||
layerCompositor->SetShadowOpacitySetByAnimation(true);
|
||||
aStorage->SetAnimatedValue(aLayer->GetCompositorAnimationsId(), opacity);
|
||||
|
||||
layerCompositor->SetShadowBaseTransform(aLayer->GetBaseTransform());
|
||||
layerCompositor->SetShadowTransformSetByAnimation(false);
|
||||
break;
|
||||
}
|
||||
case eCSSProperty_transform: {
|
||||
|
@ -632,6 +634,9 @@ ApplyAnimatedValue(Layer* aLayer,
|
|||
aStorage->SetAnimatedValue(aLayer->GetCompositorAnimationsId(),
|
||||
Move(transform), Move(frameTransform),
|
||||
transformData);
|
||||
|
||||
layerCompositor->SetShadowOpacity(aLayer->GetOpacity());
|
||||
layerCompositor->SetShadowOpacitySetByAnimation(false);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
|
@ -670,6 +675,15 @@ SampleAnimations(Layer* aLayer,
|
|||
animation.property(),
|
||||
animation.data(),
|
||||
animationValue);
|
||||
} else {
|
||||
// Set non-animation values in the case there are no in-effect
|
||||
// animations (i.e. all animations are in delay state or already
|
||||
// finished with non-forward fill modes).
|
||||
HostLayer* layerCompositor = layer->AsHostLayer();
|
||||
layerCompositor->SetShadowBaseTransform(layer->GetBaseTransform());
|
||||
layerCompositor->SetShadowTransformSetByAnimation(false);
|
||||
layerCompositor->SetShadowOpacity(layer->GetOpacity());
|
||||
layerCompositor->SetShadowOpacitySetByAnimation(false);
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
@ -920,12 +920,18 @@ CompositorBridgeParent::SetShadowProperties(Layer* aLayer)
|
|||
// FIXME: Bug 717688 -- Do these updates in LayerTransactionParent::RecvUpdate.
|
||||
HostLayer* layerCompositor = layer->AsHostLayer();
|
||||
// Set the layerComposite's base transform to the layer's base transform.
|
||||
layerCompositor->SetShadowBaseTransform(layer->GetBaseTransform());
|
||||
layerCompositor->SetShadowTransformSetByAnimation(false);
|
||||
AnimationArray& animations = layer->GetAnimations();
|
||||
// If there is any animation, the animation value will override
|
||||
// non-animated value later, so we don't need to set the non-animated
|
||||
// value here.
|
||||
if (animations.IsEmpty()) {
|
||||
layerCompositor->SetShadowBaseTransform(layer->GetBaseTransform());
|
||||
layerCompositor->SetShadowTransformSetByAnimation(false);
|
||||
layerCompositor->SetShadowOpacity(layer->GetOpacity());
|
||||
layerCompositor->SetShadowOpacitySetByAnimation(false);
|
||||
}
|
||||
layerCompositor->SetShadowVisibleRegion(layer->GetVisibleRegion());
|
||||
layerCompositor->SetShadowClipRect(layer->GetClipRect());
|
||||
layerCompositor->SetShadowOpacity(layer->GetOpacity());
|
||||
layerCompositor->SetShadowOpacitySetByAnimation(false);
|
||||
}
|
||||
);
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче