minor SkSL changes to avoid compiler errors in Chromium
* fixed a couple of spots where using { } instead of an explicit constructor call resulted in errors
* Type::Field had a deleted copy constructor and therefore was not working inside std::vector; had to remove const from fields and change fType from a reference to a pointer
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2300023002
Review-Url: https://codereview.chromium.org/2300023002
diff --git a/src/sksl/SkSLGLSLCodeGenerator.cpp b/src/sksl/SkSLGLSLCodeGenerator.cpp
index 8e69a2f..20a39cf 100644
--- a/src/sksl/SkSLGLSLCodeGenerator.cpp
+++ b/src/sksl/SkSLGLSLCodeGenerator.cpp
@@ -68,7 +68,7 @@
for (const auto& f : type.fields()) {
this->writeModifiers(f.fModifiers);
// sizes (which must be static in structs) are part of the type name here
- this->writeType(f.fType);
+ this->writeType(*f.fType);
this->writeLine(" " + f.fName + ";");
}
fIndentation--;
@@ -306,7 +306,7 @@
fIndentation++;
for (const auto& f : intf.fVariable.fType.fields()) {
this->writeModifiers(f.fModifiers);
- this->writeType(f.fType);
+ this->writeType(*f.fType);
this->writeLine(" " + f.fName + ";");
}
fIndentation--;