diff options
author | Ryan Harrison <rharrison@chromium.org> | 2017-09-27 15:39:26 -0400 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2017-09-27 19:56:53 +0000 |
commit | 36a155d1f3a9d9f315655a20d583c13644ef1f3e (patch) | |
tree | 66e8a87c0b35f3d6c71460f3a0c4ce68a15b51f0 /core/fxcodec/lgif/cfx_lzwdecoder.h | |
parent | dd17a14f060c39f50ca24522b202ffef5436dd43 (diff) | |
download | pdfium-36a155d1f3a9d9f315655a20d583c13644ef1f3e.tar.xz |
Cleaning up naming of GIF files/classes/variables
Moved everything from core/fxcodec/lgif to core/fxcodec/gif
Converted CGifContext -> CFX_GifContext
Removed _ptr suffixes from CXF_GifContext
Movef fx_gif.* -> cfx_gif.*
Renamed structs in cfx_gif.h
Renamed members of CFX_GifImage
Renamed members of CFX_GifContext
Renamed CFX_LZWDecoder -> CFX_LZWDecompressor
BUG=pdfium:903
Change-Id: I537e905e935da26832e6bbdc03e0373ed5500bcb
Reviewed-on: https://pdfium-review.googlesource.com/14990
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'core/fxcodec/lgif/cfx_lzwdecoder.h')
-rw-r--r-- | core/fxcodec/lgif/cfx_lzwdecoder.h | 55 |
1 files changed, 0 insertions, 55 deletions
diff --git a/core/fxcodec/lgif/cfx_lzwdecoder.h b/core/fxcodec/lgif/cfx_lzwdecoder.h deleted file mode 100644 index 9dbf15d9b7..0000000000 --- a/core/fxcodec/lgif/cfx_lzwdecoder.h +++ /dev/null @@ -1,55 +0,0 @@ -// Copyright 2017 PDFium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com - -#ifndef CORE_FXCODEC_LGIF_CFX_LZWDECODER_H_ -#define CORE_FXCODEC_LGIF_CFX_LZWDECODER_H_ - -#include <memory> -#include <vector> - -#include "core/fxcodec/lgif/fx_gif.h" - -class CFX_LZWDecoder { - public: - typedef struct { - uint16_t prefix; - uint8_t suffix; - } CodeEntry; - - // Returns nullptr on error - static std::unique_ptr<CFX_LZWDecoder> Create(uint8_t color_exp, - uint8_t code_exp); - ~CFX_LZWDecoder(); - - GifDecodeStatus Decode(uint8_t* src_buf, - uint32_t src_size, - uint8_t* des_buf, - uint32_t* des_size); - - private: - CFX_LZWDecoder(uint8_t color_exp, uint8_t code_exp); - void ClearTable(); - void AddCode(uint16_t prefix_code, uint8_t append_char); - bool DecodeString(uint16_t code); - - uint8_t code_size_; - uint8_t code_size_cur_; - uint16_t code_color_end_; - uint16_t code_clear_; - uint16_t code_end_; - uint16_t code_next_; - uint8_t code_first_; - uint8_t stack_[GIF_MAX_LZW_CODE]; - size_t stack_size_; - CodeEntry code_table_[GIF_MAX_LZW_CODE]; - uint16_t code_old_; - uint8_t* next_in_; - uint32_t avail_in_; - uint8_t bits_left_; - uint32_t code_store_; -}; - -#endif // CORE_FXCODEC_LGIF_CFX_LZWDECODER_H_ |