Change samplerVariable() to return a const char *.

This allows backends to use an expression rather than a variable for
sampler access.

Change-Id: I2346ac418c8d6277416a4430e2eaf6ab3ffee0a2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/222036
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Stephen White <senorblanco@chromium.org>
diff --git a/src/gpu/effects/generated/GrRRectBlurEffect.cpp b/src/gpu/effects/generated/GrRRectBlurEffect.cpp
index 6380367..8f6c80a 100644
--- a/src/gpu/effects/generated/GrRRectBlurEffect.cpp
+++ b/src/gpu/effects/generated/GrRRectBlurEffect.cpp
@@ -93,7 +93,7 @@
                 "threshold + 1.0);\nhalf2 texCoord = translatedFragPos / proxyDims;\n%s = %s * "
                 "texture(%s, float2(texCoord)).%s;\n",
                 args.fOutputColor, args.fInputColor,
-                fragBuilder->getProgramBuilder()->samplerVariable(args.fTexSamplers[0]).c_str(),
+                fragBuilder->getProgramBuilder()->samplerVariable(args.fTexSamplers[0]),
                 fragBuilder->getProgramBuilder()->samplerSwizzle(args.fTexSamplers[0]).c_str());
     }