Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
SkSLBuiltinTypes.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 SKSL_BUILTIN_TYPES
9#define SKSL_BUILTIN_TYPES
10
11#include <memory>
12
14
15namespace SkSL {
16
17/**
18 * Contains the built-in, core types for SkSL.
19 */
21public:
23
24 const std::unique_ptr<Type> fFloat;
25 const std::unique_ptr<Type> fFloat2;
26 const std::unique_ptr<Type> fFloat3;
27 const std::unique_ptr<Type> fFloat4;
28
29 const std::unique_ptr<Type> fHalf;
30 const std::unique_ptr<Type> fHalf2;
31 const std::unique_ptr<Type> fHalf3;
32 const std::unique_ptr<Type> fHalf4;
33
34 const std::unique_ptr<Type> fInt;
35 const std::unique_ptr<Type> fInt2;
36 const std::unique_ptr<Type> fInt3;
37 const std::unique_ptr<Type> fInt4;
38
39 const std::unique_ptr<Type> fUInt;
40 const std::unique_ptr<Type> fUInt2;
41 const std::unique_ptr<Type> fUInt3;
42 const std::unique_ptr<Type> fUInt4;
43
44 const std::unique_ptr<Type> fShort;
45 const std::unique_ptr<Type> fShort2;
46 const std::unique_ptr<Type> fShort3;
47 const std::unique_ptr<Type> fShort4;
48
49 const std::unique_ptr<Type> fUShort;
50 const std::unique_ptr<Type> fUShort2;
51 const std::unique_ptr<Type> fUShort3;
52 const std::unique_ptr<Type> fUShort4;
53
54 const std::unique_ptr<Type> fBool;
55 const std::unique_ptr<Type> fBool2;
56 const std::unique_ptr<Type> fBool3;
57 const std::unique_ptr<Type> fBool4;
58
59 const std::unique_ptr<Type> fInvalid;
60 const std::unique_ptr<Type> fPoison;
61 const std::unique_ptr<Type> fVoid;
62 const std::unique_ptr<Type> fFloatLiteral;
63 const std::unique_ptr<Type> fIntLiteral;
64
65 const std::unique_ptr<Type> fFloat2x2;
66 const std::unique_ptr<Type> fFloat2x3;
67 const std::unique_ptr<Type> fFloat2x4;
68 const std::unique_ptr<Type> fFloat3x2;
69 const std::unique_ptr<Type> fFloat3x3;
70 const std::unique_ptr<Type> fFloat3x4;
71 const std::unique_ptr<Type> fFloat4x2;
72 const std::unique_ptr<Type> fFloat4x3;
73 const std::unique_ptr<Type> fFloat4x4;
74
75 const std::unique_ptr<Type> fHalf2x2;
76 const std::unique_ptr<Type> fHalf2x3;
77 const std::unique_ptr<Type> fHalf2x4;
78 const std::unique_ptr<Type> fHalf3x2;
79 const std::unique_ptr<Type> fHalf3x3;
80 const std::unique_ptr<Type> fHalf3x4;
81 const std::unique_ptr<Type> fHalf4x2;
82 const std::unique_ptr<Type> fHalf4x3;
83 const std::unique_ptr<Type> fHalf4x4;
84
85 const std::unique_ptr<Type> fVec2;
86 const std::unique_ptr<Type> fVec3;
87 const std::unique_ptr<Type> fVec4;
88
89 const std::unique_ptr<Type> fIVec2;
90 const std::unique_ptr<Type> fIVec3;
91 const std::unique_ptr<Type> fIVec4;
92
93 const std::unique_ptr<Type> fBVec2;
94 const std::unique_ptr<Type> fBVec3;
95 const std::unique_ptr<Type> fBVec4;
96
97 const std::unique_ptr<Type> fMat2;
98 const std::unique_ptr<Type> fMat3;
99 const std::unique_ptr<Type> fMat4;
100
101 const std::unique_ptr<Type> fMat2x2;
102 const std::unique_ptr<Type> fMat2x3;
103 const std::unique_ptr<Type> fMat2x4;
104 const std::unique_ptr<Type> fMat3x2;
105 const std::unique_ptr<Type> fMat3x3;
106 const std::unique_ptr<Type> fMat3x4;
107 const std::unique_ptr<Type> fMat4x2;
108 const std::unique_ptr<Type> fMat4x3;
109 const std::unique_ptr<Type> fMat4x4;
110
111 // These texture types use `sample` access.
112 const std::unique_ptr<Type> fTexture2D_sample;
113 const std::unique_ptr<Type> fTextureExternalOES;
114 const std::unique_ptr<Type> fTexture2DRect;
115
116 // These texture types use `read`/`write` access.
117 const std::unique_ptr<Type> fTexture2D;
118 const std::unique_ptr<Type> fReadOnlyTexture2D;
119 const std::unique_ptr<Type> fWriteOnlyTexture2D;
120
121 const std::unique_ptr<Type> fGenTexture2D;
122 const std::unique_ptr<Type> fReadableTexture2D;
123 const std::unique_ptr<Type> fWritableTexture2D;
124
125 const std::unique_ptr<Type> fSampler2D;
126 const std::unique_ptr<Type> fSamplerExternalOES;
127 const std::unique_ptr<Type> fSampler2DRect;
128
129 const std::unique_ptr<Type> fSampler;
130
131 const std::unique_ptr<Type> fSubpassInput;
132 const std::unique_ptr<Type> fSubpassInputMS;
133
134 const std::unique_ptr<Type> fGenType;
135 const std::unique_ptr<Type> fGenHType;
136 const std::unique_ptr<Type> fGenIType;
137 const std::unique_ptr<Type> fGenUType;
138 const std::unique_ptr<Type> fGenBType;
139
140 const std::unique_ptr<Type> fMat;
141 const std::unique_ptr<Type> fHMat;
142 const std::unique_ptr<Type> fSquareMat;
143 const std::unique_ptr<Type> fSquareHMat;
144
145 const std::unique_ptr<Type> fVec;
146
147 const std::unique_ptr<Type> fHVec;
148 const std::unique_ptr<Type> fDVec;
149 const std::unique_ptr<Type> fIVec;
150 const std::unique_ptr<Type> fUVec;
151 const std::unique_ptr<Type> fSVec;
152 const std::unique_ptr<Type> fUSVec;
153 const std::unique_ptr<Type> fByteVec;
154 const std::unique_ptr<Type> fUByteVec;
155
156 const std::unique_ptr<Type> fBVec;
157
158 const std::unique_ptr<Type> fSkCaps;
159
160 const std::unique_ptr<Type> fColorFilter;
161 const std::unique_ptr<Type> fShader;
162 const std::unique_ptr<Type> fBlender;
163
164 const std::unique_ptr<Type> fAtomicUInt;
165};
166
167} // namespace SkSL
168
169#endif
const std::unique_ptr< Type > fFloat2
const std::unique_ptr< Type > fTexture2DRect
const std::unique_ptr< Type > fFloatLiteral
const std::unique_ptr< Type > fIVec
const std::unique_ptr< Type > fHalf4
const std::unique_ptr< Type > fFloat4x3
const std::unique_ptr< Type > fReadableTexture2D
const std::unique_ptr< Type > fTextureExternalOES
const std::unique_ptr< Type > fInt4
const std::unique_ptr< Type > fMat4x4
const std::unique_ptr< Type > fHalf2x3
const std::unique_ptr< Type > fHalf2x2
const std::unique_ptr< Type > fMat4x2
const std::unique_ptr< Type > fUInt2
const std::unique_ptr< Type > fShort3
const std::unique_ptr< Type > fWritableTexture2D
const std::unique_ptr< Type > fGenBType
const std::unique_ptr< Type > fGenIType
const std::unique_ptr< Type > fSkCaps
const std::unique_ptr< Type > fInt2
const std::unique_ptr< Type > fMat2x4
const std::unique_ptr< Type > fMat2
const std::unique_ptr< Type > fSubpassInput
const std::unique_ptr< Type > fUShort
const std::unique_ptr< Type > fInt
const std::unique_ptr< Type > fHalf4x3
const std::unique_ptr< Type > fBVec2
const std::unique_ptr< Type > fFloat3x2
const std::unique_ptr< Type > fTexture2D
const std::unique_ptr< Type > fAtomicUInt
const std::unique_ptr< Type > fUByteVec
const std::unique_ptr< Type > fMat4
const std::unique_ptr< Type > fMat4x3
const std::unique_ptr< Type > fVec
const std::unique_ptr< Type > fGenType
const std::unique_ptr< Type > fFloat2x2
const std::unique_ptr< Type > fSquareHMat
const std::unique_ptr< Type > fShader
const std::unique_ptr< Type > fSampler
const std::unique_ptr< Type > fFloat3x4
const std::unique_ptr< Type > fHalf3x4
const std::unique_ptr< Type > fMat2x2
const std::unique_ptr< Type > fInvalid
const std::unique_ptr< Type > fIntLiteral
const std::unique_ptr< Type > fFloat4x4
const std::unique_ptr< Type > fShort2
const std::unique_ptr< Type > fShort
const std::unique_ptr< Type > fInt3
const std::unique_ptr< Type > fBlender
const std::unique_ptr< Type > fBVec3
const std::unique_ptr< Type > fHalf2x4
const std::unique_ptr< Type > fGenTexture2D
const std::unique_ptr< Type > fBVec4
const std::unique_ptr< Type > fVec4
const std::unique_ptr< Type > fUInt3
const std::unique_ptr< Type > fHVec
const std::unique_ptr< Type > fVec3
const std::unique_ptr< Type > fTexture2D_sample
const std::unique_ptr< Type > fUShort4
const std::unique_ptr< Type > fFloat4
const std::unique_ptr< Type > fByteVec
const std::unique_ptr< Type > fGenUType
const std::unique_ptr< Type > fHalf2
const std::unique_ptr< Type > fUInt4
const std::unique_ptr< Type > fIVec3
const std::unique_ptr< Type > fGenHType
const std::unique_ptr< Type > fDVec
const std::unique_ptr< Type > fHalf3x3
const std::unique_ptr< Type > fShort4
const std::unique_ptr< Type > fBool2
const std::unique_ptr< Type > fFloat3x3
const std::unique_ptr< Type > fUShort2
const std::unique_ptr< Type > fSampler2DRect
const std::unique_ptr< Type > fBool3
const std::unique_ptr< Type > fWriteOnlyTexture2D
const std::unique_ptr< Type > fSamplerExternalOES
const std::unique_ptr< Type > fHalf4x2
const std::unique_ptr< Type > fIVec4
const std::unique_ptr< Type > fUInt
const std::unique_ptr< Type > fFloat2x3
const std::unique_ptr< Type > fSubpassInputMS
const std::unique_ptr< Type > fUShort3
const std::unique_ptr< Type > fBool
const std::unique_ptr< Type > fSquareMat
const std::unique_ptr< Type > fVoid
const std::unique_ptr< Type > fUSVec
const std::unique_ptr< Type > fIVec2
const std::unique_ptr< Type > fHalf3
const std::unique_ptr< Type > fMat3
const std::unique_ptr< Type > fColorFilter
const std::unique_ptr< Type > fHMat
const std::unique_ptr< Type > fSVec
const std::unique_ptr< Type > fFloat2x4
const std::unique_ptr< Type > fMat3x4
const std::unique_ptr< Type > fFloat
const std::unique_ptr< Type > fBVec
const std::unique_ptr< Type > fMat3x3
const std::unique_ptr< Type > fFloat3
const std::unique_ptr< Type > fHalf
const std::unique_ptr< Type > fUVec
const std::unique_ptr< Type > fPoison
const std::unique_ptr< Type > fHalf3x2
const std::unique_ptr< Type > fMat2x3
const std::unique_ptr< Type > fMat3x2
const std::unique_ptr< Type > fHalf4x4
const std::unique_ptr< Type > fSampler2D
const std::unique_ptr< Type > fFloat4x2
const std::unique_ptr< Type > fReadOnlyTexture2D
const std::unique_ptr< Type > fBool4
const std::unique_ptr< Type > fVec2
const std::unique_ptr< Type > fMat