From 958142efa4561b5efd52733ad6c3b889cf49b3ae Mon Sep 17 00:00:00 2001 From: Tom Sepez Date: Tue, 25 Sep 2018 20:06:50 +0000 Subject: Introduce CodecModuleIface for progressive decoder modules. Another step before trying to fix the memory issue. Forces common APIs on the bunch of decoders, though some methods are unused. Requires adding some arguments/return values to get to a common API which are not used in all cases (yet?). Required converting some args to spans. Required proxying a GetJumpMark() call through the public module API to the private context. Bug: pdfium:1082 Change-Id: I0c0b7415141ff2a6f4f44777ca3d05521f08130d Reviewed-on: https://pdfium-review.googlesource.com/41950 Commit-Queue: Lei Zhang Reviewed-by: Lei Zhang --- core/fxcodec/codec/ccodec_progressivedecoder.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'core/fxcodec/codec/ccodec_progressivedecoder.h') diff --git a/core/fxcodec/codec/ccodec_progressivedecoder.h b/core/fxcodec/codec/ccodec_progressivedecoder.h index 87bf18411d..9a4572e452 100644 --- a/core/fxcodec/codec/ccodec_progressivedecoder.h +++ b/core/fxcodec/codec/ccodec_progressivedecoder.h @@ -182,7 +182,7 @@ class CCodec_ProgressiveDecoder : private: #ifdef PDF_ENABLE_XFA_BMP bool BmpReadMoreData(CCodec_BmpModule* pBmpModule, - CCodec_BmpModule::Context* pBmpContext, + CodecModuleIface::Context* pBmpContext, FXCODEC_STATUS& err_status); bool BmpDetectImageTypeInBuffer(CFX_DIBAttribute* pAttribute); FXCODEC_STATUS BmpStartDecode(const RetainPtr& pDIBitmap); @@ -251,18 +251,18 @@ class CCodec_ProgressiveDecoder : std::unique_ptr m_pSrcBuf; std::unique_ptr m_pDecodeBuf; std::unique_ptr m_pSrcPalette; - std::unique_ptr m_pJpegContext; + std::unique_ptr m_pJpegContext; #ifdef PDF_ENABLE_XFA_BMP - std::unique_ptr m_pBmpContext; + std::unique_ptr m_pBmpContext; #endif // PDF_ENABLE_XFA_BMP #ifdef PDF_ENABLE_XFA_GIF - std::unique_ptr m_pGifContext; + std::unique_ptr m_pGifContext; #endif // PDF_ENABLE_XFA_GIF #ifdef PDF_ENABLE_XFA_PNG - std::unique_ptr m_pPngContext; + std::unique_ptr m_pPngContext; #endif // PDF_ENABLE_XFA_PNG #ifdef PDF_ENABLE_XFA_TIFF - std::unique_ptr m_pTiffContext; + std::unique_ptr m_pTiffContext; #endif // PDF_ENABLE_XFA_TIFF uint32_t m_offSet = 0; uint32_t m_SrcSize = 0; -- cgit v1.2.3