Switch from querying swizzle on caps to using swizzles stored on proxies.

Change-Id: I03f4a3affd6dda7a83bee8eec768dcaa93a6b801
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/220534
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
diff --git a/src/gpu/ops/GrQuadPerEdgeAA.cpp b/src/gpu/ops/GrQuadPerEdgeAA.cpp
index 9bb9a85..5b22fc2 100644
--- a/src/gpu/ops/GrQuadPerEdgeAA.cpp
+++ b/src/gpu/ops/GrQuadPerEdgeAA.cpp
@@ -858,11 +858,11 @@
     static sk_sp<GrGeometryProcessor> Make(const VertexSpec& vertexSpec, const GrShaderCaps& caps,
                                            GrTextureType textureType, GrPixelConfig textureConfig,
                                            const GrSamplerState& samplerState,
-                                           uint32_t extraSamplerKey,
+                                           const GrSwizzle& swizzle, uint32_t extraSamplerKey,
                                            sk_sp<GrColorSpaceXform> textureColorSpaceXform) {
         return sk_sp<QuadPerEdgeAAGeometryProcessor>(new QuadPerEdgeAAGeometryProcessor(
-                vertexSpec, caps, textureType, textureConfig, samplerState, extraSamplerKey,
-                std::move(textureColorSpaceXform)));
+                vertexSpec, caps, textureType, textureConfig, samplerState, swizzle,
+                extraSamplerKey, std::move(textureColorSpaceXform)));
     }
 
     const char* name() const override { return "QuadPerEdgeAAGeometryProcessor"; }
@@ -1053,11 +1053,12 @@
     QuadPerEdgeAAGeometryProcessor(const VertexSpec& spec, const GrShaderCaps& caps,
                                    GrTextureType textureType, GrPixelConfig textureConfig,
                                    const GrSamplerState& samplerState,
+                                   const GrSwizzle& swizzle,
                                    uint32_t extraSamplerKey,
                                    sk_sp<GrColorSpaceXform> textureColorSpaceXform)
             : INHERITED(kQuadPerEdgeAAGeometryProcessor_ClassID)
             , fTextureColorSpaceXform(std::move(textureColorSpaceXform))
-            , fSampler(textureType, textureConfig, samplerState, extraSamplerKey) {
+            , fSampler(textureType, textureConfig, samplerState, swizzle, extraSamplerKey) {
         SkASSERT(spec.hasLocalCoords());
         this->initializeAttrs(spec);
         this->setTextureSamplerCnt(1);
@@ -1136,10 +1137,10 @@
 
 sk_sp<GrGeometryProcessor> MakeTexturedProcessor(const VertexSpec& spec, const GrShaderCaps& caps,
         GrTextureType textureType, GrPixelConfig textureConfig,
-        const GrSamplerState& samplerState, uint32_t extraSamplerKey,
+        const GrSamplerState& samplerState, const GrSwizzle& swizzle, uint32_t extraSamplerKey,
         sk_sp<GrColorSpaceXform> textureColorSpaceXform) {
     return QuadPerEdgeAAGeometryProcessor::Make(spec, caps, textureType, textureConfig,
-                                                samplerState, extraSamplerKey,
+                                                samplerState, swizzle, extraSamplerKey,
                                                 std::move(textureColorSpaceXform));
 }