OLD | NEW |
1 /* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ | 1 /* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ |
2 /* ***** BEGIN LICENSE BLOCK ***** | 2 /* ***** BEGIN LICENSE BLOCK ***** |
3 * Version: MPL 1.1/GPL 2.0/LGPL 2.1 | 3 * Version: MPL 1.1/GPL 2.0/LGPL 2.1 |
4 * | 4 * |
5 * The contents of this file are subject to the Mozilla Public License Version | 5 * The contents of this file are subject to the Mozilla Public License Version |
6 * 1.1 (the "License"); you may not use this file except in compliance with | 6 * 1.1 (the "License"); you may not use this file except in compliance with |
7 * the License. You may obtain a copy of the License at | 7 * the License. You may obtain a copy of the License at |
8 * http://www.mozilla.org/MPL/ | 8 * http://www.mozilla.org/MPL/ |
9 * | 9 * |
10 * Software distributed under the License is distributed on an "AS IS" basis, | 10 * Software distributed under the License is distributed on an "AS IS" basis, |
(...skipping 24 matching lines...) Expand all Loading... |
35 * | 35 * |
36 * ***** END LICENSE BLOCK ***** */ | 36 * ***** END LICENSE BLOCK ***** */ |
37 | 37 |
38 #ifndef GIFImageReader_h | 38 #ifndef GIFImageReader_h |
39 #define GIFImageReader_h | 39 #define GIFImageReader_h |
40 | 40 |
41 // Define ourselves as the clientPtr. Mozilla just hacked their C++ callback cl
ass into this old C decoder, | 41 // Define ourselves as the clientPtr. Mozilla just hacked their C++ callback cl
ass into this old C decoder, |
42 // so we will too. | 42 // so we will too. |
43 #include "core/platform/SharedBuffer.h" | 43 #include "core/platform/SharedBuffer.h" |
44 #include "core/platform/image-decoders/gif/GIFImageDecoder.h" | 44 #include "core/platform/image-decoders/gif/GIFImageDecoder.h" |
45 #include <wtf/OwnPtr.h> | 45 #include "wtf/OwnPtr.h" |
46 #include <wtf/PassOwnPtr.h> | 46 #include "wtf/PassOwnPtr.h" |
47 #include <wtf/Vector.h> | 47 #include "wtf/Vector.h" |
48 | 48 |
49 #define MAX_LZW_BITS 12 | 49 #define MAX_LZW_BITS 12 |
50 #define MAX_BYTES 4097 /* 2^MAX_LZW_BITS+1 */ | 50 #define MAX_BYTES 4097 /* 2^MAX_LZW_BITS+1 */ |
51 #define MAX_COLORS 256 | 51 #define MAX_COLORS 256 |
52 #define GIF_COLORS 3 | 52 #define GIF_COLORS 3 |
53 | 53 |
54 const int cLoopCountNotSeen = -2; | 54 const int cLoopCountNotSeen = -2; |
55 | 55 |
56 // List of possible parsing states. | 56 // List of possible parsing states. |
57 enum GIFState { | 57 enum GIFState { |
(...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
320 int m_globalColormapSize; // Size of global colormap array. | 320 int m_globalColormapSize; // Size of global colormap array. |
321 int m_loopCount; // Netscape specific extension block to control the number
of animation loops a GIF renders. | 321 int m_loopCount; // Netscape specific extension block to control the number
of animation loops a GIF renders. |
322 | 322 |
323 Vector<OwnPtr<GIFFrameContext> > m_frames; | 323 Vector<OwnPtr<GIFFrameContext> > m_frames; |
324 | 324 |
325 RefPtr<WebCore::SharedBuffer> m_data; | 325 RefPtr<WebCore::SharedBuffer> m_data; |
326 bool m_parseCompleted; | 326 bool m_parseCompleted; |
327 }; | 327 }; |
328 | 328 |
329 #endif | 329 #endif |
OLD | NEW |