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
bmp_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/bmp/bmp_progressive_decoder.h"
8
9#include "core/fxcodec/bmp/bmp_decoder.h"
10#include "core/fxcodec/cfx_codec_memory.h"
11#include "third_party/base/check.h"
12
13namespace fxcodec {
14
15namespace {
16
17BmpProgressiveDecoder* g_bmp_decoder = nullptr;
18
19} // namespace
20
21// static
22void BmpProgressiveDecoder::InitializeGlobals() {
23 CHECK(!g_bmp_decoder);
24 g_bmp_decoder = new BmpProgressiveDecoder();
25}
26
27// static
28void BmpProgressiveDecoder::DestroyGlobals() {
29 delete g_bmp_decoder;
30 g_bmp_decoder = nullptr;
31}
32
33// static
34BmpProgressiveDecoder* BmpProgressiveDecoder::GetInstance() {
35 return g_bmp_decoder;
36}
37
38BmpProgressiveDecoder::BmpProgressiveDecoder() = default;
39
40BmpProgressiveDecoder::~BmpProgressiveDecoder() = default;
41
42FX_FILESIZE BmpProgressiveDecoder::GetAvailInput(Context* context) const {
43 return BmpDecoder::GetAvailInput(context);
44}
45
46bool BmpProgressiveDecoder::Input(Context* context,
47 RetainPtr<CFX_CodecMemory> codec_memory) {
48 return BmpDecoder::Input(context, codec_memory);
49}
50
51} // namespace fxcodec
static bool Input(ProgressiveDecoderIface::Context *pContext, RetainPtr< CFX_CodecMemory > codec_memory)
static FX_FILESIZE GetAvailInput(ProgressiveDecoderIface::Context *pContext)
FX_FILESIZE GetAvailInput(Context *context) const override
static BmpProgressiveDecoder * GetInstance()
bool Input(Context *context, RetainPtr< CFX_CodecMemory > codec_memory) override
#define FX_FILESIZE
Definition fx_types.h:19
#define CHECK(cvref)