Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
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
13
14namespace skgpu::graphite {
15
16class PrecompileShader;
17
19 kNone = 0b00,
20 kExcludeAlpha = 0b01,
21 kExcludeCubic = 0b10
22};
24
25//--------------------------------------------------------------------------------------------------
26namespace PrecompileShadersPriv {
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.
32
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)
46
47} // namespace PrecompileShadersPriv
48
49namespace PrecompileColorFiltersPriv {
50 // These three match those in src/core/SkColorFilterPriv
52
54
56 SkSpan<const sk_sp<PrecompileColorFilter>> childOptions);
57
58} // namespace PrecompileColorFiltersPriv
59
60} // namespace skgpu::graphite
61
62#endif // skgpu_graphite_FactoryFunctionsPriv_DEFINED
#define SK_MAKE_BITMASK_OPS(E)
static sk_sp< GrTextureProxy > wrapped(skiatest::Reporter *reporter, GrRecordingContext *rContext, GrProxyProvider *proxyProvider, SkBackingFit fit)
sk_sp< PrecompileColorFilter > WithWorkingFormat(SkSpan< const sk_sp< PrecompileColorFilter > > childOptions)
sk_sp< PrecompileColorFilter > Gaussian()
sk_sp< PrecompileColorFilter > ColorSpaceXform()
sk_sp< PrecompileShader > CTM(SkSpan< const sk_sp< PrecompileShader > > wrapped)
sk_sp< PrecompileShader > LocalMatrixBothVariants(SkSpan< const sk_sp< PrecompileShader > > wrapped)
sk_sp< PrecompileShader > Blur(sk_sp< PrecompileShader > child)