DescriptionChecking if frame is complete and access duration doesn't need a decode
The goal of this change is to minimize image decoding on the main thread.
This change is to avoid image decoding for these two operations:
1. frameIsCompleteAtIndex
2. frameDurationAtIndex
These two operations are moved to ImageDecoder interface and are now const
to prevent future regression.
We are now able to check if a frame is complete by parsing the entire GIF file
without decoding. This also provides information like frame duration such that
controller the animation doesn't require any decoding.
This change is critical to moving animated image decoding off the main thread.
BUG=169377, 181321
TEST=(1) Unit test in GIFImageDecoderTest to test change in decoder behavior.
(2) Image animation cannot be tested reliable via layout test and is
tested manually with wikigifs.org.
Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=149883
Patch Set 1 #Patch Set 2 : const #Patch Set 3 : const #
Total comments: 21
Patch Set 4 : fixed nits #
Total comments: 4
Patch Set 5 : default impl for frameIsCompleteAtIndex() #
Total comments: 1
Patch Set 6 : update frameIsCompleteAtIndex #
Total comments: 6
Patch Set 7 : done #Messages
Total messages: 26 (0 generated)
|