diff options
author | Ryan Harrison <rharrison@chromium.org> | 2017-09-22 11:05:13 -0400 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2017-09-22 15:13:06 +0000 |
commit | 92827b695a69c7a3fd5940dc0aa1713fe3f3ee96 (patch) | |
tree | 1698c9f11f3709683cd4eea615b9a4d970409e3e /core/fxcodec/codec | |
parent | 73bed4ef57444a2ea066d532a8a82b230fd206d9 (diff) | |
download | pdfium-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/codec')
-rw-r--r-- | core/fxcodec/codec/ccodec_gifmodule.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/core/fxcodec/codec/ccodec_gifmodule.cpp b/core/fxcodec/codec/ccodec_gifmodule.cpp index 911323c3a1..b7e55d5208 100644 --- a/core/fxcodec/codec/ccodec_gifmodule.cpp +++ b/core/fxcodec/codec/ccodec_gifmodule.cpp @@ -30,7 +30,7 @@ GifDecodeStatus CCodec_GifModule::ReadHeader(Context* pContext, int* bg_index, CFX_DIBAttribute* pAttribute) { auto* context = static_cast<CGifContext*>(pContext); - GifDecodeStatus ret = gif_read_header(context); + GifDecodeStatus ret = context->ReadHeader(); if (ret != GifDecodeStatus::Success) return ret; @@ -46,11 +46,11 @@ GifDecodeStatus CCodec_GifModule::ReadHeader(Context* pContext, GifDecodeStatus CCodec_GifModule::LoadFrameInfo(Context* pContext, int* frame_num) { auto* context = static_cast<CGifContext*>(pContext); - GifDecodeStatus ret = gif_get_frame(context); + GifDecodeStatus ret = context->GetFrame(); if (ret != GifDecodeStatus::Success) return ret; - *frame_num = gif_get_frame_num(context); + *frame_num = context->GetFrameNum(); return GifDecodeStatus::Success; } @@ -58,7 +58,7 @@ GifDecodeStatus CCodec_GifModule::LoadFrame(Context* pContext, int frame_num, CFX_DIBAttribute* pAttribute) { auto* context = static_cast<CGifContext*>(pContext); - GifDecodeStatus ret = gif_load_frame(context, frame_num); + GifDecodeStatus ret = context->LoadFrame(frame_num); if (ret != GifDecodeStatus::Success || !pAttribute) return ret; @@ -81,12 +81,12 @@ GifDecodeStatus CCodec_GifModule::LoadFrame(Context* pContext, uint32_t CCodec_GifModule::GetAvailInput(Context* pContext, uint8_t** avail_buf_ptr) { auto* context = static_cast<CGifContext*>(pContext); - return gif_get_avail_input(context, avail_buf_ptr); + return context->GetAvailInput(avail_buf_ptr); } void CCodec_GifModule::Input(Context* pContext, const uint8_t* src_buf, uint32_t src_size) { auto* context = static_cast<CGifContext*>(pContext); - gif_input_buffer(context, (uint8_t*)src_buf, src_size); + context->SetInputBuffer((uint8_t*)src_buf, src_size); } |