chromium/third_party/skia/src/sksl/ir/SkSLType.cpp

/*
 * Copyright 2016 Google Inc.
 *
 * Use of this source code is governed by a BSD-style license that can be
 * found in the LICENSE file.
 */

#include "src/sksl/ir/SkSLType.h"

#include "include/private/base/SkTo.h"
#include "src/base/SkEnumBitMask.h"
#include "src/base/SkMathPriv.h"
#include "src/base/SkSafeMath.h"
#include "src/core/SkTHash.h"
#include "src/sksl/SkSLBuiltinTypes.h"
#include "src/sksl/SkSLConstantFolder.h"
#include "src/sksl/SkSLContext.h"
#include "src/sksl/SkSLErrorReporter.h"
#include "src/sksl/SkSLProgramSettings.h"
#include "src/sksl/SkSLString.h"
#include "src/sksl/ir/SkSLConstructorArrayCast.h"
#include "src/sksl/ir/SkSLConstructorCompoundCast.h"
#include "src/sksl/ir/SkSLConstructorScalarCast.h"
#include "src/sksl/ir/SkSLExpression.h"
#include "src/sksl/ir/SkSLLayout.h"
#include "src/sksl/ir/SkSLModifierFlags.h"
#include "src/sksl/ir/SkSLSymbolTable.h"

#include <algorithm>
#include <cstdint>
#include <limits>
#include <optional>
#include <string_view>
#include <utility>

usingnamespaceskia_private;

namespace SkSL {

static constexpr int kMaxStructDepth =;

class AliasType final : public Type {};

class ArrayType final : public Type {};

class GenericType final : public Type {};

class LiteralType : public Type {};


class ScalarType final : public Type {};

class AtomicType final : public Type {};

class MatrixType final : public Type {};

class TextureType final : public Type {};

class SamplerType final : public Type {};

class StructType final : public Type {};

class VectorType final : public Type {};

std::string Type::getArrayName(int arraySize) const {}

std::unique_ptr<Type> Type::MakeAliasType(std::string_view name, const Type& targetType) {}

std::unique_ptr<Type> Type::MakeArrayType(const Context& context,
                                          std::string_view name,
                                          const Type& componentType,
                                          int columns) {}

std::unique_ptr<Type> Type::MakeGenericType(const char* name,
                                            SkSpan<const Type* const> types,
                                            const Type* slotType) {}

std::unique_ptr<Type> Type::MakeLiteralType(const char* name, const Type& scalarType,
                                            int8_t priority) {}

std::unique_ptr<Type> Type::MakeMatrixType(std::string_view name, const char* abbrev,
                                           const Type& componentType, int columns, int8_t rows) {}

std::unique_ptr<Type> Type::MakeSamplerType(const char* name, const Type& textureType) {}

std::unique_ptr<Type> Type::MakeSpecialType(const char* name, const char* abbrev,
                                            Type::TypeKind typeKind) {}

std::unique_ptr<Type> Type::MakeScalarType(std::string_view name, const char* abbrev,
                                           Type::NumberKind numberKind, int8_t priority,
                                           int8_t bitWidth) {}

std::unique_ptr<Type> Type::MakeAtomicType(std::string_view name, const char* abbrev) {}

std::unique_ptr<Type> Type::MakeStructType(const Context& context,
                                           Position pos,
                                           std::string_view name,
                                           TArray<Field> fields,
                                           bool interfaceBlock) {}

std::unique_ptr<Type> Type::MakeTextureType(const char* name, SpvDim_ dimensions, bool isDepth,
                                            bool isArrayedTexture, bool isMultisampled,
                                            TextureAccess textureAccess) {}

std::unique_ptr<Type> Type::MakeVectorType(std::string_view name, const char* abbrev,
                                           const Type& componentType, int columns) {}

CoercionCost Type::coercionCost(const Type& other) const {}

const Type* Type::applyQualifiers(const Context& context,
                                  ModifierFlags* modifierFlags,
                                  Position pos) const {}

const Type* Type::applyPrecisionQualifiers(const Context& context,
                                           ModifierFlags* modifierFlags,
                                           Position pos) const {}

const Type* Type::applyAccessQualifiers(const Context& context,
                                        ModifierFlags* modifierFlags,
                                        Position pos) const {}

const Type& Type::toCompound(const Context& context, int columns, int rows) const {}

const Type* Type::clone(const Context& context, SymbolTable* symbolTable) const {}

std::unique_ptr<Expression> Type::coerceExpression(std::unique_ptr<Expression> expr,
                                                   const Context& context) const {}

bool Type::isAllowedInES2(const Context& context) const {}

bool Type::checkForOutOfRangeLiteral(const Context& context, const Expression& expr) const {}

bool Type::checkForOutOfRangeLiteral(const Context& context, double value, Position pos) const {}

bool Type::checkIfUsableInArray(const Context& context, Position arrayPos) const {}

SKSL_INT Type::convertArraySize(const Context& context,
                                Position arrayPos,
                                std::unique_ptr<Expression> size) const {}

SKSL_INT Type::convertArraySize(const Context& context,
                                Position arrayPos,
                                Position sizePos,
                                SKSL_INT size) const {}

std::string Field::description() const {}

}  // namespace SkSL