summaryrefslogtreecommitdiff
path: root/core/fxcodec/codec/ccodec_progressivedecoder.h
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2017-02-27 10:12:59 -0800
committerChromium commit bot <commit-bot@chromium.org>2017-02-27 18:37:42 +0000
commit73c9f3bb3d82563d6d4496c4b0204d5c0825e8a2 (patch)
treebbc3e4e303f5f0a0a2e3931bfde01436130220bb /core/fxcodec/codec/ccodec_progressivedecoder.h
parent717a4fc857d66017cecc4c8f8285713135b9dc68 (diff)
downloadpdfium-73c9f3bb3d82563d6d4496c4b0204d5c0825e8a2.tar.xz
Allow building XFA without additional codecs.
This is something we'd like to try for initial XFA launches adding in codecs as justified by results in the wild. Adding statistics for the unsupported cases is a follow-up exercise once this builds correctly. We always build all the additional libraries, to allow fuzzers to link against them even if we are not shipping them. The linker will sort it out for the actual code. Rename some files to match the classes contained within. That the existing tests seem to pass with the codecs disabled warrants further investigation. Change-Id: Iad269db91289f12dc9f5dda8f48121d27a0c4367 Reviewed-on: https://pdfium-review.googlesource.com/2836 Commit-Queue: Tom Sepez <tsepez@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org>
Diffstat (limited to 'core/fxcodec/codec/ccodec_progressivedecoder.h')
-rw-r--r--core/fxcodec/codec/ccodec_progressivedecoder.h30
1 files changed, 19 insertions, 11 deletions
diff --git a/core/fxcodec/codec/ccodec_progressivedecoder.h b/core/fxcodec/codec/ccodec_progressivedecoder.h
index 614146f79d..e97d1b9f78 100644
--- a/core/fxcodec/codec/ccodec_progressivedecoder.h
+++ b/core/fxcodec/codec/ccodec_progressivedecoder.h
@@ -171,6 +171,7 @@ class CCodec_ProgressiveDecoder {
FXCODEC_STATUS m_status;
protected:
+#ifdef PDF_ENABLE_XFA_PNG
static bool PngReadHeaderFunc(void* pModule,
int width,
int height,
@@ -182,6 +183,9 @@ class CCodec_ProgressiveDecoder {
static void PngFillScanlineBufCompletedFunc(void* pModule,
int pass,
int line);
+#endif // PDF_ENABLE_XFA_PNG
+
+#ifdef PDF_ENABLE_XFA_GIF
static void GifRecordCurrentPositionCallback(void* pModule,
uint32_t& cur_pos);
static uint8_t* GifAskLocalPaletteBufCallback(void* pModule,
@@ -200,10 +204,25 @@ class CCodec_ProgressiveDecoder {
static void GifReadScanlineCallback(void* pModule,
int32_t row_num,
uint8_t* row_buf);
+ bool GifReadMoreData(CCodec_GifModule* pGifModule,
+ FXCODEC_STATUS& err_status);
+ void GifDoubleLineResampleVert(CFX_DIBitmap* pDeviceBitmap,
+ double scale_y,
+ int des_row);
+#endif // PDF_ENABLE_XFA_GIF
+
+#ifdef PDF_ENABLE_XFA_BMP
static bool BmpInputImagePositionBufCallback(void* pModule, uint32_t rcd_pos);
static void BmpReadScanlineCallback(void* pModule,
int32_t row_num,
uint8_t* row_buf);
+ void PngOneOneMapResampleHorz(CFX_DIBitmap* pDeviceBitmap,
+ int32_t des_line,
+ uint8_t* src_scan,
+ FXCodec_Format src_format);
+ bool BmpReadMoreData(CCodec_BmpModule* pBmpModule,
+ FXCODEC_STATUS& err_status);
+#endif // PDF_ENABLE_XFA_BMP
bool DetectImageType(FXCODEC_IMAGE_TYPE imageType,
CFX_DIBAttribute* pAttribute);
@@ -220,17 +239,6 @@ class CCodec_ProgressiveDecoder {
void ResampleVert(CFX_DIBitmap* pDeviceBitmap, double scale_y, int des_row);
bool JpegReadMoreData(CCodec_JpegModule* pJpegModule,
FXCODEC_STATUS& err_status);
- void PngOneOneMapResampleHorz(CFX_DIBitmap* pDeviceBitmap,
- int32_t des_line,
- uint8_t* src_scan,
- FXCodec_Format src_format);
- bool GifReadMoreData(CCodec_GifModule* pGifModule,
- FXCODEC_STATUS& err_status);
- void GifDoubleLineResampleVert(CFX_DIBitmap* pDeviceBitmap,
- double scale_y,
- int des_row);
- bool BmpReadMoreData(CCodec_BmpModule* pBmpModule,
- FXCODEC_STATUS& err_status);
void ResampleVertBT(CFX_DIBitmap* pDeviceBitmap, double scale_y, int des_row);
};