GrShaderCaps always stores config texture swizzles.

Previously the swizzles were all "rgba" when GL texture swizzle was
used. This made it impossible to know the component mapping in that
case from API-neutral code.

Change-Id: I5e55fec87f0de2f8d43d8dc7759125482fccd91c
Bug: skia:8962
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/218280
Commit-Queue: Brian Salomon <bsalomon@google.com>
Auto-Submit: Brian Salomon <bsalomon@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
diff --git a/src/gpu/glsl/GrGLSLProgramBuilder.h b/src/gpu/glsl/GrGLSLProgramBuilder.h
index 5c76439..654dcbb 100644
--- a/src/gpu/glsl/GrGLSLProgramBuilder.h
+++ b/src/gpu/glsl/GrGLSLProgramBuilder.h
@@ -56,7 +56,10 @@
     }
 
     GrSwizzle samplerSwizzle(SamplerHandle handle) const {
-        return this->uniformHandler()->samplerSwizzle(handle);
+        if (this->caps()->shaderCaps()->textureSwizzleAppliedInShader()) {
+            return this->uniformHandler()->samplerSwizzle(handle);
+        }
+        return GrSwizzle::RGBA();
     }
 
     // Used to add a uniform for the RenderTarget width (used for sk_Width) without mangling