From dcefccc9f0f2002f79a4a67048fac1360c1d6c26 Mon Sep 17 00:00:00 2001 From: Dan Sinclair Date: Thu, 4 May 2017 12:12:06 -0400 Subject: Removing unused IFX_Pause parameters MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Remove more IFX_Pause parameters which are not used. Change-Id: I9d10bb6b28d6d4d94ec3c4241b1c5a8a0709264c Reviewed-on: https://pdfium-review.googlesource.com/4875 Reviewed-by: Nicolás Peña Commit-Queue: dsinclair --- core/fxcodec/codec/ccodec_progressivedecoder.h | 5 ++--- core/fxcodec/codec/fx_codec_progress.cpp | 29 ++++---------------------- 2 files changed, 6 insertions(+), 28 deletions(-) (limited to 'core/fxcodec/codec') diff --git a/core/fxcodec/codec/ccodec_progressivedecoder.h b/core/fxcodec/codec/ccodec_progressivedecoder.h index 6081fe3c19..f63c1ded0c 100644 --- a/core/fxcodec/codec/ccodec_progressivedecoder.h +++ b/core/fxcodec/codec/ccodec_progressivedecoder.h @@ -22,7 +22,6 @@ class CCodec_JpegModule; class CCodec_ModuleMgr; class CFX_DIBAttribute; class IFX_SeekableReadStream; -class IFX_Pause; struct FXJPEG_Context; class CCodec_ProgressiveDecoder : public CCodec_BmpModule::Delegate, @@ -57,7 +56,7 @@ class CCodec_ProgressiveDecoder : public CCodec_BmpModule::Delegate, int32_t GetBPC() const { return m_SrcBPC; } void SetClipBox(FX_RECT* clip); - FXCODEC_STATUS GetFrames(int32_t& frames, IFX_Pause* pPause = nullptr); + FXCODEC_STATUS GetFrames(int32_t& frames); FXCODEC_STATUS StartDecode(const CFX_RetainPtr& pDIBitmap, int start_x, int start_y, @@ -66,7 +65,7 @@ class CCodec_ProgressiveDecoder : public CCodec_BmpModule::Delegate, int32_t frames = 0, bool bInterpol = true); - FXCODEC_STATUS ContinueDecode(IFX_Pause* pPause = nullptr); + FXCODEC_STATUS ContinueDecode(); struct PixelWeight { int m_SrcStart; diff --git a/core/fxcodec/codec/fx_codec_progress.cpp b/core/fxcodec/codec/fx_codec_progress.cpp index 9d710e582d..e26431ffab 100644 --- a/core/fxcodec/codec/fx_codec_progress.cpp +++ b/core/fxcodec/codec/fx_codec_progress.cpp @@ -1784,8 +1784,7 @@ void CCodec_ProgressiveDecoder::Resample( } } -FXCODEC_STATUS CCodec_ProgressiveDecoder::GetFrames(int32_t& frames, - IFX_Pause* pPause) { +FXCODEC_STATUS CCodec_ProgressiveDecoder::GetFrames(int32_t& frames) { if (!(m_status == FXCODEC_STATUS_FRAME_READY || m_status == FXCODEC_STATUS_FRAME_TOBECONTINUE)) { return FXCODEC_STATUS_ERROR; @@ -1809,13 +1808,9 @@ FXCODEC_STATUS CCodec_ProgressiveDecoder::GetFrames(int32_t& frames, pGifModule->LoadFrameInfo(m_pGifContext, &m_FrameNumber); while (readResult == GifDecodeStatus::Unfinished) { FXCODEC_STATUS error_status = FXCODEC_STATUS_ERR_READ; - if (!GifReadMoreData(pGifModule, error_status)) { + if (!GifReadMoreData(pGifModule, error_status)) return error_status; - } - if (pPause && pPause->NeedToPauseNow()) { - m_status = FXCODEC_STATUS_FRAME_TOBECONTINUE; - return m_status; - } + readResult = pGifModule->LoadFrameInfo(m_pGifContext, &m_FrameNumber); } if (readResult == GifDecodeStatus::Success) { @@ -2043,7 +2038,7 @@ FXCODEC_STATUS CCodec_ProgressiveDecoder::StartDecode( } } -FXCODEC_STATUS CCodec_ProgressiveDecoder::ContinueDecode(IFX_Pause* pPause) { +FXCODEC_STATUS CCodec_ProgressiveDecoder::ContinueDecode() { if (m_status != FXCODEC_STATUS_DECODE_TOBECONTINUE) return FXCODEC_STATUS_ERROR; @@ -2074,10 +2069,6 @@ FXCODEC_STATUS CCodec_ProgressiveDecoder::ContinueDecode(IFX_Pause* pPause) { } Resample(m_pDeviceBitmap, m_SrcRow, m_pDecodeBuf, m_SrcFormat); m_SrcRow++; - if (pPause && pPause->NeedToPauseNow()) { - m_status = FXCODEC_STATUS_DECODE_TOBECONTINUE; - return m_status; - } } } case FXCODEC_IMAGE_PNG: { @@ -2122,10 +2113,6 @@ FXCODEC_STATUS CCodec_ProgressiveDecoder::ContinueDecode(IFX_Pause* pPause) { m_status = FXCODEC_STATUS_ERROR; return m_status; } - if (pPause && pPause->NeedToPauseNow()) { - m_status = FXCODEC_STATUS_DECODE_TOBECONTINUE; - return m_status; - } } } case FXCODEC_IMAGE_GIF: { @@ -2145,10 +2132,6 @@ FXCODEC_STATUS CCodec_ProgressiveDecoder::ContinueDecode(IFX_Pause* pPause) { m_status = error_status; return m_status; } - if (pPause && pPause->NeedToPauseNow()) { - m_status = FXCODEC_STATUS_DECODE_TOBECONTINUE; - return m_status; - } readRes = pGifModule->LoadFrame(m_pGifContext, m_FrameCur, nullptr); } if (readRes == GifDecodeStatus::Success) { @@ -2179,10 +2162,6 @@ FXCODEC_STATUS CCodec_ProgressiveDecoder::ContinueDecode(IFX_Pause* pPause) { m_status = error_status; return m_status; } - if (pPause && pPause->NeedToPauseNow()) { - m_status = FXCODEC_STATUS_DECODE_TOBECONTINUE; - return m_status; - } readRes = pBmpModule->LoadImage(m_pBmpContext); } if (readRes == 1) { -- cgit v1.2.3