mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-10 20:05:49 +00:00
Bug 1166981 - Decode images in LIFO order. r=tn
This commit is contained in:
parent
bd635e2c8a
commit
4a89c186ce
@ -217,11 +217,6 @@ public:
|
||||
MonitorAutoLock lock(mMonitor);
|
||||
|
||||
do {
|
||||
// XXX(seth): The queue popping code below is NOT efficient, obviously,
|
||||
// since we're removing an element from the front of the array. However,
|
||||
// it's not worth implementing something better right now, because we are
|
||||
// replacing this FIFO behavior with LIFO behavior very soon.
|
||||
|
||||
// Prioritize size decodes over full decodes.
|
||||
if (!mSizeDecodeQueue.IsEmpty()) {
|
||||
return PopWorkFromQueue(mSizeDecodeQueue);
|
||||
@ -249,8 +244,8 @@ private:
|
||||
{
|
||||
Work work;
|
||||
work.mType = Work::Type::DECODE;
|
||||
work.mDecoder = aQueue.ElementAt(0);
|
||||
aQueue.RemoveElementAt(0);
|
||||
work.mDecoder = aQueue.LastElement();
|
||||
aQueue.RemoveElementAt(aQueue.Length() - 1);
|
||||
|
||||
return work;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user