Flutter Engine
The Flutter Engine
third_party
skia
src
sksl
ir
SkSLPoison.h
Go to the documentation of this file.
1
/*
2
* Copyright 2021 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
#ifndef SkSLPoison_DEFINED
8
#define SkSLPoison_DEFINED
9
10
#include "
src/sksl/SkSLBuiltinTypes.h
"
11
#include "
src/sksl/SkSLCompiler.h
"
12
#include "
src/sksl/SkSLContext.h
"
13
#include "
src/sksl/ir/SkSLExpression.h
"
14
15
namespace
SkSL
{
16
17
class
Poison
:
public
Expression
{
18
public
:
19
inline
static
constexpr
Kind
kIRNodeKind
= Kind::kPoison;
20
21
static
std::unique_ptr<Expression>
Make
(
Position
pos
,
const
Context
& context) {
22
return
std::make_unique<Poison>(
pos
, context.
fTypes
.
fPoison
.get());
23
}
24
25
Poison
(
Position
pos
,
const
Type
*
type
)
26
:
INHERITED
(
pos
,
kIRNodeKind
,
type
) {}
27
28
std::unique_ptr<Expression>
clone
(
Position
pos
)
const override
{
29
return
std::make_unique<Poison>(
pos
, &this->
type
());
30
}
31
32
std::string
description
(
OperatorPrecedence
)
const override
{
33
return
Compiler::POISON_TAG
;
34
}
35
36
private
:
37
using
INHERITED =
Expression
;
38
};
39
40
}
// namespace SkSL
41
42
#endif
// SkSLPoison_DEFINED
pos
SkPoint pos
Definition:
ImageShaderTest.cpp:27
SkSLBuiltinTypes.h
SkSLCompiler.h
SkSLContext.h
SkSLExpression.h
SkSL::BuiltinTypes::fPoison
const std::unique_ptr< Type > fPoison
Definition:
SkSLBuiltinTypes.h:60
SkSL::Compiler::POISON_TAG
static constexpr const char POISON_TAG[]
Definition:
SkSLCompiler.h:74
SkSL::Context
Definition:
SkSLContext.h:24
SkSL::Context::fTypes
const BuiltinTypes & fTypes
Definition:
SkSLContext.h:30
SkSL::Expression
Definition:
SkSLExpression.h:30
SkSL::Expression::Expression
Expression(Position pos, Kind kind, const Type *type)
Definition:
SkSLExpression.h:34
SkSL::Expression::type
const Type & type() const
Definition:
SkSLExpression.h:44
SkSL::IRNode
Definition:
SkSLIRNode.h:98
SkSL::Poison
Definition:
SkSLPoison.h:17
SkSL::Poison::Make
static std::unique_ptr< Expression > Make(Position pos, const Context &context)
Definition:
SkSLPoison.h:21
SkSL::Poison::Poison
Poison(Position pos, const Type *type)
Definition:
SkSLPoison.h:25
SkSL::Poison::description
std::string description(OperatorPrecedence) const override
Definition:
SkSLPoison.h:32
SkSL::Poison::kIRNodeKind
static constexpr Kind kIRNodeKind
Definition:
SkSLPoison.h:19
SkSL::Poison::clone
std::unique_ptr< Expression > clone(Position pos) const override
Definition:
SkSLPoison.h:28
SkSL::Position
Definition:
SkSLPosition.h:18
SkSL
Definition:
SkCapabilities.h:15
SkSL::OperatorPrecedence
OperatorPrecedence
Definition:
SkSLOperator.h:57
SkSL::ExpressionKind
ExpressionKind
Definition:
SkSLIRNode.h:62
Type
Definition:
asyncrescaleandread.cpp:530
Generated on Sun Jun 23 2024 21:56:34 for Flutter Engine by
1.9.4