summaryrefslogtreecommitdiff
path: root/core/fxcodec/lgif/cgifcontext.h
diff options
context:
space:
mode:
authorRyan Harrison <rharrison@chromium.org>2017-09-22 11:05:13 -0400
committerChromium commit bot <commit-bot@chromium.org>2017-09-22 15:13:06 +0000
commit92827b695a69c7a3fd5940dc0aa1713fe3f3ee96 (patch)
tree1698c9f11f3709683cd4eea615b9a4d970409e3e /core/fxcodec/lgif/cgifcontext.h
parent73bed4ef57444a2ea066d532a8a82b230fd206d9 (diff)
downloadpdfium-92827b695a69c7a3fd5940dc0aa1713fe3f3ee96.tar.xz
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 <rharrison@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'core/fxcodec/lgif/cgifcontext.h')
-rw-r--r--core/fxcodec/lgif/cgifcontext.h13
1 files changed, 13 insertions, 0 deletions
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<CCodec_GifModule> m_pModule;
UnownedPtr<CCodec_GifModule::Delegate> 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_