Revert "Child fragment processors are now written as separate functions"

This reverts commit 0364bde2c49616bc9d2f68742d36bfedbeb7e950.

Reason for revert: bot breakage, e.g. https://chromium-swarm.appspot.com/task?id=44942724fab4b710 and https://chromium-swarm.appspot.com/task?id=44938767e5fbb810
Original change's description:
> Child fragment processors are now written as separate functions
> instead of inline
> 
> Bug: skia:
> Change-Id: I3c6c876fea9cfcc311fc09c0fdf0375b776004aa
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/210632
> Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
> Reviewed-by: Michael Ludwig <michaelludwig@google.com>

TBR=ethannicholas@google.com,michaelludwig@google.com

Change-Id: If33c1f554a090cd7541878e77712d5ce968ec70a
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/211943
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
diff --git a/src/gpu/effects/generated/GrComposeLerpEffect.cpp b/src/gpu/effects/generated/GrComposeLerpEffect.cpp
index 72a46d2..c9b4d3b 100644
--- a/src/gpu/effects/generated/GrComposeLerpEffect.cpp
+++ b/src/gpu/effects/generated/GrComposeLerpEffect.cpp
@@ -27,19 +27,23 @@
         (void)weight;
         weightVar =
                 args.fUniformHandler->addUniform(kFragment_GrShaderFlag, kFloat_GrSLType, "weight");
-        fragBuilder->codeAppendf("half4 _process284;");
+        SkString _child0("_child0");
         if (_outer.child1_index >= 0) {
-            this->invokeChild(_outer.child1_index, "_process284", args);
+            this->emitChild(_outer.child1_index, &_child0, args);
+        } else {
+            fragBuilder->codeAppendf("half4 %s;", _child0.c_str());
         }
-        fragBuilder->codeAppendf("half4 _process353;");
+        SkString _child1("_child1");
         if (_outer.child2_index >= 0) {
-            this->invokeChild(_outer.child2_index, "_process353", args);
+            this->emitChild(_outer.child2_index, &_child1, args);
+        } else {
+            fragBuilder->codeAppendf("half4 %s;", _child1.c_str());
         }
-        fragBuilder->codeAppendf(
-                "%s = mix(%s ? _process284 : %s, %s ? _process353 : %s, half(%s));\n",
-                args.fOutputColor, _outer.child1_index >= 0 ? "true" : "false", args.fInputColor,
-                _outer.child2_index >= 0 ? "true" : "false", args.fInputColor,
-                args.fUniformHandler->getUniformCStr(weightVar));
+        fragBuilder->codeAppendf("%s = mix(%s ? %s : %s, %s ? %s : %s, half(%s));\n",
+                                 args.fOutputColor, _outer.child1_index >= 0 ? "true" : "false",
+                                 _child0.c_str(), args.fInputColor,
+                                 _outer.child2_index >= 0 ? "true" : "false", _child1.c_str(),
+                                 args.fInputColor, args.fUniformHandler->getUniformCStr(weightVar));
     }
 
 private:
diff --git a/src/gpu/effects/generated/GrComposeLerpRedEffect.cpp b/src/gpu/effects/generated/GrComposeLerpRedEffect.cpp
index a2f051b..d75b411 100644
--- a/src/gpu/effects/generated/GrComposeLerpRedEffect.cpp
+++ b/src/gpu/effects/generated/GrComposeLerpRedEffect.cpp
@@ -23,20 +23,24 @@
         GrGLSLFPFragmentBuilder* fragBuilder = args.fFragBuilder;
         const GrComposeLerpRedEffect& _outer = args.fFp.cast<GrComposeLerpRedEffect>();
         (void)_outer;
-        fragBuilder->codeAppendf("half4 _process286;");
+        SkString _child0("_child0");
         if (_outer.child1_index >= 0) {
-            this->invokeChild(_outer.child1_index, "_process286", args);
+            this->emitChild(_outer.child1_index, &_child0, args);
+        } else {
+            fragBuilder->codeAppendf("half4 %s;", _child0.c_str());
         }
-        fragBuilder->codeAppendf("half4 _process355;");
+        SkString _child1("_child1");
         if (_outer.child2_index >= 0) {
-            this->invokeChild(_outer.child2_index, "_process355", args);
+            this->emitChild(_outer.child2_index, &_child1, args);
+        } else {
+            fragBuilder->codeAppendf("half4 %s;", _child1.c_str());
         }
