зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1253164 - Make nsIFrame allow running async animations once the frame is able able to run animations on the compositor again. r=birtles
For example, we don't run transform animations on large frames but once the frame size is small enough we should run transform animations on the frame. MozReview-Commit-ID: DkfB9g2Gcdi --HG-- extra : rebase_source : 93a884c3063d4a6c2626e6695583664b24fe11c8
This commit is contained in:
Родитель
ef7cd48646
Коммит
c1fc73bb2d
|
@ -1195,10 +1195,9 @@ function start() {
|
|||
animation.effect.target.style = 'width: 100px; height: 100px';
|
||||
return waitForFrame();
|
||||
}).then(() => {
|
||||
// FIXME: Bug 1253164: the animation should get back on compositor.
|
||||
assert_animation_property_state_equals(
|
||||
animation.effect.getProperties(),
|
||||
[ { property: 'transform', runningOnCompositor: false } ]);
|
||||
[ { property: 'transform', runningOnCompositor: true } ]);
|
||||
});
|
||||
}, 'transform on too big element - area');
|
||||
|
||||
|
@ -1231,10 +1230,9 @@ function start() {
|
|||
animation.effect.target.style = 'width: 100px; height: 100px';
|
||||
return waitForFrame();
|
||||
}).then(() => {
|
||||
// FIXME: Bug 1253164: the animation should get back on compositor.
|
||||
assert_animation_property_state_equals(
|
||||
animation.effect.getProperties(),
|
||||
[ { property: 'transform', runningOnCompositor: false } ]);
|
||||
[ { property: 'transform', runningOnCompositor: true } ]);
|
||||
});
|
||||
}, 'transform on too big element - dimensions');
|
||||
|
||||
|
|
|
@ -8724,6 +8724,10 @@ already_AddRefed<Layer> nsDisplayTransform::BuildLayer(nsDisplayListBuilder *aBu
|
|||
container->SetContentFlags(container->GetContentFlags() & ~Layer::CONTENT_EXTEND_3D_CONTEXT);
|
||||
}
|
||||
|
||||
if (mAllowAsyncAnimation) {
|
||||
mFrame->SetProperty(nsIFrame::RefusedAsyncAnimationProperty(), false);
|
||||
}
|
||||
|
||||
nsDisplayListBuilder::AddAnimationsAndTransitionsToLayer(container, aBuilder,
|
||||
this, mFrame,
|
||||
eCSSProperty_transform);
|
||||
|
|
Загрузка…
Ссылка в новой задаче