Replace getVecComponent with getConstantSubexpression.

Change-Id: I792f23d3aba45bdaea174ee51d4aca5bd9cb4ea4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/393079
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
diff --git a/src/sksl/SkSLConstantFolder.cpp b/src/sksl/SkSLConstantFolder.cpp
index 440b4cc..d78edfb 100644
--- a/src/sksl/SkSLConstantFolder.cpp
+++ b/src/sksl/SkSLConstantFolder.cpp
@@ -98,7 +98,8 @@
         ExpressionArray args;
         args.reserve_back(type.columns());
         for (int i = 0; i < type.columns(); i++) {
-            U value = foldFn(left.getVecComponent<T>(i), right.getVecComponent<T>(i));
+            U value = foldFn(left.getConstantSubexpression(i)->as<Literal<T>>().value(),
+                             right.getConstantSubexpression(i)->as<Literal<T>>().value());
             args.push_back(Literal<T>::Make(left.fOffset, value, &componentType));
         }
         auto foldedCtor = Constructor::Convert(context, left.fOffset, type, std::move(args));