Fix abs intrinsic detection in GLSL backend.

We should detect intrinsics by enum, not by string matching. This was
missed when doing the initial conversion from strings to enums.

Change-Id: I87fb63274085d17d8c14e72667b95019edee25b3
Bug: skia:11961
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/410100
Reviewed-by: Brian Osman <brianosman@google.com>
Commit-Queue: Brian Osman <brianosman@google.com>
Commit-Queue: John Stiles <johnstiles@google.com>
Auto-Submit: John Stiles <johnstiles@google.com>
diff --git a/src/sksl/codegen/SkSLGLSLCodeGenerator.cpp b/src/sksl/codegen/SkSLGLSLCodeGenerator.cpp
index 0855ec5..8e36726 100644
--- a/src/sksl/codegen/SkSLGLSLCodeGenerator.cpp
+++ b/src/sksl/codegen/SkSLGLSLCodeGenerator.cpp
@@ -242,10 +242,8 @@
 }
 
 static bool is_abs(Expression& expr) {
-    if (expr.kind() != Expression::Kind::kFunctionCall) {
-        return false;
-    }
-    return expr.as<FunctionCall>().function().name() == "abs";
+    return expr.is<FunctionCall>() &&
+           expr.as<FunctionCall>().function().intrinsicKind() == k_abs_IntrinsicKind;
 }
 
 // turns min(abs(x), y) into ((tmpVar1 = abs(x)) < (tmpVar2 = y) ? tmpVar1 : tmpVar2) to avoid a