#include <SkSLIRHelpers.h>
|
| IRHelpers (const Context &c) |
|
std::unique_ptr< Expression > | Ref (const Variable *var) const |
|
std::unique_ptr< Expression > | Field (const Variable *var, int idx) const |
|
std::unique_ptr< Expression > | Swizzle (std::unique_ptr< Expression > base, ComponentArray c) const |
|
std::unique_ptr< Expression > | Index (std::unique_ptr< Expression > base, std::unique_ptr< Expression > idx) const |
|
std::unique_ptr< Expression > | Binary (std::unique_ptr< Expression > l, Operator op, std::unique_ptr< Expression > r) const |
|
std::unique_ptr< Expression > | Mul (std::unique_ptr< Expression > l, std::unique_ptr< Expression > r) const |
|
std::unique_ptr< Expression > | Add (std::unique_ptr< Expression > l, std::unique_ptr< Expression > r) const |
|
std::unique_ptr< Expression > | Float (float value) const |
|
std::unique_ptr< Expression > | Int (int value) const |
|
std::unique_ptr< Expression > | CtorXYZW (std::unique_ptr< Expression > xy, std::unique_ptr< Expression > z, std::unique_ptr< Expression > w) const |
|
std::unique_ptr< Statement > | Assign (std::unique_ptr< Expression > l, std::unique_ptr< Expression > r) const |
|
Definition at line 39 of file SkSLIRHelpers.h.
◆ IRHelpers()
SkSL::IRHelpers::IRHelpers |
( |
const Context & |
c | ) |
|
|
inline |
◆ Add()
Definition at line 78 of file SkSLIRHelpers.h.
79 {
81 }
std::unique_ptr< Expression > Binary(std::unique_ptr< Expression > l, Operator op, std::unique_ptr< Expression > r) const
◆ Assign()
Definition at line 102 of file SkSLIRHelpers.h.
103 {
107 }
SkAssertResult(font.textToGlyphs("Hello", 5, SkTextEncoding::kUTF8, glyphs, std::size(glyphs))==count)
static std::unique_ptr< Statement > Make(const Context &context, std::unique_ptr< Expression > expr)
bool UpdateVariableRefKind(Expression *expr, VariableRefKind kind, ErrorReporter *errors=nullptr)
◆ Binary()
Definition at line 66 of file SkSLIRHelpers.h.
68 {
69 Position
pos = l->fPosition.rangeThrough(r->fPosition);
71 }
static std::unique_ptr< Expression > Make(const Context &context, Position pos, std::unique_ptr< Expression > left, Operator op, std::unique_ptr< Expression > right)
◆ CtorXYZW()
Definition at line 91 of file SkSLIRHelpers.h.
93 {
95 args.push_back(std::move(xy));
96 args.push_back(std::move(z));
97 args.push_back(std::move(
w));
100 }
const std::unique_ptr< Type > fFloat4
static std::unique_ptr< Expression > Make(const Context &context, Position pos, const Type &type, ExpressionArray args)
const BuiltinTypes & fTypes
G_BEGIN_DECLS G_MODULE_EXPORT FlValue * args
◆ Field()
Definition at line 50 of file SkSLIRHelpers.h.
50 {
52 FieldAccess::OwnerKind::kAnonymousInterfaceBlock);
53 }
static std::unique_ptr< Expression > Make(const Context &context, Position pos, std::unique_ptr< Expression > base, int fieldIndex, OwnerKind ownerKind=OwnerKind::kDefault)
std::unique_ptr< Expression > Ref(const Variable *var) const
◆ Float()
std::unique_ptr< Expression > SkSL::IRHelpers::Float |
( |
float |
value | ) |
const |
|
inline |
Definition at line 83 of file SkSLIRHelpers.h.
83 {
85 }
const std::unique_ptr< Type > fFloat
static std::unique_ptr< Literal > MakeFloat(const Context &context, Position pos, float value)
◆ Index()
Definition at line 60 of file SkSLIRHelpers.h.
61 {
62 Position
pos =
base->fPosition.rangeThrough(idx->fPosition);
64 }
static std::unique_ptr< Expression > Make(const Context &context, Position pos, std::unique_ptr< Expression > base, std::unique_ptr< Expression > index)
◆ Int()
std::unique_ptr< Expression > SkSL::IRHelpers::Int |
( |
int |
value | ) |
const |
|
inline |
Definition at line 87 of file SkSLIRHelpers.h.
87 {
89 }
const std::unique_ptr< Type > fInt
static std::unique_ptr< Literal > MakeInt(const Context &context, Position pos, SKSL_INT value)
◆ LoadFloatBuffer()
Definition at line 109 of file SkSLIRHelpers.h.
112 {
114
115 const Symbol* floatBufferArraySymbol =
117 SkASSERT(floatBufferArraySymbol->is<FieldSymbol>());
118
119 const FieldSymbol& floatBufferArrayField = floatBufferArraySymbol->as<FieldSymbol>();
120 auto floatBufferArrayAccess = std::make_unique<FieldAccess>(
121 position,
122 std::make_unique<VariableReference>(
123 position,
124 &floatBufferArrayField.owner(),
126 ),
127 floatBufferArrayField.fieldIndex(),
129
131 context,
132 position,
133 std::move(floatBufferArrayAccess),
134 std::move(idx));
135 }
@ kAnonymousInterfaceBlock
const char * fFloatBufferArrayName
◆ Mul()
◆ Ref()
Definition at line 46 of file SkSLIRHelpers.h.
46 {
48 }
static std::unique_ptr< Expression > Make(Position pos, const Variable *variable, RefKind refKind=RefKind::kRead)
◆ Swizzle()
Definition at line 55 of file SkSLIRHelpers.h.
55 {
58 }
static std::unique_ptr< Expression > Make(const Context &context, Position pos, std::unique_ptr< Expression > expr, ComponentArray inComponents)
◆ fContext
const Context& SkSL::IRHelpers::fContext |
The documentation for this struct was generated from the following file: