diff options
author | Tom Sepez <tsepez@chromium.org> | 2015-11-25 12:15:38 -0800 |
---|---|---|
committer | Tom Sepez <tsepez@chromium.org> | 2015-11-25 12:15:38 -0800 |
commit | 5c4c193fd4b6dd0657abf5e74125f9887f91d720 (patch) | |
tree | 976cfb53dd2580eff58fb02556d1828fff12659d /core/src/fxcodec/codec/fx_codec_jpeg.cpp | |
parent | 8b90ee66872aa883fc46ac2b6e7acad35c7c96c6 (diff) | |
download | pdfium-5c4c193fd4b6dd0657abf5e74125f9887f91d720.tar.xz |
Inflict PPDF_ENABLE_XFA ifdefs on XFA core/
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1471323004 .
Diffstat (limited to 'core/src/fxcodec/codec/fx_codec_jpeg.cpp')
-rw-r--r-- | core/src/fxcodec/codec/fx_codec_jpeg.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/core/src/fxcodec/codec/fx_codec_jpeg.cpp b/core/src/fxcodec/codec/fx_codec_jpeg.cpp index b59deb5a0d..b5eb4b2692 100644 --- a/core/src/fxcodec/codec/fx_codec_jpeg.cpp +++ b/core/src/fxcodec/codec/fx_codec_jpeg.cpp @@ -230,6 +230,7 @@ static void _JpegEncode(const CFX_DIBSource* pSource, FX_Free(line_buf); dest_size = dest_buf_length - (FX_STRSIZE)dest.free_in_buffer; } +#ifdef PDF_ENABLE_XFA static void _JpegLoadAttribute(struct jpeg_decompress_struct* pInfo, CFX_DIBAttribute* pAttribute) { if (pInfo == NULL || pAttribute == NULL) { @@ -241,6 +242,7 @@ static void _JpegLoadAttribute(struct jpeg_decompress_struct* pInfo, pAttribute->m_wDPIUnit = pInfo->density_unit; } } +#endif static FX_BOOL _JpegLoadInfo(const uint8_t* src_buf, FX_DWORD src_size, int& width, @@ -630,8 +632,12 @@ void CCodec_JpegModule::Input(void* pContext, int CCodec_JpegModule::ReadHeader(void* pContext, int* width, int* height, +#ifndef PDF_ENABLE_XFA + int* nComps) { +#else int* nComps, CFX_DIBAttribute* pAttribute) { +#endif FXJPEG_Context* p = (FXJPEG_Context*)pContext; if (setjmp(p->m_JumpMark) == -1) { return 1; @@ -646,7 +652,9 @@ int CCodec_JpegModule::ReadHeader(void* pContext, *width = p->m_Info.image_width; *height = p->m_Info.image_height; *nComps = p->m_Info.num_components; +#ifdef PDF_ENABLE_XFA _JpegLoadAttribute(&p->m_Info, pAttribute); +#endif return 0; } int CCodec_JpegModule::StartScanline(void* pContext, int down_scale) { |