зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1256603. Change MultipartImage to use RequestDecode instead of GetFrame to avoid marking the frame as used. r=aosmond
This commit is contained in:
Родитель
e42e7a416c
Коммит
1f15ab4d53
|
@ -41,14 +41,16 @@ public:
|
|||
|
||||
void BlockUntilDecodedAndFinishObserving()
|
||||
{
|
||||
// Use GetFrame() to block until our image finishes decoding.
|
||||
RefPtr<SourceSurface> surface =
|
||||
mImage->GetFrame(imgIContainer::FRAME_CURRENT,
|
||||
imgIContainer::FLAG_SYNC_DECODE);
|
||||
// Use RequestDecodeForSize() to block until our image finishes decoding.
|
||||
// The size is ignored because we don't pass the FLAG_HIGH_QUALITY_SCALING
|
||||
// flag.
|
||||
mImage->RequestDecodeForSize(gfx::IntSize(0, 0),
|
||||
imgIContainer::FLAG_SYNC_DECODE);
|
||||
|
||||
// GetFrame() should've sent synchronous notifications that would have
|
||||
// caused us to call FinishObserving() (and null out mImage) already. If for
|
||||
// some reason it didn't, we should do so here.
|
||||
|
||||
// RequestDecodeForSize() should've sent synchronous notifications that
|
||||
// would have caused us to call FinishObserving() (and null out mImage)
|
||||
// already. If for some reason it didn't, we should do so here.
|
||||
if (mImage) {
|
||||
FinishObserving();
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче