Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
third_party
skia
src
sksl
transform
SkSLProgramWriter.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
8
#ifndef SkSLProgramWriter_DEFINED
9
#define SkSLProgramWriter_DEFINED
10
11
#include "
src/sksl/analysis/SkSLProgramVisitor.h
"
12
13
namespace
SkSL
{
14
15
struct
ProgramWriterTypes
{
16
using
Program
=
SkSL::Program
;
17
using
Expression
=
SkSL::Expression
;
18
using
Statement
=
SkSL::Statement
;
19
using
ProgramElement
=
SkSL::ProgramElement
;
20
using
UniquePtrExpression
= std::unique_ptr<SkSL::Expression>;
21
using
UniquePtrStatement
= std::unique_ptr<SkSL::Statement>;
22
};
23
24
extern
template
class
TProgramVisitor<ProgramWriterTypes>
;
25
26
class
ProgramWriter
:
public
TProgramVisitor<ProgramWriterTypes>
{
27
public
:
28
// Subclass these methods if you want access to the unique_ptrs of IRNodes in a program.
29
// This will allow statements or expressions to be replaced during a visit.
30
bool
visitExpressionPtr
(std::unique_ptr<Expression>& e)
override
{
31
return
this->visitExpression(*e);
32
}
33
bool
visitStatementPtr
(std::unique_ptr<Statement>&
s
)
override
{
34
return
this->visitStatement(*
s
);
35
}
36
};
37
38
}
// namespace SkSL
39
40
#endif
SkSLProgramVisitor.h
SkSL::Expression
Definition
SkSLExpression.h:30
SkSL::ProgramElement
Definition
SkSLProgramElement.h:20
SkSL::ProgramWriter
Definition
SkSLProgramWriter.h:26
SkSL::ProgramWriter::visitExpressionPtr
bool visitExpressionPtr(std::unique_ptr< Expression > &e) override
Definition
SkSLProgramWriter.h:30
SkSL::ProgramWriter::visitStatementPtr
bool visitStatementPtr(std::unique_ptr< Statement > &s) override
Definition
SkSLProgramWriter.h:33
SkSL::Statement
Definition
SkSLStatement.h:19
SkSL::TProgramVisitor
Definition
SkSLProgramVisitor.h:35
s
struct MyStruct s
SkSL
Definition
SkCapabilities.h:15
SkSL::ProgramWriterTypes
Definition
SkSLProgramWriter.h:15
SkSL::ProgramWriterTypes::UniquePtrExpression
std::unique_ptr< SkSL::Expression > UniquePtrExpression
Definition
SkSLProgramWriter.h:20
SkSL::ProgramWriterTypes::UniquePtrStatement
std::unique_ptr< SkSL::Statement > UniquePtrStatement
Definition
SkSLProgramWriter.h:21
SkSL::Program
Definition
SkSLProgram.h:65
Generated on Fri Apr 26 2024 06:17:34 for Flutter Engine by
1.9.8