From cc2b38d41141a939c7ef73c0066418b8d823c681 Mon Sep 17 00:00:00 2001 From: Dan Sinclair Date: Wed, 30 Aug 2017 17:11:19 -0400 Subject: Split IFX_Pause out of fx_basic This CL moves IFX_Pause out to its own class from fx_basic and updates includes as needed. Change-Id: Iebdd183d8c85aa17570f190f1a7d1602c0af3c8b Reviewed-on: https://pdfium-review.googlesource.com/12491 Commit-Queue: dsinclair Reviewed-by: Tom Sepez --- core/fxcodec/codec/ccodec_jbig2module.h | 6 +++--- core/fxcodec/codec/ccodec_scanlinedecoder.h | 4 ++-- core/fxcodec/codec/fx_codec.cpp | 4 +++- core/fxcodec/codec/fx_codec_jbig.cpp | 4 ++-- 4 files changed, 10 insertions(+), 8 deletions(-) (limited to 'core/fxcodec/codec') diff --git a/core/fxcodec/codec/ccodec_jbig2module.h b/core/fxcodec/codec/ccodec_jbig2module.h index b80d78f605..9b894fbc97 100644 --- a/core/fxcodec/codec/ccodec_jbig2module.h +++ b/core/fxcodec/codec/ccodec_jbig2module.h @@ -15,7 +15,7 @@ class CJBig2_Context; class CJBig2_Image; class CPDF_StreamAcc; -class IFX_Pause; +class IFX_PauseIndicator; class JBig2_DocumentContext; class CCodec_Jbig2Context { @@ -46,9 +46,9 @@ class CCodec_Jbig2Module { const CFX_RetainPtr& global_stream, uint8_t* dest_buf, uint32_t dest_pitch, - IFX_Pause* pPause); + IFX_PauseIndicator* pPause); FXCODEC_STATUS ContinueDecode(CCodec_Jbig2Context* pJbig2Context, - IFX_Pause* pPause); + IFX_PauseIndicator* pPause); private: FXCODEC_STATUS Decode(CCodec_Jbig2Context* pJbig2Context, int result); diff --git a/core/fxcodec/codec/ccodec_scanlinedecoder.h b/core/fxcodec/codec/ccodec_scanlinedecoder.h index 06bb6d5abe..05d5eab92b 100644 --- a/core/fxcodec/codec/ccodec_scanlinedecoder.h +++ b/core/fxcodec/codec/ccodec_scanlinedecoder.h @@ -9,7 +9,7 @@ #include "core/fxcrt/fx_system.h" -class IFX_Pause; +class IFX_PauseIndicator; class CCodec_ScanlineDecoder { public: @@ -24,7 +24,7 @@ class CCodec_ScanlineDecoder { virtual ~CCodec_ScanlineDecoder(); const uint8_t* GetScanline(int line); - bool SkipToScanline(int line, IFX_Pause* pPause); + bool SkipToScanline(int line, IFX_PauseIndicator* pPause); int GetWidth() { return m_OutputWidth; } int GetHeight() { return m_OutputHeight; } diff --git a/core/fxcodec/codec/fx_codec.cpp b/core/fxcodec/codec/fx_codec.cpp index aeffd9cb45..2681f72199 100644 --- a/core/fxcodec/codec/fx_codec.cpp +++ b/core/fxcodec/codec/fx_codec.cpp @@ -15,6 +15,7 @@ #include "core/fxcodec/codec/codec_int.h" #include "core/fxcrt/fx_extension.h" #include "core/fxcrt/fx_safe_types.h" +#include "core/fxcrt/ifx_pauseindicator.h" #include "third_party/base/logging.h" #include "third_party/base/ptr_util.h" @@ -1389,7 +1390,8 @@ const uint8_t* CCodec_ScanlineDecoder::GetScanline(int line) { return m_pLastScanline; } -bool CCodec_ScanlineDecoder::SkipToScanline(int line, IFX_Pause* pPause) { +bool CCodec_ScanlineDecoder::SkipToScanline(int line, + IFX_PauseIndicator* pPause) { if (m_NextLine == line || m_NextLine == line + 1) return false; diff --git a/core/fxcodec/codec/fx_codec_jbig.cpp b/core/fxcodec/codec/fx_codec_jbig.cpp index 4c545c3c3a..f6ace30dd3 100644 --- a/core/fxcodec/codec/fx_codec_jbig.cpp +++ b/core/fxcodec/codec/fx_codec_jbig.cpp @@ -48,7 +48,7 @@ FXCODEC_STATUS CCodec_Jbig2Module::StartDecode( const CFX_RetainPtr& global_stream, uint8_t* dest_buf, uint32_t dest_pitch, - IFX_Pause* pPause) { + IFX_PauseIndicator* pPause) { if (!pJbig2Context) return FXCODEC_STATUS_ERR_PARAMS; @@ -71,7 +71,7 @@ FXCODEC_STATUS CCodec_Jbig2Module::StartDecode( FXCODEC_STATUS CCodec_Jbig2Module::ContinueDecode( CCodec_Jbig2Context* pJbig2Context, - IFX_Pause* pPause) { + IFX_PauseIndicator* pPause) { int ret = pJbig2Context->m_pContext->Continue(pPause); return Decode(pJbig2Context, ret); } -- cgit v1.2.3