Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
third_party
skia
src
sksl
ir
SkSLVariableReference.cpp
Go to the documentation of this file.
1
/*
2
* Copyright 2018 Google Inc.
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
#include "
src/sksl/ir/SkSLVariableReference.h
"
9
10
#include "
src/sksl/ir/SkSLVariable.h
"
11
12
namespace
SkSL
{
13
14
VariableReference::VariableReference
(
Position
pos
,
const
Variable
* variable,
RefKind
refKind)
15
:
INHERITED
(
pos
, kIRNodeKind, &variable->
type
())
16
, fVariable(variable)
17
, fRefKind(refKind) {
18
SkASSERT
(this->
variable
());
19
}
20
21
std::string
VariableReference::description
(
OperatorPrecedence
)
const
{
22
return
std::string(this->
variable
()->
name
());
23
}
24
25
void
VariableReference::setRefKind
(
RefKind
refKind) {
26
fRefKind =
refKind
;
27
}
28
29
void
VariableReference::setVariable
(
const
Variable
* variable) {
30
fVariable =
variable
;
31
}
32
33
}
// namespace SkSL
pos
SkPoint pos
Definition
ImageShaderTest.cpp:27
SkASSERT
#define SkASSERT(cond)
Definition
SkAssert.h:116
SkSLVariableReference.h
SkSLVariable.h
SkSL::Expression
Definition
SkSLExpression.h:30
SkSL::Expression::description
std::string description() const final
Definition
SkSLExpression.cpp:17
SkSL::Position
Definition
SkSLPosition.h:18
SkSL::VariableReference::variable
const Variable * variable() const
Definition
SkSLVariableReference.h:61
SkSL::VariableReference::setRefKind
void setRefKind(RefKind refKind)
Definition
SkSLVariableReference.cpp:25
SkSL::VariableReference::setVariable
void setVariable(const Variable *variable)
Definition
SkSLVariableReference.cpp:29
SkSL::VariableReference::refKind
RefKind refKind() const
Definition
SkSLVariableReference.h:65
SkSL::VariableReference::VariableReference
VariableReference(Position pos, const Variable *variable, RefKind refKind)
Definition
SkSLVariableReference.cpp:14
SkSL::Variable
Definition
SkSLVariable.h:48
type
uint8_t type
Definition
fl_standard_message_codec_test.cc:1115
name
const char * name
Definition
fuchsia.cc:50
SkSL
Definition
SkCapabilities.h:15
SkSL::VariableRefKind
VariableRefKind
Definition
SkSLVariableReference.h:25
SkSL::OperatorPrecedence
OperatorPrecedence
Definition
SkSLOperator.h:57
Generated on Fri Apr 26 2024 06:17:33 for Flutter Engine by
1.9.8