Flutter Engine
The Flutter Engine
third_party
skia
src
sksl
ir
SkSLProgramElement.h
Go to the documentation of this file.
1
/*
2
* Copyright 2016 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
#ifndef SKSL_PROGRAMELEMENT
9
#define SKSL_PROGRAMELEMENT
10
11
#include "
src/sksl/ir/SkSLIRNode.h
"
12
13
#include <memory>
14
15
namespace
SkSL
{
16
17
/**
18
* Represents a top-level element (e.g. function or global variable) in a program.
19
*/
20
class
ProgramElement
:
public
IRNode
{
21
public
:
22
using
Kind
=
ProgramElementKind
;
23
24
ProgramElement
(
Position
pos
,
Kind
kind
)
25
:
INHERITED
(
pos
, (
int
)
kind
) {
26
SkASSERT
(
kind
>= Kind::kFirst &&
kind
<=
Kind::kLast
);
27
}
28
29
Kind
kind
()
const
{
30
return
(
Kind
)
fKind
;
31
}
32
33
private
:
34
using
INHERITED =
IRNode
;
35
};
36
37
}
// namespace SkSL
38
39
#endif
pos
SkPoint pos
Definition:
ImageShaderTest.cpp:27
SkASSERT
#define SkASSERT(cond)
Definition:
SkAssert.h:116
SkSLIRNode.h
SkSL::IRNode
Definition:
SkSLIRNode.h:98
SkSL::IRNode::IRNode
IRNode(const IRNode &)=delete
SkSL::IRNode::fKind
int fKind
Definition:
SkSLIRNode.h:149
SkSL::Position
Definition:
SkSLPosition.h:18
SkSL::ProgramElement
Definition:
SkSLProgramElement.h:20
SkSL::ProgramElement::kind
Kind kind() const
Definition:
SkSLProgramElement.h:29
SkSL::ProgramElement::ProgramElement
ProgramElement(Position pos, Kind kind)
Definition:
SkSLProgramElement.h:24
SkSL
Definition:
SkCapabilities.h:15
SkSL::ProgramElementKind
ProgramElementKind
Definition:
SkSLIRNode.h:19
SkSL::ProgramElementKind::kLast
@ kLast
tools.skpbench.skpbench.int
int
Definition:
skpbench.py:49
Generated on Sun Jun 23 2024 21:56:34 for Flutter Engine by
1.9.4