Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
gif_progressive_decoder.cpp
Go to the documentation of this file.
1// Copyright 2020 The PDFium Authors
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6
7#include "core/fxcodec/gif/gif_progressive_decoder.h"
8
9#include "core/fxcodec/cfx_codec_memory.h"
10#include "core/fxcodec/gif/gif_decoder.h"
11#include "third_party/base/check.h"
12
13namespace fxcodec {
14
15namespace {
16
17GifProgressiveDecoder* g_gif_decoder = nullptr;
18
19} // namespace
20
21// static
22void GifProgressiveDecoder::InitializeGlobals() {
23 CHECK(!g_gif_decoder);
24 g_gif_decoder = new GifProgressiveDecoder();
25}
26
27// static
28void GifProgressiveDecoder::DestroyGlobals() {
29 delete g_gif_decoder;
30 g_gif_decoder = nullptr;
31}
32
33// static
34GifProgressiveDecoder* GifProgressiveDecoder::GetInstance() {
35 return g_gif_decoder;
36}
37
38GifProgressiveDecoder::GifProgressiveDecoder() = default;
39
40GifProgressiveDecoder::~GifProgressiveDecoder() = default;
41
42FX_FILESIZE GifProgressiveDecoder::GetAvailInput(Context* context) const {
43 return GifDecoder::GetAvailInput(context);
44}
45
46bool GifProgressiveDecoder::Input(Context* context,
47 RetainPtr<CFX_CodecMemory> codec_memory) {
48 return GifDecoder::Input(context, codec_memory);
49}
50
51} // namespace fxcodec
static FX_FILESIZE GetAvailInput(ProgressiveDecoderIface::Context *context)
static bool Input(ProgressiveDecoderIface::Context *context, RetainPtr< CFX_CodecMemory > codec_memory)
bool Input(Context *context, RetainPtr< CFX_CodecMemory > codec_memory) override
FX_FILESIZE GetAvailInput(Context *context) const override
static GifProgressiveDecoder * GetInstance()
#define FX_FILESIZE
Definition fx_types.h:19
#define CHECK(cvref)