Chromium Code Reviews| Index: Source/core/platform/image-decoders/gif/GIFImageReader.h |
| diff --git a/Source/core/platform/image-decoders/gif/GIFImageReader.h b/Source/core/platform/image-decoders/gif/GIFImageReader.h |
| index 33a1bd7a4396c2da6b298d386fb71ac49d9a5dbd..4c322e3aeebfad9044da89c8a0275e32f7dee1ea 100644 |
| --- a/Source/core/platform/image-decoders/gif/GIFImageReader.h |
| +++ b/Source/core/platform/image-decoders/gif/GIFImageReader.h |
| @@ -78,6 +78,7 @@ enum GIFState { |
| }; |
| struct GIFFrameContext; |
| +typedef Vector<unsigned char> GIFRow; |
|
Peter Kasting
2013/08/29 23:46:25
Nit: Maybe instead of declaring this here we can d
Alpha Left Google
2013/08/30 23:25:36
Done.
|
| // LZW decoder state machine. |
| class GIFLZWContext { |
| @@ -95,14 +96,13 @@ public: |
| , ipass(0) |
| , irow(0) |
| , rowsRemaining(0) |
| - , stackp(0) |
| , rowIter(0) |
| , m_client(client) |
| , m_frameContext(frameContext) |
| { } |
| bool prepareToDecode(); |
| - bool outputRow(); |
| + bool outputRow(GIFRow::const_iterator rowBegin); |
| bool doLZW(const unsigned char* block, size_t bytesInBlock); |
| bool hasRemainingRows() { return rowsRemaining; } |
| @@ -122,11 +122,9 @@ private: |
| unsigned short prefix[MAX_BYTES]; |
|
Peter Kasting
2013/08/29 23:46:25
These three arrays don't actually need to be MAX_B
Alpha Left Google
2013/08/30 23:25:36
Done.
|
| unsigned char suffix[MAX_BYTES]; |
| - unsigned char stack[MAX_BYTES]; |
| - Vector<unsigned char> rowBuffer; // Single scanline temporary buffer. |
| - |
| - size_t stackp; // Current stack pointer. |
| - Vector<unsigned char>::iterator rowIter; |
| + unsigned short suffixLength[MAX_BYTES]; |
| + GIFRow rowBuffer; // Single scanline temporary buffer. |
| + GIFRow::iterator rowIter; |
| // Initialized during construction and read-only. |
| WebCore::GIFImageDecoder* m_client; |