Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
third_party
skia
src
gpu
graphite
FactoryFunctionsPriv.h
Go to the documentation of this file.
1
/*
2
* Copyright 2024 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 skgpu_graphite_FactoryFunctionsPriv_DEFINED
9
#define skgpu_graphite_FactoryFunctionsPriv_DEFINED
10
11
#include "
src/base/SkEnumBitMask.h
"
12
#include "
src/gpu/graphite/FactoryFunctions.h
"
13
14
namespace
skgpu::graphite
{
15
16
class
PrecompileShader;
17
18
enum class
PrecompileImageShaderFlags
{
19
kNone
= 0b00,
20
kExcludeAlpha
= 0b01,
21
kExcludeCubic
= 0b10
22
};
23
SK_MAKE_BITMASK_OPS
(
PrecompileImageShaderFlags
)
24
25
//--------------------------------------------------------------------------------------------------
26
namespace PrecompileShadersPriv {
27
sk_sp<PrecompileShader>
Blur
(
sk_sp<PrecompileShader>
child);
28
29
// TODO: This, technically, doesn't need to take an SkSpan since it is only called from
30
// PrecompileShader::makeWithCTM. Leaving it be for now in case the usage is revised.
31
sk_sp<PrecompileShader>
CTM
(
SkSpan
<
const
sk_sp<PrecompileShader>
>
wrapped
);
32
33
sk_sp<PrecompileShader>
Image
(
SkEnumBitMask<PrecompileImageShaderFlags>
);
34
35
// These factory variants should be used when the existence or non-existence of the local matrix
36
// is known. If 'withLM' is true only the LMShader-wrapped shader will be created while, when
37
// 'withLM' is false, no LMShader will wrap the base shader.
38
sk_sp<PrecompileShader>
LinearGradient(
bool
withLM);
39
sk_sp<PrecompileShader>
RadialGradient(
bool
withLM);
40
sk_sp<PrecompileShader>
TwoPointConicalGradient(
bool
withLM);
41
sk_sp<PrecompileShader>
SweepGradient(
bool
withLM);
42
sk_sp<PrecompileShader>
Picture(
bool
withLM);
43
44
// TODO: this factory function should go away (c.f. b/336810091)
45
sk_sp<PrecompileShader>
LocalMatrixBothVariants
(
SkSpan
<
const
sk_sp<PrecompileShader>
>
wrapped
);
46
47
}
// namespace PrecompileShadersPriv
48
49
namespace
PrecompileColorFiltersPriv {
50
// These three match those in src/core/SkColorFilterPriv
51
sk_sp<PrecompileColorFilter>
Gaussian
();
52
53
sk_sp<PrecompileColorFilter>
ColorSpaceXform
();
54
55
sk_sp<PrecompileColorFilter>
WithWorkingFormat
(
56
SkSpan
<
const
sk_sp<PrecompileColorFilter>
> childOptions);
57
58
}
// namespace PrecompileColorFiltersPriv
59
60
}
// namespace skgpu::graphite
61
62
#endif
// skgpu_graphite_FactoryFunctionsPriv_DEFINED
FactoryFunctions.h
SkEnumBitMask.h
SK_MAKE_BITMASK_OPS
#define SK_MAKE_BITMASK_OPS(E)
Definition
SkEnumBitMask.h:68
wrapped
static sk_sp< GrTextureProxy > wrapped(skiatest::Reporter *reporter, GrRecordingContext *rContext, GrProxyProvider *proxyProvider, SkBackingFit fit)
Definition
TextureProxyTest.cpp:112
SkEnumBitMask
Definition
SkEnumBitMask.h:34
SkSpan
Definition
SkSpan_impl.h:65
sk_sp
Definition
SkRefCnt.h:220
skgpu::graphite::Image
Definition
Image_Graphite.h:25
skgpu::graphite::PrecompileColorFiltersPriv::WithWorkingFormat
sk_sp< PrecompileColorFilter > WithWorkingFormat(SkSpan< const sk_sp< PrecompileColorFilter > > childOptions)
Definition
FactoryFunctions.cpp:1294
skgpu::graphite::PrecompileColorFiltersPriv::Gaussian
sk_sp< PrecompileColorFilter > Gaussian()
Definition
FactoryFunctions.cpp:1157
skgpu::graphite::PrecompileColorFiltersPriv::ColorSpaceXform
sk_sp< PrecompileColorFilter > ColorSpaceXform()
Definition
FactoryFunctions.cpp:1054
skgpu::graphite::PrecompileShadersPriv::CTM
sk_sp< PrecompileShader > CTM(SkSpan< const sk_sp< PrecompileShader > > wrapped)
Definition
FactoryFunctions.cpp:928
skgpu::graphite::PrecompileShadersPriv::LocalMatrixBothVariants
sk_sp< PrecompileShader > LocalMatrixBothVariants(SkSpan< const sk_sp< PrecompileShader > > wrapped)
Definition
FactoryFunctions.cpp:762
skgpu::graphite::PrecompileShadersPriv::Blur
sk_sp< PrecompileShader > Blur(sk_sp< PrecompileShader > child)
Definition
FactoryFunctions.cpp:981
skgpu::graphite
Definition
BoundsManagerBench.cpp:27
skgpu::graphite::PrecompileImageShaderFlags
PrecompileImageShaderFlags
Definition
FactoryFunctionsPriv.h:18
skgpu::graphite::PrecompileImageShaderFlags::kExcludeAlpha
@ kExcludeAlpha
skgpu::graphite::PrecompileImageShaderFlags::kExcludeCubic
@ kExcludeCubic
skgpu::graphite::kNone
@ kNone
Definition
GraphiteTypes.h:112
Generated on Fri Apr 26 2024 06:17:17 for Flutter Engine by
1.9.8