aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/sksl/ir/SkSLInterfaceBlock.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/sksl/ir/SkSLInterfaceBlock.h')
-rw-r--r--src/sksl/ir/SkSLInterfaceBlock.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/sksl/ir/SkSLInterfaceBlock.h b/src/sksl/ir/SkSLInterfaceBlock.h
index 4a7bf9307b..08bf9d0f75 100644
--- a/src/sksl/ir/SkSLInterfaceBlock.h
+++ b/src/sksl/ir/SkSLInterfaceBlock.h
@@ -35,6 +35,17 @@ struct InterfaceBlock : public ProgramElement {
, fSizes(std::move(sizes))
, fTypeOwner(typeOwner) {}
+ std::unique_ptr<ProgramElement> clone() const override {
+ std::vector<std::unique_ptr<Expression>> sizesClone;
+ for (const auto& s : fSizes) {
+ sizesClone.push_back(s->clone());
+ }
+ return std::unique_ptr<ProgramElement>(new InterfaceBlock(fOffset, &fVariable, fTypeName,
+ fInstanceName,
+ std::move(sizesClone),
+ fTypeOwner));
+ }
+
String description() const override {
String result = fVariable.fModifiers.description() + fTypeName + " {\n";
const Type* structType = &fVariable.fType;