mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1207355 (Part 5) - Request decodes intelligently in MultipartImage. r=tn
This commit is contained in:
parent
199a0576af
commit
6c65f4629d
@ -70,6 +70,16 @@ public:
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Retrieve the image's intrinsic size.
|
||||||
|
int32_t width = 0;
|
||||||
|
int32_t height = 0;
|
||||||
|
mImage->GetWidth(&width);
|
||||||
|
mImage->GetHeight(&height);
|
||||||
|
|
||||||
|
// Request decoding at the intrinsic size.
|
||||||
|
mImage->RequestDecodeForSize(IntSize(width, height),
|
||||||
|
imgIContainer::DECODE_FLAGS_DEFAULT);
|
||||||
|
|
||||||
// If there's already an error, we may never get a FRAME_COMPLETE
|
// If there's already an error, we may never get a FRAME_COMPLETE
|
||||||
// notification, so go ahead and notify our owner right away.
|
// notification, so go ahead and notify our owner right away.
|
||||||
RefPtr<ProgressTracker> tracker = mImage->GetProgressTracker();
|
RefPtr<ProgressTracker> tracker = mImage->GetProgressTracker();
|
||||||
@ -125,7 +135,6 @@ MultipartImage::Init()
|
|||||||
RefPtr<ProgressTracker> firstPartTracker =
|
RefPtr<ProgressTracker> firstPartTracker =
|
||||||
InnerImage()->GetProgressTracker();
|
InnerImage()->GetProgressTracker();
|
||||||
firstPartTracker->AddObserver(this);
|
firstPartTracker->AddObserver(this);
|
||||||
InnerImage()->RequestDecode();
|
|
||||||
InnerImage()->IncrementAnimationConsumers();
|
InnerImage()->IncrementAnimationConsumers();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -154,7 +163,6 @@ MultipartImage::BeginTransitionToPart(Image* aNextPart)
|
|||||||
// Start observing the next part; we'll complete the transition when
|
// Start observing the next part; we'll complete the transition when
|
||||||
// NextPartObserver calls FinishTransition.
|
// NextPartObserver calls FinishTransition.
|
||||||
mNextPartObserver->BeginObserving(mNextPart);
|
mNextPartObserver->BeginObserving(mNextPart);
|
||||||
mNextPart->RequestDecode();
|
|
||||||
mNextPart->IncrementAnimationConsumers();
|
mNextPart->IncrementAnimationConsumers();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user