-        fragBuilder->codeAppendf("half4 _process407;");
-        this->invokeChild(_outer.lerp_index, "_process407", args);
-        fragBuilder->codeAppendf(
-                "%s = mix(%s ? _process286 : %s, %s ? _process355 : %s, _process407.x);\n",
-                args.fOutputColor, _outer.child1_index >= 0 ? "true" : "false", args.fInputColor,
-                _outer.child2_index >= 0 ? "true" : "false", args.fInputColor);
+        SkString _child2("_child2");
+        this->emitChild(_outer.lerp_index, &_child2, args);
+        fragBuilder->codeAppendf("%s = mix(%s ? %s : %s, %s ? %s : %s, %s.x);\n", args.fOutputColor,
+                                 _outer.child1_index >= 0 ? "true" : "false", _child0.c_str(),
+                                 args.fInputColor, _outer.child2_index >= 0 ? "true" : "false",
+                                 _child1.c_str(), args.fInputColor, _child2.c_str());
     }
 
 private:
diff --git a/src/gpu/effects/generated/GrMixerEffect.cpp b/src/gpu/effects/generated/GrMixerEffect.cpp
index 4ffa89c..af5a7af 100644
--- a/src/gpu/effects/generated/GrMixerEffect.cpp
+++ b/src/gpu/effects/generated/GrMixerEffect.cpp
@@ -28,17 +28,19 @@
         weightVar =
                 args.fUniformHandler->addUniform(kFragment_GrShaderFlag, kHalf_GrSLType, "weight");
         SkString _input0 = SkStringPrintf("%s", args.fInputColor);
-        fragBuilder->codeAppendf("half4 _process1272;");
-        this->invokeChild(_outer.fp0_index, _input0.c_str(), "_process1272", args);
-        fragBuilder->codeAppendf("half4 in0 = _process1272;");
+        SkString _child0("_child0");
+        this->emitChild(_outer.fp0_index, _input0.c_str(), &_child0, args);
+        fragBuilder->codeAppendf("half4 in0 = %s;", _child0.c_str());
         SkString _input1 = SkStringPrintf("%s", args.fInputColor);
-        fragBuilder->codeAppendf("half4 _process1330;");
+        SkString _child1("_child1");
         if (_outer.fp1_index >= 0) {
-            this->invokeChild(_outer.fp1_index, _input1.c_str(), "_process1330", args);
+            this->emitChild(_outer.fp1_index, _input1.c_str(), &_child1, args);
+        } else {
+            fragBuilder->codeAppendf("half4 %s;", _child1.c_str());
         }
-        fragBuilder->codeAppendf("\nhalf4 in1 = %s ? _process1330 : %s;\n%s = mix(in0, in1, %s);\n",
-                                 _outer.fp1_index >= 0 ? "true" : "false", args.fInputColor,
-                                 args.fOutputColor,
+        fragBuilder->codeAppendf("\nhalf4 in1 = %s ? %s : %s;\n%s = mix(in0, in1, %s);\n",
+                                 _outer.fp1_index >= 0 ? "true" : "false", _child1.c_str(),
+                                 args.fInputColor, args.fOutputColor,
                                  args.fUniformHandler->getUniformCStr(weightVar));
     }
 
diff --git a/src/gpu/effects/generated/GrOverrideInputFragmentProcessor.cpp b/src/gpu/effects/generated/GrOverrideInputFragmentProcessor.cpp
index b2f8339..9d7934e 100644
--- a/src/gpu/effects/generated/GrOverrideInputFragmentProcessor.cpp
+++ b/src/gpu/effects/generated/GrOverrideInputFragmentProcessor.cpp
@@ -43,9 +43,9 @@
                 _outer.literalColor.fR, _outer.literalColor.fG, _outer.literalColor.fB,
                 _outer.literalColor.fA);
         SkString _input0("constColor");
-        fragBuilder->codeAppendf("half4 _process1986;");
-        this->invokeChild(_outer.fp_index, _input0.c_str(), "_process1986", args);
-        fragBuilder->codeAppendf("\n%s = _process1986;\n", args.fOutputColor);
+        SkString _child0("_child0");
+        this->emitChild(_outer.fp_index, _input0.c_str(), &_child0, args);
+        fragBuilder->codeAppendf("\n%s = %s;\n", args.fOutputColor, _child0.c_str());
     }
 
 private: