|
Reland "Decode GIF image frames on demand".
Change over the original patch: workaround const_reverse_iterator issue of
Android compiler.
Previously GIFImageDecoder::frameBufferAtIndex() decodes all frames from
the last decoded frame to the requested frame. This causes delays when
skipping to specific frames.
With this change, GIFImageDecoder decodes only necessary frames based on
previous frames' disposal methods. Added ImageDecoder::findRequiredPreviousFrame()
to find the required previous frame based on the disposal methods.
Also changed the behavior of GIFImageDecoder::clearFrameBufferCache() (moved to
ImageDecoder because it can be shared between multi-frame decoders) because
the original semantics no longer apply with on-demand frame decoding.
Instead of clearing before the given frame, now clear from the whole frame buffer
cache, preserving the frames that are likely to be used soon.
BUG= 238242
TEST=ImageDecoderTest.requiredPreviousFrameIndex*, ImageDecoderTest.clearCacheExceptFrame*, GIFImageDecoderTest.updateRequiredPreviousFrameAfterFirstDecode, GIFImageDecoderTest.randomFrameDecode, GIFImageDecoderTest.randomDecodeAfterClearFrameBufferCache, GIFImageDecoderTest.resumePartialDecodeAfterClearFrameBufferCache
TBR=abarth@chromium.org, pkasting@chromium.org
Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=151564
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+728 lines, -671 lines) |
Patch |
 |
M |
Source/WebKit/chromium/WebKit.gypi
|
View
|
|
1 chunk |
+0 lines, -1 line |
0 comments
|
Download
|
 |
M |
Source/WebKit/chromium/tests/DragImageTest.cpp
|
View
|
|
2 chunks |
+6 lines, -8 lines |
0 comments
|
Download
|
 |
D |
Source/WebKit/chromium/tests/GIFImageDecoderTest.cpp
|
View
|
|
1 chunk |
+0 lines, -324 lines |
0 comments
|
Download
|
 |
M |
Source/WebKit/chromium/tests/ImageLayerChromiumTest.cpp
|
View
|
|
3 chunks |
+9 lines, -11 lines |
0 comments
|
Download
|
 |
M |
Source/core/core.gypi
|
View
|
|
1 chunk |
+2 lines, -0 lines |
0 comments
|
Download
|
 |
M |
Source/core/platform/graphics/BitmapImage.h
|
View
|
|
5 chunks |
+20 lines, -24 lines |
0 comments
|
Download
|
 |
M |
Source/core/platform/graphics/BitmapImage.cpp
|
View
|
|
4 chunks |
+12 lines, -26 lines |
0 comments
|
Download
|
 |
M |
Source/core/platform/graphics/GeneratedImage.h
|
View
|
|
1 chunk |
+10 lines, -11 lines |
0 comments
|
Download
|
 |
M |
Source/core/platform/graphics/Image.h
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
Source/core/platform/graphics/ImageSource.h
|
View
|
|
2 chunks |
+15 lines, -23 lines |
0 comments
|
Download
|
 |
M |
Source/core/platform/graphics/ImageSource.cpp
|
View
|
|
1 chunk |
+2 lines, -11 lines |
0 comments
|
Download
|
 |
M |
Source/core/platform/graphics/chromium/DeferredImageDecoder.h
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
Source/core/platform/graphics/chromium/DeferredImageDecoder.cpp
|
View
|
|
1 chunk |
+2 lines, -3 lines |
0 comments
|
Download
|
 |
M |
Source/core/platform/image-decoders/ImageDecoder.h
|
View
|
|
5 chunks |
+50 lines, -4 lines |
0 comments
|
Download
|
 |
M |
Source/core/platform/image-decoders/ImageDecoder.cpp
|
View
|
|
2 chunks |
+70 lines, -1 line |
0 comments
|
Download
|
 |
A |
Source/core/platform/image-decoders/ImageDecoderTest.cpp
|
View
|
|
1 chunk |
+216 lines, -0 lines |
0 comments
|
Download
|
 |
M |
Source/core/platform/image-decoders/gif/GIFImageDecoder.h
|
View
|
|
2 chunks |
+27 lines, -21 lines |
0 comments
|
Download
|
 |
M |
Source/core/platform/image-decoders/gif/GIFImageDecoder.cpp
|
View
|
|
8 chunks |
+87 lines, -133 lines |
0 comments
|
Download
|
 |
A + |
Source/core/platform/image-decoders/gif/GIFImageDecoderTest.cpp
|
View
|
|
12 chunks |
+157 lines, -15 lines |
0 comments
|
Download
|
 |
M |
Source/core/platform/image-decoders/gif/GIFImageReader.h
|
View
|
|
7 chunks |
+6 lines, -8 lines |
0 comments
|
Download
|
 |
M |
Source/core/platform/image-decoders/gif/GIFImageReader.cpp
|
View
|
|
3 chunks |
+14 lines, -31 lines |
0 comments
|
Download
|
 |
M |
Source/core/platform/image-decoders/ico/ICOImageDecoder.cpp
|
View
|
|
1 chunk |
+3 lines, -1 line |
0 comments
|
Download
|
 |
M |
Source/core/platform/image-decoders/skia/ImageDecoderSkia.cpp
|
View
|
|
2 chunks |
+5 lines, -0 lines |
0 comments
|
Download
|
 |
M |
Source/core/svg/graphics/SVGImage.h
|
View
|
|
2 chunks |
+11 lines, -11 lines |
0 comments
|
Download
|
 |
M |
Source/core/svg/graphics/SVGImageForContainer.h
|
View
|
|
1 chunk |
+2 lines, -2 lines |
0 comments
|
Download
|
Total messages: 4 (0 generated)
|