зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1287691 (Part 2) - Yield after each frame in the GIF decoder. r=edwin
This commit is contained in:
Родитель
966d0547b7
Коммит
014dc44721
|
@ -475,6 +475,8 @@ nsGIFDecoder2::DoDecode(SourceBufferIterator& aIterator, IResumable* aOnResume)
|
|||
return FinishedGlobalColorTable();
|
||||
case State::BLOCK_HEADER:
|
||||
return ReadBlockHeader(aData);
|
||||
case State::BLOCK_HEADER_AFTER_YIELD:
|
||||
return Transition::To(State::BLOCK_HEADER, BLOCK_HEADER_LEN);
|
||||
case State::EXTENSION_HEADER:
|
||||
return ReadExtensionHeader(aData);
|
||||
case State::GRAPHIC_CONTROL_EXTENSION:
|
||||
|
@ -975,7 +977,7 @@ nsGIFDecoder2::ReadImageDataSubBlock(const char* aData)
|
|||
if (subBlockLength == 0) {
|
||||
// We hit the block terminator.
|
||||
EndImageFrame();
|
||||
return Transition::To(State::BLOCK_HEADER, BLOCK_HEADER_LEN);
|
||||
return Transition::ToAfterYield(State::BLOCK_HEADER_AFTER_YIELD);
|
||||
}
|
||||
|
||||
if (mGIFStruct.pixels_remaining == 0) {
|
||||
|
|
|
@ -80,6 +80,7 @@ private:
|
|||
GLOBAL_COLOR_TABLE,
|
||||
FINISHED_GLOBAL_COLOR_TABLE,
|
||||
BLOCK_HEADER,
|
||||
BLOCK_HEADER_AFTER_YIELD,
|
||||
EXTENSION_HEADER,
|
||||
GRAPHIC_CONTROL_EXTENSION,
|
||||
APPLICATION_IDENTIFIER,
|
||||
|
|
Загрузка…
Ссылка в новой задаче