Flutter Engine
The Flutter Engine
third_party
skia
include
gpu
graphite
precompile
PrecompileBlender.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_PrecompileBlender_DEFINED
9
#define skgpu_graphite_precompile_PrecompileBlender_DEFINED
10
11
#include "
include/core/SkBlendMode.h
"
12
#include "
include/gpu/graphite/precompile/PrecompileBase.h
"
13
14
#include <optional>
15
16
namespace
skgpu::graphite
{
17
18
class
PrecompileBlenderPriv;
19
20
/** \class PrecompileBlender
21
This class corresponds to the SkBlender class in the main API.
22
*/
23
class
SK_API
PrecompileBlender
:
public
PrecompileBase
{
24
public
:
25
// Provides access to functions that aren't part of the public API.
26
PrecompileBlenderPriv
priv
();
27
const
PrecompileBlenderPriv
priv
()
const
;
// NOLINT(readability-const-return-type)
28
29
protected
:
30
friend
class
PrecompileBlenderPriv
;
31
32
virtual
std::optional<SkBlendMode>
asBlendMode
()
const
{
return
{}; }
33
34
PrecompileBlender
() :
PrecompileBase
(
Type
::kBlender) {}
35
~PrecompileBlender
()
override
;
36
};
37
38
//--------------------------------------------------------------------------------------------------
39
// This is the Precompile correlate to the SkBlenders namespace in the main API
40
namespace
PrecompileBlenders {
41
42
// This factory creates a Precompilation object that represents the Arithmetic SkBlender from
43
// the main API. Note that the actual Arithmetic parameters (i.e., k1, k2, k3 and k4) are
44
// abstracted away since they do not impact the generated shader.
45
SK_API
sk_sp<PrecompileBlender>
Arithmetic
();
46
47
// This is the Precompilation correlate to the SkBlender::Mode factory in the main API. It
48
// creates an object that represents SkBlendMode-based blending.
49
SK_API
sk_sp<PrecompileBlender>
Mode
(
SkBlendMode
);
50
51
}
// namespace PrecompileBlenders
52
53
54
}
// namespace skgpu::graphite
55
56
#endif
// skgpu_graphite_precompile_PrecompileBlender_DEFINED
PrecompileBase.h
SK_API
#define SK_API
Definition:
SkAPI.h:35
SkBlendMode.h
SkBlendMode
SkBlendMode
Definition:
SkBlendMode.h:38
sk_sp
Definition:
SkRefCnt.h:220
skgpu::graphite::PrecompileBase
Definition:
PrecompileBase.h:24
skgpu::graphite::PrecompileBlenderPriv
Definition:
PrecompileBlenderPriv.h:18
skgpu::graphite::PrecompileBlender
Definition:
PrecompileBlender.h:23
skgpu::graphite::PrecompileBlender::asBlendMode
virtual std::optional< SkBlendMode > asBlendMode() const
Definition:
PrecompileBlender.h:32
skgpu::graphite::PrecompileBlender::~PrecompileBlender
~PrecompileBlender() override
skgpu::graphite::PrecompileBlender::PrecompileBlender
PrecompileBlender()
Definition:
PrecompileBlender.h:34
priv
FlPixelBufferTexturePrivate * priv
Definition:
fl_pixel_buffer_texture.cc:30
Type
Definition:
asyncrescaleandread.cpp:530
skgpu::graphite::PrecompileBlenders::Arithmetic
SK_API sk_sp< PrecompileBlender > Arithmetic()
Definition:
PrecompileBlender.cpp:44
skgpu::graphite::PrecompileBlenders::Mode
SK_API sk_sp< PrecompileBlender > Mode(SkBlendMode)
Definition:
PrecompileBlender.cpp:39
skgpu::graphite
Definition:
BoundsManagerBench.cpp:27
Generated on Sun Jun 23 2024 21:56:02 for Flutter Engine by
1.9.4