Flutter Engine
The Flutter Engine
PrecompileShadersPriv.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_precompile_PrecompileShadersPriv_DEFINED
9#define skgpu_graphite_precompile_PrecompileShadersPriv_DEFINED
10
13
14namespace skgpu::graphite {
15
16class PrecompileShader;
17
19 kNone = 0b00,
20 kExcludeAlpha = 0b01,
21 kExcludeCubic = 0b10
22};
24
25//--------------------------------------------------------------------------------------------------
26namespace PrecompileShadersPriv {
27 // -- The first 6 factories are used to implement ImageFilters
29
32
34
36
38
40
41 // TODO: This, technically, doesn't need to take an SkSpan since it is only called from
42 // PaintOptions::setClipShaders with a single PrecompileShader. Leaving it be for now in case
43 // the usage is revised.
45
46 // The remaining factories are special cases used to reduce the combinatorics of the
47 // precompilation system.
49
51
52 // This factory variant should be used when the existence or non-existence of the local matrix
53 // is known. If 'withLM' is true only the LMShader-wrapped shader will be created while, when
54 // 'withLM' is false, no LMShader will wrap the base shader.
56
57 // TODO: this factory function should go away (it is only used by the PrecompileShaders::Picture
58 // entry point now).
60
61} // namespace PrecompileShadersPriv
62
63} // namespace skgpu::graphite
64
65#endif // skgpu_graphite_precompile_PrecompileShadersPriv_DEFINED
static sk_sp< GrTextureProxy > wrapped(skiatest::Reporter *reporter, GrRecordingContext *rContext, GrProxyProvider *proxyProvider, SkBackingFit fit)
DlColor color
sk_sp< PrecompileShader > Lighting(sk_sp< PrecompileShader > wrapped)
sk_sp< PrecompileShader > Image(SkEnumBitMask< PrecompileImageShaderFlags >)
sk_sp< PrecompileShader > CTM(SkSpan< const sk_sp< PrecompileShader > > wrapped)
sk_sp< PrecompileShader > LocalMatrixBothVariants(SkSpan< const sk_sp< PrecompileShader > > wrapped)
sk_sp< PrecompileShader > Displacement(sk_sp< PrecompileShader > displacement, sk_sp< PrecompileShader > color)
sk_sp< PrecompileShader > LinearMorphology(sk_sp< PrecompileShader > wrapped)
sk_sp< PrecompileShader > Picture(bool withLM)
sk_sp< PrecompileShader > RawImage(SkEnumBitMask< PrecompileImageShaderFlags >)
sk_sp< PrecompileShader > MatrixConvolution(sk_sp< PrecompileShader > wrapped)
sk_sp< PrecompileShader > SparseMorphology(sk_sp< PrecompileShader > wrapped)
sk_sp< PrecompileShader > Blur(sk_sp< PrecompileShader > wrapped)
SK_MAKE_BITMASK_OPS(DawnErrorType)