aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/sksl/ir/SkSLType.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/sksl/ir/SkSLType.h')
-rw-r--r--src/sksl/ir/SkSLType.h28
1 files changed, 14 insertions, 14 deletions
diff --git a/src/sksl/ir/SkSLType.h b/src/sksl/ir/SkSLType.h
index 44bc26272b..2f98e53e62 100644
--- a/src/sksl/ir/SkSLType.h
+++ b/src/sksl/ir/SkSLType.h
@@ -26,17 +26,17 @@ class Context;
class Type : public Symbol {
public:
struct Field {
- Field(Modifiers modifiers, String name, const Type* type)
+ Field(Modifiers modifiers, SkString name, const Type* type)
: fModifiers(modifiers)
, fName(std::move(name))
, fType(std::move(type)) {}
- const String description() const {
+ const SkString description() const {
return fType->description() + " " + fName + ";";
}
Modifiers fModifiers;
- String fName;
+ SkString fName;
const Type* fType;
};
@@ -53,24 +53,24 @@ public:
// Create an "other" (special) type with the given name. These types cannot be directly
// referenced from user code.
- Type(String name)
+ Type(SkString name)
: INHERITED(Position(), kType_Kind, std::move(name))
, fTypeKind(kOther_Kind) {}
// Create a generic type which maps to the listed types.
- Type(String name, std::vector<const Type*> types)
+ Type(SkString name, std::vector<const Type*> types)
: INHERITED(Position(), kType_Kind, std::move(name))
, fTypeKind(kGeneric_Kind)
, fCoercibleTypes(std::move(types)) {}
// Create a struct type with the given fields.
- Type(Position position, String name, std::vector<Field> fields)
+ Type(Position position, SkString name, std::vector<Field> fields)
: INHERITED(position, kType_Kind, std::move(name))
, fTypeKind(kStruct_Kind)
, fFields(std::move(fields)) {}
// Create a scalar type.
- Type(String name, bool isNumber)
+ Type(SkString name, bool isNumber)
: INHERITED(Position(), kType_Kind, std::move(name))
, fTypeKind(kScalar_Kind)
, fIsNumber(isNumber)
@@ -78,7 +78,7 @@ public:
, fRows(1) {}
// Create a scalar type which can be coerced to the listed types.
- Type(String name, bool isNumber, std::vector<const Type*> coercibleTypes)
+ Type(SkString name, bool isNumber, std::vector<const Type*> coercibleTypes)
: INHERITED(Position(), kType_Kind, std::move(name))
, fTypeKind(kScalar_Kind)
, fIsNumber(isNumber)
@@ -87,11 +87,11 @@ public:
, fRows(1) {}
// Create a vector type.
- Type(String name, const Type& componentType, int columns)
+ Type(SkString name, const Type& componentType, int columns)
: Type(name, kVector_Kind, componentType, columns) {}
// Create a vector or array type.
- Type(String name, Kind kind, const Type& componentType, int columns)
+ Type(SkString name, Kind kind, const Type& componentType, int columns)
: INHERITED(Position(), kType_Kind, std::move(name))
, fTypeKind(kind)
, fComponentType(&componentType)
@@ -100,7 +100,7 @@ public:
, fDimensions(SpvDim1D) {}
// Create a matrix type.
- Type(String name, const Type& componentType, int columns, int rows)
+ Type(SkString name, const Type& componentType, int columns, int rows)
: INHERITED(Position(), kType_Kind, std::move(name))
, fTypeKind(kMatrix_Kind)
, fComponentType(&componentType)
@@ -109,7 +109,7 @@ public:
, fDimensions(SpvDim1D) {}
// Create a sampler type.
- Type(String name, SpvDim_ dimensions, bool isDepth, bool isArrayed, bool isMultisampled,
+ Type(SkString name, SpvDim_ dimensions, bool isDepth, bool isArrayed, bool isMultisampled,
bool isSampled)
: INHERITED(Position(), kType_Kind, std::move(name))
, fTypeKind(kSampler_Kind)
@@ -119,11 +119,11 @@ public:
, fIsMultisampled(isMultisampled)
, fIsSampled(isSampled) {}
- String name() const {
+ SkString name() const {
return fName;
}
- String description() const override {
+ SkString description() const override {
return fName;
}