From 9ca9e297661b4a3ee9c25f68d3f9c8e0c270bda9 Mon Sep 17 00:00:00 2001 From: Dan Sinclair Date: Mon, 27 Nov 2017 21:24:06 +0000 Subject: Convert CFX_GifContext::GetFrameNum to size_t This CL removes the CollectionSize and updates call locations as needed. Bug: pdfium:774 Change-Id: I813c500b3a17a194407ceb1304252b9b16fe1779 Reviewed-on: https://pdfium-review.googlesource.com/19590 Commit-Queue: dsinclair Reviewed-by: Ryan Harrison --- core/fxcodec/codec/ccodec_progressivedecoder.h | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 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 ea51429688..7c780ff027 100644 --- a/core/fxcodec/codec/ccodec_progressivedecoder.h +++ b/core/fxcodec/codec/ccodec_progressivedecoder.h @@ -8,6 +8,7 @@ #define CORE_FXCODEC_CODEC_CCODEC_PROGRESSIVEDECODER_H_ #include +#include #include #include "core/fxcodec/codec/ccodec_bmpmodule.h" @@ -56,14 +57,12 @@ 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); + std::pair GetFrames(); FXCODEC_STATUS StartDecode(const RetainPtr& pDIBitmap, int start_x, int start_y, int size_x, - int size_y, - int32_t frames = 0, - bool bInterpol = true); + int size_y); FXCODEC_STATUS ContinueDecode(); @@ -83,8 +82,7 @@ class CCodec_ProgressiveDecoder : public CCodec_BmpModule::Delegate, int dest_max, int src_len, int src_min, - int src_max, - bool bInterpol); + int src_max); PixelWeight* GetPixelWeight(int pixel) { return reinterpret_cast(m_pWeightTables.data() + (pixel - m_DestMin) * m_ItemSize); @@ -100,7 +98,7 @@ class CCodec_ProgressiveDecoder : public CCodec_BmpModule::Delegate, CFXCODEC_HorzTable(); ~CFXCODEC_HorzTable(); - void Calc(int dest_len, int src_len, bool bInterpol); + void Calc(int dest_len, int src_len); PixelWeight* GetPixelWeight(int pixel) { return reinterpret_cast(m_pWeightTables.data() + pixel * m_ItemSize); @@ -199,7 +197,6 @@ class CCodec_ProgressiveDecoder : public CCodec_BmpModule::Delegate, uint32_t m_SrcSize; uint8_t* m_pDecodeBuf; int m_ScanlineSize; - bool m_bInterpol; CFXCODEC_WeightTable m_WeightHorz; CFXCODEC_VertTable m_WeightVert; CFXCODEC_HorzTable m_WeightHorzOO; @@ -218,8 +215,8 @@ class CCodec_ProgressiveDecoder : public CCodec_BmpModule::Delegate, int m_SrcRow; FXCodec_Format m_SrcFormat; int m_SrcPassNumber; - int m_FrameNumber; - int m_FrameCur; + size_t m_FrameNumber; + size_t m_FrameCur; int m_GifBgIndex; uint8_t* m_pGifPalette; int32_t m_GifPltNumber; -- cgit v1.2.3