summaryrefslogtreecommitdiff
path: root/core/fxcodec/lgif/cgifcontext.h
diff options
context:
space:
mode:
authorRyan Harrison <rharrison@chromium.org>2017-09-26 15:39:10 -0400
committerChromium commit bot <commit-bot@chromium.org>2017-09-26 19:58:33 +0000
commite2df5b7305df66efbd81232d911615af60624ae3 (patch)
tree5c5aff0ae260792790cfb1ed2f3f15863c0c0d63 /core/fxcodec/lgif/cgifcontext.h
parent7d04f1b0ab4848f1d10983b7a7b1444ac93dec70 (diff)
downloadpdfium-e2df5b7305df66efbd81232d911615af60624ae3.tar.xz
Move LZW decoder out of fx_gif
CGifLZWDecoder has been moved out into its own file, name changed to CFX_LZWDecoder, member variable names updated, creation pattern changed, and unit tests added. Wrt the creation pattern, there is no longer a constructor and 2 initialization methods that need to be called. Instead all of the initialization is done as part of the constructor. A wrapper has been added for generating a std::unique_ptr<CFX_LZWDecoder>, so that params can be validated. BUG=pdfium:900,pdfium:901,pdfium:903,pdfium:904 Change-Id: Idcbe773f7fb18b08e64d5a89bfd87d4801332c53 Reviewed-on: https://pdfium-review.googlesource.com/14814 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Diffstat (limited to 'core/fxcodec/lgif/cgifcontext.h')
-rw-r--r--core/fxcodec/lgif/cgifcontext.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/core/fxcodec/lgif/cgifcontext.h b/core/fxcodec/lgif/cgifcontext.h
index fdff235355..87f38f0694 100644
--- a/core/fxcodec/lgif/cgifcontext.h
+++ b/core/fxcodec/lgif/cgifcontext.h
@@ -11,6 +11,7 @@
#include <vector>
#include "core/fxcodec/codec/ccodec_gifmodule.h"
+#include "core/fxcodec/lgif/cfx_lzwdecoder.h"
#include "core/fxcodec/lgif/fx_gif.h"
#include "core/fxcrt/fx_string.h"
#include "core/fxcrt/unowned_ptr.h"
@@ -56,7 +57,7 @@ class CGifContext : public CCodec_GifModule::Context {
std::unique_ptr<GifGCE> m_GifGCE;
uint8_t* next_in;
std::vector<std::unique_ptr<GifImage>> m_Images;
- std::unique_ptr<CGifLZWDecoder> m_ImgDecoder;
+ std::unique_ptr<CFX_LZWDecoder> m_ImgDecoder;
int width;
int height;
uint8_t bc_index;