Add Make factory method to VariableReference.
There aren't any optimization opportunities here, but it was the only
expression/statement type left without a Make or Convert factory.
Change-Id: I4c413a3b2619261f9e974528fa45211383e56fa7
Bug: skia:11342
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/402017
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
diff --git a/src/sksl/SkSLRehydrator.cpp b/src/sksl/SkSLRehydrator.cpp
index c4dd94f..46adfc7 100644
--- a/src/sksl/SkSLRehydrator.cpp
+++ b/src/sksl/SkSLRehydrator.cpp
@@ -564,7 +564,7 @@
case Rehydrator::kVariableReference_Command: {
const Variable* var = this->symbolRef<Variable>(Symbol::Kind::kVariable);
VariableReference::RefKind refKind = (VariableReference::RefKind) this->readU8();
- return std::make_unique<VariableReference>(-1, var, refKind);
+ return VariableReference::Make(/*offset=*/-1, var, refKind);
}
case Rehydrator::kVoid_Command:
return nullptr;