diff options
author | Dan Sinclair <dsinclair@chromium.org> | 2017-11-27 21:24:06 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2017-11-27 21:24:06 +0000 |
commit | 9ca9e297661b4a3ee9c25f68d3f9c8e0c270bda9 (patch) | |
tree | 8b28edc1ce78727da78138df2cdf6ea328e99ddd /core/fxcodec/codec/ccodec_progressivedecoder.h | |
parent | 9b93815edae6687d79d73c153c30d27e280c7571 (diff) | |
download | pdfium-9ca9e297661b4a3ee9c25f68d3f9c8e0c270bda9.tar.xz |
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 <dsinclair@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Diffstat (limited to 'core/fxcodec/codec/ccodec_progressivedecoder.h')
-rw-r--r-- | core/fxcodec/codec/ccodec_progressivedecoder.h | 17 |
1 files changed, 7 insertions, 10 deletions
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 <memory> +#include <utility> #include <vector> #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<FXCODEC_STATUS, size_t> GetFrames(); FXCODEC_STATUS StartDecode(const RetainPtr<CFX_DIBitmap>& 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<PixelWeight*>(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<PixelWeight*>(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; |