Improve codegen for gradients.

Replacing `sk_OutColor = x` with `return x` in single-exit FP functions
results in fewer scratch variables in the final post-inliner output.

Change-Id: I81c081a78d0fb7dfad5230e3044027901673236c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/324377
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/gradients/generated/GrRadialGradientLayout.cpp b/src/gpu/gradients/generated/GrRadialGradientLayout.cpp
index fbcd1ac..190d4e8 100644
--- a/src/gpu/gradients/generated/GrRadialGradientLayout.cpp
+++ b/src/gpu/gradients/generated/GrRadialGradientLayout.cpp
@@ -26,9 +26,9 @@
         (void)_outer;
         fragBuilder->codeAppendf(
                 R"SkSL(half t = half(length(%s));
-%s = half4(t, 1.0, 0.0, 0.0);
+return half4(t, 1.0, 0.0, 0.0);
 )SkSL",
-                args.fSampleCoord, args.fOutputColor);
+                args.fSampleCoord);
     }
 
 private:
@@ -45,7 +45,7 @@
     (void)that;
     return true;
 }
-bool GrRadialGradientLayout::usesExplicitReturn() const { return false; }
+bool GrRadialGradientLayout::usesExplicitReturn() const { return true; }
 GrRadialGradientLayout::GrRadialGradientLayout(const GrRadialGradientLayout& src)
         : INHERITED(kGrRadialGradientLayout_ClassID, src.optimizationFlags()) {
     this->cloneAndRegisterAllChildProcessors(src);