From e2df5b7305df66efbd81232d911615af60624ae3 Mon Sep 17 00:00:00 2001 From: Ryan Harrison Date: Tue, 26 Sep 2017 15:39:10 -0400 Subject: 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, 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 Commit-Queue: Ryan Harrison --- core/fxcodec/lgif/cgifcontext.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'core/fxcodec/lgif/cgifcontext.h') 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 #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 m_GifGCE; uint8_t* next_in; std::vector> m_Images; - std::unique_ptr m_ImgDecoder; + std::unique_ptr m_ImgDecoder; int width; int height; uint8_t bc_index; -- cgit v1.2.3