Simplify GrMixerEffect.

The sample() keyword now allows null fragment processors to be passed
in, substituting the input color when this occurs. The ternary did the
same thing, so it no longer adds value.

Without the ternary, the expression becomes simple enough that it can
fit on a single line, so the temporary variables were removed as well.

Change-Id: I8d0ceb437791a87a4244576a180e8c4eec441f2b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/300644
Commit-Queue: John Stiles <johnstiles@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
diff --git a/src/gpu/effects/generated/GrMixerEffect.cpp b/src/gpu/effects/generated/GrMixerEffect.cpp
index 1dbf8ec..20c43f2 100644
--- a/src/gpu/effects/generated/GrMixerEffect.cpp
+++ b/src/gpu/effects/generated/GrMixerEffect.cpp
@@ -27,25 +27,21 @@
         (void)weight;
         weightVar = args.fUniformHandler->addUniform(&_outer, kFragment_GrShaderFlag,
                                                      kHalf_GrSLType, "weight");
-        SkString _input1278(args.fInputColor);
-        SkString _sample1278;
-        _sample1278 = this->invokeChild(_outer.fp0_index, _input1278.c_str(), args);
-        fragBuilder->codeAppendf(
-                R"SkSL(half4 in0 = %s;)SkSL", _sample1278.c_str());
-        SkString _input1335(args.fInputColor);
-        SkString _sample1335;
+        SkString _input1284(args.fInputColor);
+        SkString _sample1284;
+        _sample1284 = this->invokeChild(_outer.fp0_index, _input1284.c_str(), args);
+        SkString _input1309(args.fInputColor);
+        SkString _sample1309;
         if (_outer.fp1_index >= 0) {
-            _sample1335 = this->invokeChild(_outer.fp1_index, _input1335.c_str(), args);
+            _sample1309 = this->invokeChild(_outer.fp1_index, _input1309.c_str(), args);
         } else {
-            _sample1335.swap(_input1335);
+            _sample1309.swap(_input1309);
         }
         fragBuilder->codeAppendf(
-                R"SkSL(
-half4 in1 = %s ? %s : %s;
-%s = mix(in0, in1, %s);
+                R"SkSL(%s = mix(%s, %s, %s);
 )SkSL",
-                _outer.fp1_index >= 0 ? "true" : "false", _sample1335.c_str(), args.fInputColor,
-                args.fOutputColor, args.fUniformHandler->getUniformCStr(weightVar));
+                args.fOutputColor, _sample1284.c_str(), _sample1309.c_str(),
+                args.fUniformHandler->getUniformCStr(weightVar));
     }
 
 private: