Declare outputColor and outputCoverage inside emitCode.

This is useful because it allows the variables to be declared as `const`
when they are trivial values like `half4(1)`. This enables the constant
folder to simplify or eliminate them. In most cases, this is only a
small benefit, as you'd expect a competent GPU driver to do the same.
However, Mali-400 can benefit significantly from optimizing away the
multiplication against a constant half4(1) coverage in Porter-Duff.

Mali-400 performance is back to normal: http://screen/3cDxdaGkYE8oBcS

Change-Id: I21fd23f91f747079cd05b082f7b3444aeabafb93
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/382476
Auto-Submit: John Stiles <johnstiles@google.com>
Commit-Queue: Ethan Nicholas <ethannicholas@google.com>
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
diff --git a/src/gpu/effects/GrBitmapTextGeoProc.cpp b/src/gpu/effects/GrBitmapTextGeoProc.cpp
index a58a2b2..a852c93 100644
--- a/src/gpu/effects/GrBitmapTextGeoProc.cpp
+++ b/src/gpu/effects/GrBitmapTextGeoProc.cpp
@@ -45,6 +45,7 @@
 
         GrGLSLFPFragmentBuilder* fragBuilder = args.fFragBuilder;
         // Setup pass through color
+        fragBuilder->codeAppendf("half4 %s;", args.fOutputColor);
         if (btgp.hasVertexColor()) {
             varyingHandler->addPassThroughAttribute(btgp.inColor(), args.fOutputColor);
         } else {
@@ -64,9 +65,9 @@
         if (btgp.maskFormat() == kARGB_GrMaskFormat) {
             // modulate by color
             fragBuilder->codeAppendf("%s = %s * texColor;", args.fOutputColor, args.fOutputColor);
-            fragBuilder->codeAppendf("%s = half4(1);", args.fOutputCoverage);
+            fragBuilder->codeAppendf("const half4 %s = half4(1);", args.fOutputCoverage);
         } else {
-            fragBuilder->codeAppendf("%s = texColor;", args.fOutputCoverage);
+            fragBuilder->codeAppendf("half4 %s = texColor;", args.fOutputCoverage);
         }
     }