Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1911)

Unified Diff: core/fxcodec/lgif/fx_gif.h

Issue 2060913003: Make code compile with clang_use_chrome_plugin (part II) (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: rebase Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « core/fxcodec/include/fx_codec.h ('k') | core/fxcodec/lgif/fx_gif.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/fxcodec/lgif/fx_gif.h
diff --git a/core/fxcodec/lgif/fx_gif.h b/core/fxcodec/lgif/fx_gif.h
index 7d325fb3fe39f4b4cf6db97a1eec340d6899169e..b7157df429788fd31ef0f22044f737e7d4c0dfbc 100644
--- a/core/fxcodec/lgif/fx_gif.h
+++ b/core/fxcodec/lgif/fx_gif.h
@@ -107,22 +107,25 @@ typedef struct tagGifImage {
uint8_t* image_row_buf;
int32_t image_row_num;
} GifImage;
+
typedef struct tagGifPlainText {
GifGCE* gce_ptr;
GifPTE* pte_ptr;
CFX_ByteString* string_ptr;
} GifPlainText;
+
class CGifLZWDecoder {
public:
struct tag_Table {
uint16_t prefix;
uint8_t suffix;
};
- CGifLZWDecoder(FX_CHAR* error_ptr = nullptr) { err_msg_ptr = error_ptr; }
- void InitTable(uint8_t code_len);
- int32_t Decode(uint8_t* des_buf, uint32_t& des_size);
+ explicit CGifLZWDecoder(FX_CHAR* error_ptr);
+ ~CGifLZWDecoder();
+ void InitTable(uint8_t code_len);
+ int32_t Decode(uint8_t* des_buf, uint32_t& des_size);
void Input(uint8_t* src_buf, uint32_t src_size);
uint32_t GetAvailInput();
@@ -130,6 +133,7 @@ class CGifLZWDecoder {
void ClearTable();
void AddCode(uint16_t prefix_code, uint8_t append_char);
void DecodeString(uint16_t code);
+
uint8_t code_size;
uint8_t code_size_cur;
uint16_t code_clear;
@@ -149,14 +153,17 @@ class CGifLZWDecoder {
FX_CHAR* err_msg_ptr;
};
+
class CGifLZWEncoder {
public:
struct tag_Table {
uint16_t prefix;
uint8_t suffix;
};
+
CGifLZWEncoder();
~CGifLZWEncoder();
+
void Start(uint8_t code_len,
const uint8_t* src_buf,
uint8_t*& dst_buf,
@@ -178,6 +185,7 @@ class CGifLZWEncoder {
uint32_t& dst_len,
uint32_t& offset);
void WriteBlock(uint8_t*& dst_buf, uint32_t& dst_len, uint32_t& offset);
+
jmp_buf jmp;
uint32_t src_offset;
uint8_t src_bit_offset;
@@ -194,6 +202,7 @@ class CGifLZWEncoder {
tag_Table code_table[GIF_MAX_LZW_CODE];
uint16_t table_cur;
};
+
typedef struct tag_gif_decompress_struct gif_decompress_struct;
typedef gif_decompress_struct* gif_decompress_struct_p;
typedef gif_decompress_struct_p* gif_decompress_struct_pp;
« no previous file with comments | « core/fxcodec/include/fx_codec.h ('k') | core/fxcodec/lgif/fx_gif.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698