class Context; enumclass OperatorPrecedence : uint8_t;
namespace SwizzleComponent {
enum Type : int8_t {
X = 0, Y = 1, Z = 2, W = 3,
R = 4, G = 5, B = 6, A = 7,
S = 8, T = 9, P = 10, Q = 11,
UL = 12, UT = 13, UR = 14, UB = 15,
ZERO,
ONE
};
} // namespace SwizzleComponent
/** * Represents the components of a vector swizzle.
*/ using ComponentArray = skia_private::FixedArray<4, int8_t>;
/** * Represents a vector swizzle operation such as 'float3(1, 2, 3).zyx'.
*/ class Swizzle final : public Expression { public: inlinestatic constexpr Kind kIRNodeKind = Kind::kSwizzle;
// Swizzle::Convert permits component strings containing ZERO or ONE, does typechecking, reports // errors via ErrorReporter, and returns an expression that combines constructors and native // swizzles (comprised solely of X/Y/W/Z). static std::unique_ptr<Expression> Convert(const Context& context,
Position pos,
Position maskPos,
std::unique_ptr<Expression> base,
std::string_view componentString);
// Swizzle::Make does not permit ZERO or ONE in the component array, just X/Y/Z/W; errors are // reported via ASSERT. static std::unique_ptr<Expression> Make(const Context& context,
Position pos,
std::unique_ptr<Expression> expr,
ComponentArray components);
// Swizzle::MakeExact creates the swizzle as requested, without simplification. static std::unique_ptr<Expression> MakeExact(const Context& context,
Position pos,
std::unique_ptr<Expression> expr,
ComponentArray components);
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.