![]() |
Flutter Engine
The Flutter Engine
|
Public Member Functions | |
AliasType (std::string_view name, const Type &targetType) | |
const Type & | resolve () const override |
const Type & | componentType () const override |
NumberKind | numberKind () const override |
int | priority () const override |
int | columns () const override |
int | rows () const override |
int | bitWidth () const override |
bool | isAllowedInES2 () const override |
size_t | slotCount () const override |
const Type & | slotType (size_t n) const override |
SpvDim_ | dimensions () const override |
bool | isDepth () const override |
bool | isArrayedTexture () const override |
bool | isScalar () const override |
bool | isLiteral () const override |
bool | isVector () const override |
bool | isMatrix () const override |
bool | isArray () const override |
bool | isUnsizedArray () const override |
bool | isStruct () const override |
bool | isInterfaceBlock () const override |
bool | isMultisampled () const override |
TextureAccess | textureAccess () const override |
SkSpan< const Type *const > | coercibleTypes () const override |
![]() | |
Type (const Type &other)=delete | |
std::string | getArrayName (int arraySize) const |
template<typename T > | |
bool | is () const |
template<typename T > | |
const T & | as () const |
template<typename T > | |
T & | as () |
const Type * | clone (const Context &context, SymbolTable *symbolTable) const |
virtual bool | isBuiltin () const |
std::string | displayName () const |
std::string | description () const override |
bool | isAllowedInES2 (const Context &context) const |
virtual bool | isAllowedInES2 () const |
virtual bool | isAllowedInUniform (Position *errorPosition=nullptr) const |
virtual const Type & | resolve () const |
bool | matches (const Type &other) const |
const char * | abbreviatedName () const |
TypeKind | typeKind () const |
virtual NumberKind | numberKind () const |
bool | isBoolean () const |
bool | isNumber () const |
bool | isFloat () const |
bool | isSigned () const |
bool | isUnsigned () const |
bool | isInteger () const |
bool | isOpaque () const |
bool | isStorageTexture () const |
virtual int | priority () const |
bool | canCoerceTo (const Type &other, bool allowNarrowing) const |
CoercionCost | coercionCost (const Type &other) const |
virtual const Type & | componentType () const |
const Type & | columnType (const Context &context) const |
virtual const Type & | textureType () const |
virtual int | columns () const |
virtual int | rows () const |
virtual double | minimumValue () const |
virtual double | maximumValue () const |
virtual size_t | slotCount () const |
virtual const Type & | slotType (size_t) const |
virtual SkSpan< const Field > | fields () const |
virtual SkSpan< const Type *const > | coercibleTypes () const |
virtual SpvDim_ | dimensions () const |
virtual bool | isDepth () const |
virtual bool | isArrayedTexture () const |
bool | isVoid () const |
bool | isGeneric () const |
bool | isSampler () const |
bool | isAtomic () const |
virtual bool | isScalar () const |
virtual bool | isLiteral () const |
virtual const Type & | scalarTypeForLiteral () const |
virtual bool | isVector () const |
virtual bool | isMatrix () const |
virtual bool | isArray () const |
virtual bool | isUnsizedArray () const |
virtual bool | isStruct () const |
virtual bool | isInterfaceBlock () const |
bool | isEffectChild () const |
virtual bool | isMultisampled () const |
virtual TextureAccess | textureAccess () const |
bool | hasPrecision () const |
bool | highPrecision () const |
virtual int | bitWidth () const |
virtual bool | isOrContainsArray () const |
virtual bool | isOrContainsUnsizedArray () const |
virtual bool | isOrContainsAtomic () const |
const Type & | toCompound (const Context &context, int columns, int rows) const |
const Type * | applyQualifiers (const Context &context, ModifierFlags *modifierFlags, Position pos) const |
std::unique_ptr< Expression > | coerceExpression (std::unique_ptr< Expression > expr, const Context &context) const |
bool | checkForOutOfRangeLiteral (const Context &context, const Expression &expr) const |
bool | checkForOutOfRangeLiteral (const Context &context, double value, Position pos) const |
bool | checkIfUsableInArray (const Context &context, Position arrayPos) const |
SKSL_INT | convertArraySize (const Context &context, Position arrayPos, std::unique_ptr< Expression > size) const |
SKSL_INT | convertArraySize (const Context &context, Position arrayPos, Position sizePos, SKSL_INT size) const |
![]() | |
Symbol (Position pos, Kind kind, std::string_view name, const Type *type=nullptr) | |
~Symbol () override | |
std::unique_ptr< Expression > | instantiate (const Context &context, Position pos) const |
const Type & | type () const |
Kind | kind () const |
std::string_view | name () const |
void | setName (std::string_view newName) |
![]() | |
virtual | ~IRNode () |
virtual std::string | description () const =0 |
IRNode (const IRNode &)=delete | |
IRNode & | operator= (const IRNode &)=delete |
Position | position () const |
void | setPosition (Position p) |
template<typename T > | |
bool | is () const |
template<typename T > | |
const T & | as () const |
template<typename T > | |
T & | as () |
Additional Inherited Members | |
![]() | |
enum class | TypeKind : int8_t { kArray , kAtomic , kGeneric , kLiteral , kMatrix , kOther , kSampler , kSeparateSampler , kScalar , kStruct , kTexture , kVector , kVoid , kColorFilter , kShader , kBlender } |
enum class | NumberKind : int8_t { kFloat , kSigned , kUnsigned , kBoolean , kNonnumeric } |
enum class | TextureAccess : int8_t { kSample , kRead , kWrite , kReadWrite } |
![]() | |
using | Kind = SymbolKind |
![]() | |
static std::unique_ptr< Type > | MakeArrayType (const Context &context, std::string_view name, const Type &componentType, int columns) |
static std::unique_ptr< Type > | MakeAliasType (std::string_view name, const Type &targetType) |
static std::unique_ptr< Type > | MakeGenericType (const char *name, SkSpan< const Type *const > types, const Type *slotType) |
static std::unique_ptr< Type > | MakeLiteralType (const char *name, const Type &scalarType, int8_t priority) |
static std::unique_ptr< Type > | MakeMatrixType (std::string_view name, const char *abbrev, const Type &componentType, int columns, int8_t rows) |
static std::unique_ptr< Type > | MakeSamplerType (const char *name, const Type &textureType) |
static std::unique_ptr< Type > | MakeScalarType (std::string_view name, const char *abbrev, Type::NumberKind numberKind, int8_t priority, int8_t bitWidth) |
static std::unique_ptr< Type > | MakeSpecialType (const char *name, const char *abbrev, Type::TypeKind typeKind) |
static std::unique_ptr< Type > | MakeStructType (const Context &context, Position pos, std::string_view name, skia_private::TArray< Field > fields, bool interfaceBlock=false) |
static std::unique_ptr< Type > | MakeTextureType (const char *name, SpvDim_ dimensions, bool isDepth, bool isArrayedTexture, bool isMultisampled, TextureAccess textureAccess) |
static std::unique_ptr< Type > | MakeVectorType (std::string_view name, const char *abbrev, const Type &componentType, int columns) |
static std::unique_ptr< Type > | MakeAtomicType (std::string_view name, const char *abbrev) |
![]() | |
static void * | operator new (const size_t size) |
static void | operator delete (void *ptr) |
![]() | |
Position | fPosition |
![]() | |
static constexpr Kind | kIRNodeKind = Kind::kType |
static constexpr int | kMaxAbbrevLength = 3 |
static constexpr int | kUnsizedArray = -1 |
![]() | |
Type (std::string_view name, const char *abbrev, TypeKind kind, Position pos=Position()) | |
const Type * | applyPrecisionQualifiers (const Context &context, ModifierFlags *modifierFlags, Position pos) const |
const Type * | applyAccessQualifiers (const Context &context, ModifierFlags *modifierFlags, Position pos) const |
bool | isInRootSymbolTable () const |
virtual int | structNestingDepth () const |
![]() | |
IRNode (Position position, int kind) | |
![]() | |
int | fKind |
Definition at line 42 of file SkSLType.cpp.
|
inline |
Definition at line 44 of file SkSLType.cpp.
|
inlineoverridevirtual |
For generic types, returns the types that this generic type can substitute for.
Reimplemented from SkSL::Type.
Definition at line 140 of file SkSLType.cpp.
|
inlineoverridevirtual |
For matrices and vectors, returns the number of columns (e.g. both mat3 and float3 return 3). For scalars, returns 1. For arrays, returns either the size of the array (if known) or -1. For all other types, causes an assertion failure.
Reimplemented from SkSL::Type.
Definition at line 64 of file SkSLType.cpp.
|
inlineoverridevirtual |
For matrices and vectors, returns the type of individual cells (e.g. mat2 has a component type of Float). For arrays, returns the base type. For all other types, returns the type itself.
Reimplemented from SkSL::Type.
Definition at line 52 of file SkSLType.cpp.
|
inlineoverridevirtual |
|
inlineoverridevirtual |
Returns true if this type is legal to use in a strict-ES2 program.
Reimplemented from SkSL::Type.
Definition at line 76 of file SkSLType.cpp.
|
inlineoverridevirtual |
|
inlineoverridevirtual |
|
inlineoverridevirtual |
|
inlineoverridevirtual |
|
inlineoverridevirtual |
|
inlineoverridevirtual |
|
inlineoverridevirtual |
|
inlineoverridevirtual |
|
inlineoverridevirtual |
|
inlineoverridevirtual |
|
inlineoverridevirtual |
|
inlineoverridevirtual |
Returns the NumberKind of this type (always kNonnumeric for non-scalar values).
Reimplemented from SkSL::Type.
Definition at line 56 of file SkSLType.cpp.
|
inlineoverridevirtual |
Returns the "priority" of a number type, in order of float > half > int > short. When operating on two number types, the result is the higher-priority type.
Reimplemented from SkSL::Type.
Definition at line 60 of file SkSLType.cpp.
|
inlineoverridevirtual |
If this is an alias, returns the underlying type, otherwise returns this.
Reimplemented from SkSL::Type.
Definition at line 48 of file SkSLType.cpp.
|
inlineoverridevirtual |
For matrices, returns the number of rows (e.g. mat2x4 returns 4). For vectors and scalars, returns 1. For all other types, causes an assertion failure.
Reimplemented from SkSL::Type.
Definition at line 68 of file SkSLType.cpp.
|
inlineoverridevirtual |
Returns the number of scalars needed to hold this type.
Reimplemented from SkSL::Type.
Definition at line 80 of file SkSLType.cpp.
|
inlineoverridevirtual |
Returns the type of the value in the nth slot. For scalar, vector and matrix types, should always match componentType()
.
Reimplemented from SkSL::Type.
Definition at line 84 of file SkSLType.cpp.
|
inlineoverridevirtual |