summaryrefslogtreecommitdiff
path: root/core/src/fxcodec/codec/fx_codec_jpeg.cpp
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2015-11-25 15:52:28 -0800
committerTom Sepez <tsepez@chromium.org>2015-11-25 15:52:28 -0800
commita2c42ce6150c4072613a6fc9fa0dc064dbf0a15d (patch)
treeb1705df8ed8c9f2f8db5095fbb6e19548493eacd /core/src/fxcodec/codec/fx_codec_jpeg.cpp
parent214947de80a9be2ddb134b1962affc82e20563c9 (diff)
downloadpdfium-a2c42ce6150c4072613a6fc9fa0dc064dbf0a15d.tar.xz
Manual fixups to PDF_ENABLE_XFA in core/
R=thestig@chromium.org Review URL: https://codereview.chromium.org/1477663003 .
Diffstat (limited to 'core/src/fxcodec/codec/fx_codec_jpeg.cpp')
-rw-r--r--core/src/fxcodec/codec/fx_codec_jpeg.cpp16
1 files changed, 11 insertions, 5 deletions
diff --git a/core/src/fxcodec/codec/fx_codec_jpeg.cpp b/core/src/fxcodec/codec/fx_codec_jpeg.cpp
index b5eb4b2692..1276219123 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) {
@@ -242,7 +243,8 @@ static void _JpegLoadAttribute(struct jpeg_decompress_struct* pInfo,
pAttribute->m_wDPIUnit = pInfo->density_unit;
}
}
-#endif
+#endif // PDF_ENABLE_XFA
+
static FX_BOOL _JpegLoadInfo(const uint8_t* src_buf,
FX_DWORD src_size,
int& width,
@@ -629,15 +631,19 @@ void CCodec_JpegModule::Input(void* pContext,
p->m_SrcMgr.next_input_byte = src_buf;
p->m_SrcMgr.bytes_in_buffer = src_size;
}
+
+#ifdef PDF_ENABLE_XFA
int CCodec_JpegModule::ReadHeader(void* pContext,
int* width,
int* height,
-#ifndef PDF_ENABLE_XFA
- int* nComps) {
-#else
int* nComps,
CFX_DIBAttribute* pAttribute) {
-#endif
+#else // PDF_ENABLE_XFA
+int CCodec_JpegModule::ReadHeader(void* pContext,
+ int* width,
+ int* height,
+ int* nComps) {
+#endif // PDF_ENABLE_XFA
FXJPEG_Context* p = (FXJPEG_Context*)pContext;
if (setjmp(p->m_JumpMark) == -1) {
return 1;