Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
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
12
13#include <memory>
14
15namespace SkSL {
16
17/**
18 * Represents a top-level element (e.g. function or global variable) in a program.
19 */
20class ProgramElement : public IRNode {
21public:
23
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
33private:
34 using INHERITED = IRNode;
35};
36
37} // namespace SkSL
38
39#endif
SkPoint pos
#define SkASSERT(cond)
Definition SkAssert.h:116
Type::kYUV Type::kRGBA() int(0.7 *637)
ProgramElement(Position pos, Kind kind)
ProgramElementKind
Definition SkSLIRNode.h:19