Simplify luminance shader

Fixes TecnoSpark Pro compiler bug failure.

Bug: skia:9313
Change-Id: I54c077a2db71f75d50ba483b6932ffd2e18d2814
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/232583
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
diff --git a/src/gpu/glsl/GrGLSLBlend.cpp b/src/gpu/glsl/GrGLSLBlend.cpp
index 9b0378c..2d1e93c 100644
--- a/src/gpu/glsl/GrGLSLBlend.cpp
+++ b/src/gpu/glsl/GrGLSLBlend.cpp
@@ -160,9 +160,8 @@
         GrShaderVar("lumColor", kHalf3_GrSLType),
     };
     SkString setLumBody;
-    setLumBody.printf("half diff = %s(lumColor - hueSat);", getFunction.c_str());
-    setLumBody.append("half3 outColor = hueSat + diff;");
-    setLumBody.appendf("half outLum = %s(outColor);", getFunction.c_str());
+    setLumBody.printf("half outLum = %s(lumColor);", getFunction.c_str());
+    setLumBody.appendf("half3 outColor = outLum - %s(hueSat) + hueSat;", getFunction.c_str());
     setLumBody.append("half minComp = min(min(outColor.r, outColor.g), outColor.b);"
                       "half maxComp = max(max(outColor.r, outColor.g), outColor.b);"
                       "if (minComp < 0.0 && outLum != minComp) {"