Make invokeChild just return a string containing the child function call

Also removes several unused chunks of code that were declaring unused
variables, etc.

Change-Id: I47458736b189d59c0448c6f58b60a9b4ab046db2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/266565
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
diff --git a/src/gpu/gradients/generated/GrClampedGradientEffect.cpp b/src/gpu/gradients/generated/GrClampedGradientEffect.cpp
index 268fc6f..3224c7c 100644
--- a/src/gpu/gradients/generated/GrClampedGradientEffect.cpp
+++ b/src/gpu/gradients/generated/GrClampedGradientEffect.cpp
@@ -35,8 +35,8 @@
                                                               kHalf4_GrSLType, "leftBorderColor");
         rightBorderColorVar = args.fUniformHandler->addUniform(kFragment_GrShaderFlag,
                                                                kHalf4_GrSLType, "rightBorderColor");
-        SkString _sample1099("_sample1099");
-        this->invokeChild(_outer.gradLayout_index, &_sample1099, args);
+        SkString _sample1099;
+        _sample1099 = this->invokeChild(_outer.gradLayout_index, args);
         fragBuilder->codeAppendf(
                 "half4 t = %s;\nif (!%s && t.y < 0.0) {\n    %s = half4(0.0);\n} else if (t.x < "
                 "0.0) {\n    %s = %s;\n} else if (t.x > 1.0) {\n    %s = %s;\n} else {",
@@ -47,8 +47,8 @@
                 args.fUniformHandler->getUniformCStr(leftBorderColorVar), args.fOutputColor,
                 args.fUniformHandler->getUniformCStr(rightBorderColorVar));
         SkString _input1767("t");
-        SkString _sample1767("_sample1767");
-        this->invokeChild(_outer.colorizer_index, _input1767.c_str(), &_sample1767, args);
+        SkString _sample1767;
+        _sample1767 = this->invokeChild(_outer.colorizer_index, _input1767.c_str(), args);
         fragBuilder->codeAppendf("\n    %s = %s;\n}\n@if (%s) {\n    %s.xyz *= %s.w;\n}\n",
                                  args.fOutputColor, _sample1767.c_str(),
                                  (_outer.makePremul ? "true" : "false"), args.fOutputColor,