More cleanup in GIFImageReader
authorhclam@chromium.org <hclam@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 6 Mar 2013 20:09:06 +0000 (20:09 +0000)
committerhclam@chromium.org <hclam@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 6 Mar 2013 20:09:06 +0000 (20:09 +0000)
commita50d4f17af2d60a52ddd24845a897d533e0448c6
tree814e3277a67f67c017c6ffe7bcec520f83e80d34
parentb19f220a2d9d15ff6beac5ae143e60591eb3e584
More cleanup in GIFImageReader
https://bugs.webkit.org/show_bug.cgi?id=111137

Reviewed by Stephen White.

Refactor GIFImageReaderReader with the following changes:
+ Separate GIFLZWContext for decoding states.
+ Replace unsigned char* with Vector<unsigned char>

There is no change in code behavior and just refactoring.

No new tests. This is covered by existing GIFImageReaderTest.
I also did a local testing on a 50k image corpus and showed no regression.

* platform/image-decoders/gif/GIFImageDecoder.cpp:
(WebCore::GIFImageDecoder::haveDecodedRow):
* platform/image-decoders/gif/GIFImageDecoder.h:
(GIFImageDecoder):
* platform/image-decoders/gif/GIFImageReader.cpp:
(GIFImageReader::outputRow):
(GIFImageReader::doLZW):
(GIFImageReader::decodeInternal):
(GIFImageReader::prepareLZWContext):
* platform/image-decoders/gif/GIFImageReader.h:
(GIFFrameContext):
(GIFFrameContext::GIFFrameContext):
(GIFFrameContext::~GIFFrameContext):
(GIFLZWContext):
(GIFLZWContext::GIFLZWContext):
(GIFImageReader):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@144961 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebCore/ChangeLog
Source/WebCore/platform/image-decoders/gif/GIFImageDecoder.cpp
Source/WebCore/platform/image-decoders/gif/GIFImageDecoder.h
Source/WebCore/platform/image-decoders/gif/GIFImageReader.cpp
Source/WebCore/platform/image-decoders/gif/GIFImageReader.h