Flutter Engine
The Flutter Engine
third_party
skia
src
image
SkImageGeneratorPriv.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
8
#ifndef SkImageGeneratorPriv_DEFINED
9
#define SkImageGeneratorPriv_DEFINED
10
11
#include "
include/core/SkRefCnt.h
"
// IWYU pragma: keep
12
13
#include <memory>
14
#include <optional>
15
16
class
SkColorSpace
;
17
class
SkData
;
18
class
SkImageGenerator
;
19
class
SkMatrix
;
20
class
SkPaint
;
21
class
SkPicture
;
22
class
SkSurfaceProps
;
23
enum
SkAlphaType
:
int
;
24
namespace
SkImages
{
enum class
BitDepth
; }
25
struct
SkISize
;
26
27
namespace
SkImageGenerators
{
28
/** Return a new image generator backed by the specified picture. If the size is empty or
29
* the picture is NULL, this returns NULL.
30
* The optional matrix and paint arguments are passed to drawPicture() at rasterization
31
* time.
32
*/
33
std::unique_ptr<SkImageGenerator>
MakeFromPicture
(
const
SkISize
&,
34
sk_sp<SkPicture>
,
35
const
SkMatrix
*,
36
const
SkPaint
*,
37
SkImages::BitDepth
,
38
sk_sp<SkColorSpace>
,
39
SkSurfaceProps
props);
40
41
std::unique_ptr<SkImageGenerator>
MakeFromPicture
(
const
SkISize
&,
42
sk_sp<SkPicture>
,
43
const
SkMatrix
*,
44
const
SkPaint
*,
45
SkImages::BitDepth
,
46
sk_sp<SkColorSpace>
);
47
48
/**
49
* If the default image decoder system can interpret the specified (encoded) data, then
50
* this returns a new ImageGenerator for it. Otherwise this returns NULL. Either way
51
* the caller is still responsible for managing their ownership of the data.
52
* By default, images will be converted to premultiplied pixels. The alpha type can be
53
* overridden by specifying kPremul_SkAlphaType or kUnpremul_SkAlphaType. Specifying
54
* kOpaque_SkAlphaType is not supported, and will return NULL.
55
*/
56
std::unique_ptr<SkImageGenerator>
MakeFromEncoded
(
sk_sp<SkData>
,
57
std::optional<SkAlphaType> = std::nullopt);
58
}
59
60
#endif
SkAlphaType
SkAlphaType
Definition:
SkAlphaType.h:26
SkRefCnt.h
SkColorSpace
Definition:
SkColorSpace.h:107
SkData
Definition:
SkData.h:25
SkImageGenerator
Definition:
SkImageGenerator.h:28
SkMatrix
Definition:
SkMatrix.h:54
SkPaint
Definition:
SkPaint.h:44
SkPicture
Definition:
SkPicture.h:44
SkSurfaceProps
Definition:
SkSurfaceProps.h:53
sk_sp< SkPicture >
SkImageGenerators
Definition:
SkImageGenerator_FromEncoded.cpp:33
SkImageGenerators::MakeFromPicture
std::unique_ptr< SkImageGenerator > MakeFromPicture(const SkISize &, sk_sp< SkPicture >, const SkMatrix *, const SkPaint *, SkImages::BitDepth, sk_sp< SkColorSpace >, SkSurfaceProps props)
Definition:
SkPictureImageGenerator.cpp:38
SkImageGenerators::MakeFromEncoded
std::unique_ptr< SkImageGenerator > MakeFromEncoded(sk_sp< SkData > data, std::optional< SkAlphaType > at)
Definition:
SkImageGenerator_FromEncoded.cpp:35
SkImages
Definition:
SkImageAndroid.h:20
SkImages::BitDepth
BitDepth
Definition:
SkImage.h:125
tools.skpbench.skpbench.int
int
Definition:
skpbench.py:49
SkISize
Definition:
SkSize.h:16
Generated on Sun Jun 23 2024 21:56:29 for Flutter Engine by
1.9.4