From 92827b695a69c7a3fd5940dc0aa1713fe3f3ee96 Mon Sep 17 00:00:00 2001 From: Ryan Harrison Date: Fri, 22 Sep 2017 11:05:13 -0400 Subject: Move C-style functions into CGifContext There are a number of functions in fx_gix.h/.cpp that take in a pointer to a CGifContext as their first parameter. Moving these to be methods in that class. BUG=pdfium:902 Change-Id: I8c583ab9e42dda4241aa8a6f865408a94fa6d273 Reviewed-on: https://pdfium-review.googlesource.com/14670 Commit-Queue: Ryan Harrison Reviewed-by: Tom Sepez --- core/fxcodec/lgif/cgifcontext.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'core/fxcodec/lgif/cgifcontext.h') diff --git a/core/fxcodec/lgif/cgifcontext.h b/core/fxcodec/lgif/cgifcontext.h index 71cf2bc75e..fdff235355 100644 --- a/core/fxcodec/lgif/cgifcontext.h +++ b/core/fxcodec/lgif/cgifcontext.h @@ -36,6 +36,12 @@ class CGifContext : public CCodec_GifModule::Context { int32_t trans_index, int32_t disposal_method, bool interlace); + GifDecodeStatus ReadHeader(); + GifDecodeStatus GetFrame(); + GifDecodeStatus LoadFrame(int32_t frame_num); + void SetInputBuffer(uint8_t* src_buf, uint32_t src_size); + uint32_t GetAvailInput(uint8_t** avail_buf_ptr) const; + int32_t GetFrameNum() const; UnownedPtr m_pModule; UnownedPtr m_pDelegate; @@ -59,6 +65,13 @@ class CGifContext : public CCodec_GifModule::Context { uint8_t global_color_resolution; uint8_t img_pass_num; char m_szLastError[GIF_MAX_ERROR_SIZE]; + + private: + uint8_t* ReadData(uint8_t** des_buf_pp, uint32_t data_size); + void SaveDecodingStatus(int32_t status); + GifDecodeStatus DecodeExtension(); + GifDecodeStatus DecodeImageInfo(); + void DecodingFailureAtTailCleanup(GifImage* gif_image_ptr); }; #endif // CORE_FXCODEC_LGIF_CGIFCONTEXT_H_ -- cgit v1.2.3