SkSL GLSL generator writes default precision for sampler2D/samplerExternalOS/sampler2DRect

This is a stop gap. We should probably base the precision decision on the texture format.

Also removes all code used to add sampler precision to program keys. The precision that
was added to the key did not affect the generated GLSL.

Bug: skia:8863
Bug: skia:6718
Change-Id: Ibdb702e1aca5d48d83e2f24cb24010a0b7270871
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/234322
Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
diff --git a/src/gpu/GrProgramDesc.cpp b/src/gpu/GrProgramDesc.cpp
index d20d6e1..10a593b 100644
--- a/src/gpu/GrProgramDesc.cpp
+++ b/src/gpu/GrProgramDesc.cpp
@@ -44,7 +44,7 @@
 }
 
 static uint32_t sampler_key(GrTextureType textureType, const GrSwizzle& swizzle,
-                            GrPixelConfig config, const GrShaderCaps& caps) {
+                            const GrShaderCaps& caps) {
     int samplerTypeKey = texture_type_key(textureType);
 
     GR_STATIC_ASSERT(2 == sizeof(swizzle.asKey()));
@@ -52,9 +52,7 @@
     if (caps.textureSwizzleAppliedInShader()) {
         swizzleKey = swizzle.asKey();
     }
-    return SkToU32(samplerTypeKey |
-                   swizzleKey << kSamplerOrImageTypeKeyBits |
-                   (GrSLSamplerPrecision(config) << (16 + kSamplerOrImageTypeKeyBits)));
+    return SkToU32(samplerTypeKey | swizzleKey << kSamplerOrImageTypeKeyBits);
 }
 
 static void add_sampler_keys(GrProcessorKeyBuilder* b, const GrFragmentProcessor& fp,
@@ -67,7 +65,7 @@
         const GrFragmentProcessor::TextureSampler& sampler = fp.textureSampler(i);
         const GrTexture* tex = sampler.peekTexture();
         uint32_t samplerKey = sampler_key(
-                tex->texturePriv().textureType(), sampler.swizzle(), tex->config(), caps);
+                tex->texturePriv().textureType(), sampler.swizzle(), caps);
         uint32_t extraSamplerKey = gpu->getExtraSamplerKeyForProgram(
                 sampler.samplerState(), sampler.proxy()->backendFormat());
         if (extraSamplerKey) {
@@ -91,7 +89,7 @@
     for (int i = 0; i < numTextureSamplers; ++i) {
         const GrPrimitiveProcessor::TextureSampler& sampler = pp.textureSampler(i);
         uint32_t samplerKey = sampler_key(
-                sampler.textureType(), sampler.swizzle(), sampler.config(), caps);
+                sampler.textureType(), sampler.swizzle(), caps);
         uint32_t extraSamplerKey = sampler.extraSamplerKey();
         if (extraSamplerKey) {
             // We first mark the normal sampler key with last bit to flag that it has an extra