summaryrefslogtreecommitdiff
path: root/Source/WebCore/platform/image-decoders/gif/GIFImageReader.h
diff options
context:
space:
mode:
authorLorry Tar Creator <lorry-tar-importer@lorry>2017-06-27 06:07:23 +0000
committerLorry Tar Creator <lorry-tar-importer@lorry>2017-06-27 06:07:23 +0000
commit1bf1084f2b10c3b47fd1a588d85d21ed0eb41d0c (patch)
tree46dcd36c86e7fbc6e5df36deb463b33e9967a6f7 /Source/WebCore/platform/image-decoders/gif/GIFImageReader.h
parent32761a6cee1d0dee366b885b7b9c777e67885688 (diff)
downloadWebKitGtk-tarball-master.tar.gz
Diffstat (limited to 'Source/WebCore/platform/image-decoders/gif/GIFImageReader.h')
-rw-r--r--Source/WebCore/platform/image-decoders/gif/GIFImageReader.h17
1 files changed, 6 insertions, 11 deletions
diff --git a/Source/WebCore/platform/image-decoders/gif/GIFImageReader.h b/Source/WebCore/platform/image-decoders/gif/GIFImageReader.h
index bda8997d9..40b1d69f1 100644
--- a/Source/WebCore/platform/image-decoders/gif/GIFImageReader.h
+++ b/Source/WebCore/platform/image-decoders/gif/GIFImageReader.h
@@ -35,15 +35,12 @@
*
* ***** END LICENSE BLOCK ***** */
-#ifndef GIFImageReader_h
-#define GIFImageReader_h
+#pragma once
// Define ourselves as the clientPtr. Mozilla just hacked their C++ callback class into this old C decoder,
// so we will too.
#include "GIFImageDecoder.h"
#include "SharedBuffer.h"
-#include <wtf/OwnPtr.h>
-#include <wtf/PassOwnPtr.h>
#include <wtf/Vector.h>
#define MAX_LZW_BITS 12
@@ -157,7 +154,7 @@ public:
unsigned width;
unsigned height;
int tpixel; // Index of transparent pixel.
- WebCore::ImageFrame::FrameDisposalMethod disposalMethod; // Restore to background, leave in place, etc.
+ WebCore::ImageFrame::DisposalMethod disposalMethod; // Restore to background, leave in place, etc.
size_t localColormapPosition; // Per-image colormap.
int localColormapSize; // Size of local colormap array.
int datasize;
@@ -176,7 +173,7 @@ public:
, width(0)
, height(0)
, tpixel(0)
- , disposalMethod(WebCore::ImageFrame::DisposeNotSpecified)
+ , disposalMethod(WebCore::ImageFrame::DisposalMethod::Unspecified)
, localColormapPosition(0)
, localColormapSize(0)
, datasize(0)
@@ -215,7 +212,7 @@ public:
}
private:
- OwnPtr<GIFLZWContext> m_lzwContext;
+ std::unique_ptr<GIFLZWContext> m_lzwContext;
Vector<GIFLZWBlock> m_lzwBlocks; // LZW blocks for this frame.
size_t m_currentLzwBlock;
bool m_isComplete;
@@ -248,7 +245,7 @@ public:
{
}
- void setData(PassRefPtr<WebCore::SharedBuffer> data) { m_data = data; }
+ void setData(WebCore::SharedBuffer* data) { m_data = data; }
// FIXME: haltAtFrame should be size_t.
bool decode(WebCore::GIFImageDecoder::GIFQuery, unsigned haltAtFrame);
@@ -319,11 +316,9 @@ private:
int m_globalColormapSize; // Size of global colormap array.
int m_loopCount; // Netscape specific extension block to control the number of animation loops a GIF renders.
- Vector<OwnPtr<GIFFrameContext> > m_frames;
+ Vector<std::unique_ptr<GIFFrameContext> > m_frames;
size_t m_currentDecodingFrame;
RefPtr<WebCore::SharedBuffer> m_data;
bool m_parseCompleted;
};
-
-#endif