Bug 716140 - Track image metadata in a separate object, and sync it to the image once decoding is done. r=jlebar

--HG--
extra : rebase_source : ba1173bc1cf090ed02f3a9a7927382c302576088
Bug 716140 - Remove explicit imgStatusTracker::mBlockingOnload, as it's implied by stateBlockingOnload. r=khuey

--HG--
extra : rebase_source : 4368c09438bd6cb288a0c845ff20cb8a3f0c5560
Bug 716140 - imgDecoderObserver::OnDataAvailable is simply a duplicate of imgDecoderObserver::FrameUpdated, so remove it. r=seth

--HG--
extra : rebase_source : 90d828b429a6dd629b76912a4a58c802d2318d34
Bug 716140 - Create and Send OnStartFrame when a frame starts. r=seth

--HG--
extra : rebase_source : 7af770a5cc28c2a6d199e632c706330a0d582659
Bug 716140 - Track the invalid area for the latest frame from within imgStatusTracker. r=seth

--HG--
extra : rebase_source : 1a1197b63279a52eaf11faefa199f538b4f960f7
Bug 716140 - Explicitly record whether an image is animated. r=seth

--HG--
extra : rebase_source : 741a16bd8c5cf30af839629deeb0274638b8720c
Bug 716140 - Make an (unused) imgDecoderObserver implementation that doesn't notify proxies when it gets an observer function call, and rename the old version (which will be going away). r=jlebar

--HG--
extra : rebase_source : 4e09ccd83f0a4a26277fd65916c175189c1b8ba6
Bug 716140 - Factor out notification of a particular imgStatusTracker state into its own function. r=seth

--HG--
extra : rebase_source : ba72f5c3aa1b47d8c6f36d1c2d0202d55671a1d2
Bug 716140 - Calculate the difference between two imgStatusTrackers, notify for that difference, and apply it to the source. r=seth

This patch adds two semi-unrelated functions, currently unused:
 - SyncAndSyncNotifyDifference, which synchronizes the current
   imgStatusTracker to have the state of the argument imgStatusTracker, and
   notifies our observers about the new state;
 - CloneForRecording, which will let us create a new imgStatusTracker based on
   the current state for use with SyncAndSyncNotifyDifference.

--HG--
extra : rebase_source : 2b9072e38f9dabf4d2cbe0d7c129b44c81743591
Bug 716140 - Add SetObserver method to Decoder instead of initializing it in the constructor. r=seth

In order to have "throw-away" imgStatusTrackers that we'll use to track an
individual decode chunk's status, we need to be able to change the observer on
a decoder.

--HG--
extra : rebase_source : b10a050022f80dddeeea62e77d3f208598311d4f
Bug 716140 - Heap-allocate DecodeRequests so we know when we're still decoding an image. r=seth

--HG--
extra : rebase_source : c03271201f48efb29972a1b6834036638029810c
Bug 716140 - Handle discarding specially so it gets notified synchronously.  r=seth

--HG--
extra : rebase_source : 1bd66dcec4925b486af0905dbd07286bb3ae729e
Bug 716140 - Create a clone imgStatusTracker on every asynchronous decoding event, and replay the difference between that imgStatusTracker and the image's current status tracker when decoding completes. r=seth
* * *
[mq]: test-fixes
* * *
[mq]: undefer-on-remove
* * *
imported patch notify-in-sequence

--HG--
extra : rebase_source : 01a495a64cb4b6a8076a3550c254ddd804f53e80
Bug 716140 - Make mImageData and mColormap (and their sizes) protected members of mozilla::image::Decoder rather than the leaf classes.

--HG--
extra : rebase_source : d4f506a669d5b18a33676434ad0cc512216956d5
Bug 716140 - Count complete frames in Decoder::Finish(), not just whatever frame objects mImage has. r=seth

--HG--
extra : rebase_source : 2466ec5e5bc64d8d60190cdc4805eaa73bf695af
Bug 716140 - Make animated image formats (PNG and GIF) explicitly pause decoding and ask for a new image frame when they need new frames.

--HG--
extra : rebase_source : 3a4148d8d144784075ec88668359c333420c3d4a
Bug 716140 - Always run a size decode before doing a full decode so we know the size before decoding. r=jlebar

--HG--
extra : rebase_source : de3388c861b00b135b658ea9a9225b0cc58e389a
Bug 716140 - Run a size decode even if we're not storing source data. r=seth

--HG--
extra : rebase_source : 732ed17d8edec893fd6fdc8dc12c1d4a8bcbc330
Bug 716140 - Preallocate frames before going into a decoder. r=seth

--HG--
extra : rebase_source : 6445356bc4a01ac2890eca855103e58bda772095
Bug 716140 - Handle errors correctly. r=seth

--HG--
extra : rebase_source : 97f714b139508092ef5a733313f10e281b0bc6fe