Flutter Engine
The Flutter Engine
third_party
skia
include
codec
SkWbmpDecoder.h
Go to the documentation of this file.
1
/*
2
* Copyright 2023 Google LLC
3
*
4
* Use of this source code is governed by a BSD-style license that can be
5
* found in the LICENSE file.
6
*/
7
#ifndef SkWbmpDecoder_DEFINED
8
#define SkWbmpDecoder_DEFINED
9
10
#include "
include/codec/SkCodec.h
"
11
#include "
include/core/SkRefCnt.h
"
12
#include "
include/private/base/SkAPI.h
"
13
14
class
SkData
;
15
class
SkStream
;
16
17
#include <memory>
18
19
namespace
SkWbmpDecoder
{
20
21
/** Returns true if this data claims to be a WBMP image. */
22
SK_API
bool
IsWbmp
(
const
void
*,
size_t
);
23
24
/**
25
* Attempts to decode the given bytes as a WBMP.
26
*
27
* If the bytes are not a WBMP, returns nullptr.
28
*
29
* DecodeContext is ignored
30
*/
31
SK_API
std::unique_ptr<SkCodec>
Decode
(std::unique_ptr<SkStream>,
32
SkCodec::Result
*,
33
SkCodecs::DecodeContext
=
nullptr
);
34
SK_API
std::unique_ptr<SkCodec>
Decode
(
sk_sp<SkData>
,
35
SkCodec::Result
*,
36
SkCodecs::DecodeContext
=
nullptr
);
37
38
inline
constexpr
SkCodecs::Decoder
Decoder
() {
39
return
{
"wbmp"
,
IsWbmp
,
Decode
};
40
}
41
42
}
// namespace SkWbmpDecoder
43
44
#endif
// SkWbmpDecoder_DEFINED
SkAPI.h
SK_API
#define SK_API
Definition:
SkAPI.h:35
SkCodec.h
SkRefCnt.h
SkCodec::Result
Result
Definition:
SkCodec.h:76
SkData
Definition:
SkData.h:25
SkStream
Definition:
SkStream.h:29
sk_sp< SkData >
SkCodecs::DecodeContext
void * DecodeContext
Definition:
SkCodec.h:1047
SkWbmpDecoder
Definition:
SkWbmpDecoder.h:19
SkWbmpDecoder::IsWbmp
SK_API bool IsWbmp(const void *, size_t)
Definition:
SkWbmpCodec.cpp:212
SkWbmpDecoder::Decode
SK_API std::unique_ptr< SkCodec > Decode(std::unique_ptr< SkStream >, SkCodec::Result *, SkCodecs::DecodeContext=nullptr)
Definition:
SkWbmpCodec.cpp:216
SkWbmpDecoder::Decoder
constexpr SkCodecs::Decoder Decoder()
Definition:
SkWbmpDecoder.h:38
SkCodecs::Decoder
Definition:
SkCodec.h:1053
Generated on Sun Jun 23 2024 21:56:02 for Flutter Engine by
1.9.4