#include "src/sksl/ir/SkSLSwizzle.h"
#include "include/core/SkSpan.h"
#include "include/private/base/SkTArray.h"
#include "src/sksl/SkSLAnalysis.h"
#include "src/sksl/SkSLConstantFolder.h"
#include "src/sksl/SkSLContext.h"
#include "src/sksl/SkSLDefines.h"
#include "src/sksl/SkSLErrorReporter.h"
#include "src/sksl/SkSLOperator.h"
#include "src/sksl/SkSLString.h"
#include "src/sksl/ir/SkSLConstructorCompound.h"
#include "src/sksl/ir/SkSLConstructorCompoundCast.h"
#include "src/sksl/ir/SkSLConstructorScalarCast.h"
#include "src/sksl/ir/SkSLConstructorSplat.h"
#include "src/sksl/ir/SkSLLiteral.h"
#include <algorithm>
#include <cstdint>
#include <cstring>
#include <optional>
usingnamespaceskia_private;
namespace SkSL {
static bool validate_swizzle_domain(const ComponentArray& fields) { … }
static char mask_char(int8_t component) { … }
std::string Swizzle::MaskString(const ComponentArray& components) { … }
static std::unique_ptr<Expression> optimize_constructor_swizzle(const Context& context,
Position pos,
const ConstructorCompound& base,
ComponentArray components) { … }
std::unique_ptr<Expression> Swizzle::Convert(const Context& context,
Position pos,
Position maskPos,
std::unique_ptr<Expression> base,
std::string_view componentString) { … }
bool Swizzle::IsIdentity(const ComponentArray& components) { … }
std::unique_ptr<Expression> Swizzle::Make(const Context& context,
Position pos,
std::unique_ptr<Expression> expr,
ComponentArray components) { … }
std::unique_ptr<Expression> Swizzle::MakeExact(const Context& context,
Position pos,
std::unique_ptr<Expression> expr,
ComponentArray components) { … }
std::string Swizzle::description(OperatorPrecedence) const { … }
}