SkSL performance improvements (plus a couple of minor warning fixes)
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2131223002
Committed: https://skia.googlesource.com/skia/+/9fd67a1f53809f5eff1210dd107241b450c48acc
Review-Url: https://codereview.chromium.org/2131223002
diff --git a/src/sksl/ir/SkSLConstructor.h b/src/sksl/ir/SkSLConstructor.h
index c58da7e..0501b65 100644
--- a/src/sksl/ir/SkSLConstructor.h
+++ b/src/sksl/ir/SkSLConstructor.h
@@ -16,13 +16,13 @@
* Represents the construction of a compound type, such as "vec2(x, y)".
*/
struct Constructor : public Expression {
- Constructor(Position position, std::shared_ptr<Type> type,
+ Constructor(Position position, const Type& type,
std::vector<std::unique_ptr<Expression>> arguments)
- : INHERITED(position, kConstructor_Kind, std::move(type))
+ : INHERITED(position, kConstructor_Kind, type)
, fArguments(std::move(arguments)) {}
std::string description() const override {
- std::string result = fType->description() + "(";
+ std::string result = fType.description() + "(";
std::string separator = "";
for (size_t i = 0; i < fArguments.size(); i++) {
result += separator;