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

Side by Side Diff: core/fxcodec/lgif/fx_gif.cpp

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 unified diff | Download patch
« no previous file with comments | « core/fxcodec/lgif/fx_gif.h ('k') | core/fxcrt/extension.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 PDFium Authors. All rights reserved. 1 // Copyright 2014 PDFium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6 6
7 #include "core/fxcodec/lgif/fx_gif.h" 7 #include "core/fxcodec/lgif/fx_gif.h"
8 8
9 #include "core/fxcodec/lbmp/fx_bmp.h" 9 #include "core/fxcodec/lbmp/fx_bmp.h"
10 10
11 void CGifLZWDecoder::Input(uint8_t* src_buf, uint32_t src_size) { 11 void CGifLZWDecoder::Input(uint8_t* src_buf, uint32_t src_size) {
12 next_in = src_buf; 12 next_in = src_buf;
13 avail_in = src_size; 13 avail_in = src_size;
14 } 14 }
15
15 uint32_t CGifLZWDecoder::GetAvailInput() { 16 uint32_t CGifLZWDecoder::GetAvailInput() {
16 return avail_in; 17 return avail_in;
17 } 18 }
19
20 CGifLZWDecoder::CGifLZWDecoder(FX_CHAR* error_ptr)
21 : code_size(0),
22 code_size_cur(0),
23 code_clear(0),
24 code_end(0),
25 code_next(0),
26 code_first(0),
27 stack_size(0),
28 code_old(0),
29 next_in(nullptr),
30 avail_in(0),
31 bits_left(0),
32 code_store(0),
33 err_msg_ptr(error_ptr) {}
34
35 CGifLZWDecoder::~CGifLZWDecoder() {}
36
18 void CGifLZWDecoder::InitTable(uint8_t code_len) { 37 void CGifLZWDecoder::InitTable(uint8_t code_len) {
19 code_size = code_len; 38 code_size = code_len;
20 code_clear = 1 << code_size; 39 code_clear = 1 << code_size;
21 code_end = code_clear + 1; 40 code_end = code_clear + 1;
22 bits_left = 0; 41 bits_left = 0;
23 code_store = 0; 42 code_store = 0;
24 next_in = nullptr; 43 next_in = nullptr;
25 avail_in = 0; 44 avail_in = 0;
26 stack_size = 0; 45 stack_size = 0;
27 code_first = 0; 46 code_first = 0;
(...skipping 1184 matching lines...) Expand 10 before | Expand all | Expand 10 after
1212 gif_ptr->cur_offset = cur_offset; 1231 gif_ptr->cur_offset = cur_offset;
1213 res = FALSE; 1232 res = FALSE;
1214 } 1233 }
1215 dst_len = gif_ptr->cur_offset; 1234 dst_len = gif_ptr->cur_offset;
1216 dst_buf[dst_len - 1] = GIF_SIG_TRAILER; 1235 dst_buf[dst_len - 1] = GIF_SIG_TRAILER;
1217 if (res) { 1236 if (res) {
1218 gif_ptr->frames++; 1237 gif_ptr->frames++;
1219 } 1238 }
1220 return res; 1239 return res;
1221 } 1240 }
OLDNEW
« no previous file with comments | « core/fxcodec/lgif/fx_gif.h ('k') | core/fxcrt/extension.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698