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

Side by Side Diff: core/src/fxcodec/lbmp/fx_bmp.h

Issue 1720043003: Remove foo != NULL outside of xfa/ (Closed) Base URL: https://pdfium.googlesource.com/pdfium@master
Patch Set: rebase Created 4 years, 10 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/src/fxcodec/codec/fx_codec_progress.cpp ('k') | core/src/fxcodec/lbmp/fx_bmp.cpp » ('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 #ifndef CORE_SRC_FXCODEC_LBMP_FX_BMP_H_ 7 #ifndef CORE_SRC_FXCODEC_LBMP_FX_BMP_H_
8 #define CORE_SRC_FXCODEC_LBMP_FX_BMP_H_ 8 #define CORE_SRC_FXCODEC_LBMP_FX_BMP_H_
9 9
10 #include <setjmp.h> 10 #include <setjmp.h>
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 int32_t _bmp_decode_rle4(bmp_decompress_struct_p bmp_ptr); 122 int32_t _bmp_decode_rle4(bmp_decompress_struct_p bmp_ptr);
123 uint8_t* _bmp_read_data(bmp_decompress_struct_p bmp_ptr, 123 uint8_t* _bmp_read_data(bmp_decompress_struct_p bmp_ptr,
124 uint8_t** des_buf_pp, 124 uint8_t** des_buf_pp,
125 FX_DWORD data_size); 125 FX_DWORD data_size);
126 void _bmp_save_decoding_status(bmp_decompress_struct_p bmp_ptr, int32_t status); 126 void _bmp_save_decoding_status(bmp_decompress_struct_p bmp_ptr, int32_t status);
127 void _bmp_input_buffer(bmp_decompress_struct_p bmp_ptr, 127 void _bmp_input_buffer(bmp_decompress_struct_p bmp_ptr,
128 uint8_t* src_buf, 128 uint8_t* src_buf,
129 FX_DWORD src_size); 129 FX_DWORD src_size);
130 FX_DWORD _bmp_get_avail_input(bmp_decompress_struct_p bmp_ptr, 130 FX_DWORD _bmp_get_avail_input(bmp_decompress_struct_p bmp_ptr,
131 uint8_t** avial_buf_ptr); 131 uint8_t** avial_buf_ptr);
132 #define BMP_PTR_NOT_NULL(ptr, bmp_ptr) \
133 if (ptr == NULL) { \
134 _bmp_error(bmp_ptr, "Out Of Memory"); \
135 return 0; \
136 }
137 typedef struct tag_bmp_compress_struct bmp_compress_struct; 132 typedef struct tag_bmp_compress_struct bmp_compress_struct;
138 typedef bmp_compress_struct* bmp_compress_struct_p; 133 typedef bmp_compress_struct* bmp_compress_struct_p;
139 typedef bmp_compress_struct_p* bmp_compress_struct_pp; 134 typedef bmp_compress_struct_p* bmp_compress_struct_pp;
140 struct tag_bmp_compress_struct { 135 struct tag_bmp_compress_struct {
141 BmpFileHeader file_header; 136 BmpFileHeader file_header;
142 BmpInfoHeader info_header; 137 BmpInfoHeader info_header;
143 uint8_t* src_buf; 138 uint8_t* src_buf;
144 FX_DWORD src_pitch; 139 FX_DWORD src_pitch;
145 FX_DWORD src_row; 140 FX_DWORD src_row;
146 uint8_t src_bpp; 141 uint8_t src_bpp;
147 FX_DWORD src_width; 142 FX_DWORD src_width;
148 FX_BOOL src_free; 143 FX_BOOL src_free;
149 FX_DWORD* pal_ptr; 144 FX_DWORD* pal_ptr;
150 FX_WORD pal_num; 145 FX_WORD pal_num;
151 #ifdef BMP_SUPPORT_BITFIELD 146 #ifdef BMP_SUPPORT_BITFIELD
152 uint8_t bit_type; 147 uint8_t bit_type;
153 #endif 148 #endif
154 }; 149 };
155 150
156 bmp_compress_struct_p _bmp_create_compress(); 151 bmp_compress_struct_p _bmp_create_compress();
157 void _bmp_destroy_compress(bmp_compress_struct_p bmp_ptr); 152 void _bmp_destroy_compress(bmp_compress_struct_p bmp_ptr);
158 FX_BOOL _bmp_encode_image(bmp_compress_struct_p bmp_ptr, 153 FX_BOOL _bmp_encode_image(bmp_compress_struct_p bmp_ptr,
159 uint8_t*& dst_buf, 154 uint8_t*& dst_buf,
160 FX_DWORD& dst_size); 155 FX_DWORD& dst_size);
161 156
162 #endif // CORE_SRC_FXCODEC_LBMP_FX_BMP_H_ 157 #endif // CORE_SRC_FXCODEC_LBMP_FX_BMP_H_
OLDNEW
« no previous file with comments | « core/src/fxcodec/codec/fx_codec_progress.cpp ('k') | core/src/fxcodec/lbmp/fx_bmp.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698