зеркало из https://github.com/mozilla/gecko-dev.git
Bug 867758 - Don't start images' animation until they've been explicitly RequestRefreshed by the refresh driver. r=seth
--HG-- extra : rebase_source : fa6bfc38e37ccf1ea107a33e4ec845511ea947cd
This commit is contained in:
Родитель
003c8f3047
Коммит
9407c7066d
|
@ -99,7 +99,6 @@ void
|
|||
ImageResource::IncrementAnimationConsumers()
|
||||
{
|
||||
mAnimationConsumers++;
|
||||
EvaluateAnimation();
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -107,7 +106,6 @@ ImageResource::DecrementAnimationConsumers()
|
|||
{
|
||||
NS_ABORT_IF_FALSE(mAnimationConsumers >= 1, "Invalid no. of animation consumers!");
|
||||
mAnimationConsumers--;
|
||||
EvaluateAnimation();
|
||||
}
|
||||
|
||||
nsresult
|
||||
|
@ -135,8 +133,6 @@ ImageResource::SetAnimationModeInternal(uint16_t aAnimationMode)
|
|||
|
||||
mAnimationMode = aAnimationMode;
|
||||
|
||||
EvaluateAnimation();
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
|
|
@ -638,11 +638,12 @@ RasterImage::AdvanceFrame(TimeStamp aTime, nsIntRect* aDirtyRect)
|
|||
NS_IMETHODIMP_(void)
|
||||
RasterImage::RequestRefresh(const mozilla::TimeStamp& aTime)
|
||||
{
|
||||
if (!mAnimating || !ShouldAnimate()) {
|
||||
if (!ShouldAnimate()) {
|
||||
return;
|
||||
}
|
||||
|
||||
EnsureAnimExists();
|
||||
EvaluateAnimation();
|
||||
|
||||
// only advance the frame if the current time is greater than or
|
||||
// equal to the current frame's end time.
|
||||
|
@ -1315,9 +1316,6 @@ RasterImage::InternalAddFrame(uint32_t framenum,
|
|||
rv = InternalAddFrameHelper(framenum, frame.forget(), imageData, imageLength,
|
||||
paletteData, paletteLength, aRetFrame);
|
||||
|
||||
// We may be able to start animating, if we now have enough frames
|
||||
EvaluateAnimation();
|
||||
|
||||
return rv;
|
||||
}
|
||||
|
||||
|
|
|
@ -472,6 +472,7 @@ NS_IMETHODIMP_(void)
|
|||
VectorImage::RequestRefresh(const mozilla::TimeStamp& aTime)
|
||||
{
|
||||
// TODO: Implement for b666446.
|
||||
EvaluateAnimation();
|
||||
}
|
||||
|
||||
//******************************************************************************
|
||||
|
|
Загрузка…
Ссылка в новой задаче