summaryrefslogtreecommitdiff
path: root/core/fxcodec
diff options
context:
space:
mode:
Diffstat (limited to 'core/fxcodec')
-rw-r--r--core/fxcodec/codec/ccodec_progressivedecoder.h5
-rw-r--r--core/fxcodec/codec/fx_codec_progress.cpp29
2 files changed, 6 insertions, 28 deletions
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<CFX_DIBitmap>& 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) {