Rename GrCaps textureSwizzle to readSwizzle.

Change-Id: Ia5e2c4d3ca7346a1ad7559cd158ed632a70145bc
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/260699
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
diff --git a/src/gpu/GrProxyProvider.cpp b/src/gpu/GrProxyProvider.cpp
index 5a7dba3..f4d3f9e 100644
--- a/src/gpu/GrProxyProvider.cpp
+++ b/src/gpu/GrProxyProvider.cpp
@@ -195,14 +195,14 @@
         SkASSERT(!this->findProxyByUniqueKey(tex->getUniqueKey(), origin));
     }
 #endif
-    GrSwizzle texSwizzle = this->caps()->getTextureSwizzle(tex->backendFormat(), colorType);
+    GrSwizzle readSwizzle = this->caps()->getReadSwizzle(tex->backendFormat(), colorType);
 
     if (tex->asRenderTarget()) {
         return sk_sp<GrTextureProxy>(new GrTextureRenderTargetProxy(
-                std::move(tex), origin, texSwizzle, useAllocator));
+                std::move(tex), origin, readSwizzle, useAllocator));
     } else {
         return sk_sp<GrTextureProxy>(
-                new GrTextureProxy(std::move(tex), origin, texSwizzle, useAllocator));
+                new GrTextureProxy(std::move(tex), origin, readSwizzle, useAllocator));
     }
 }
 
@@ -241,7 +241,7 @@
     // createWrapped should've added this for us
     SkASSERT(fUniquelyKeyedProxies.find(key));
     SkASSERT(result->textureSwizzle() ==
-             this->caps()->getTextureSwizzle(result->backendFormat(), colorType));
+             this->caps()->getReadSwizzle(result->backendFormat(), colorType));
     return result;
 }
 
@@ -465,7 +465,7 @@
     GrMipMapsStatus mipMapsStatus = (GrMipMapped::kYes == mipMapped)
             ? GrMipMapsStatus::kDirty
             : GrMipMapsStatus::kNotAllocated;
-    GrSwizzle texSwizzle = caps->getTextureSwizzle(format, colorType);
+    GrSwizzle readSwizzle = caps->getReadSwizzle(format, colorType);
     if (renderable == GrRenderable::kYes) {
         renderTargetSampleCnt =
                 caps->getRenderTargetSampleCount(renderTargetSampleCnt, format);
@@ -474,11 +474,11 @@
         // both texturable and renderable
         return sk_sp<GrTextureProxy>(new GrTextureRenderTargetProxy(
                 *caps, format, copyDesc, renderTargetSampleCnt, origin, mipMapped, mipMapsStatus,
-                texSwizzle, fit, budgeted, isProtected, surfaceFlags, useAllocator));
+                readSwizzle, fit, budgeted, isProtected, surfaceFlags, useAllocator));
     }
 
     return sk_sp<GrTextureProxy>(new GrTextureProxy(format, copyDesc, origin, mipMapped,
-                                                    mipMapsStatus, texSwizzle, fit, budgeted,
+                                                    mipMapsStatus, readSwizzle, fit, budgeted,
                                                     isProtected, surfaceFlags, useAllocator));
 }
 
@@ -561,10 +561,10 @@
     // Make sure we match how we created the proxy with SkBudgeted::kNo
     SkASSERT(GrBudgetedType::kBudgeted != tex->resourcePriv().budgetedType());
 
-    GrSwizzle texSwizzle = caps->getTextureSwizzle(tex->backendFormat(), grColorType);
+    GrSwizzle readSwizzle = caps->getReadSwizzle(tex->backendFormat(), grColorType);
 
     return sk_sp<GrTextureProxy>(
-            new GrTextureProxy(std::move(tex), origin, texSwizzle, UseAllocator::kNo));
+            new GrTextureProxy(std::move(tex), origin, readSwizzle, UseAllocator::kNo));
 }
 
 sk_sp<GrTextureProxy> GrProxyProvider::wrapRenderableBackendTexture(
@@ -608,9 +608,9 @@
     // Make sure we match how we created the proxy with SkBudgeted::kNo
     SkASSERT(GrBudgetedType::kBudgeted != tex->resourcePriv().budgetedType());
 
-    GrSwizzle texSwizzle = caps->getTextureSwizzle(tex->backendFormat(), colorType);
+    GrSwizzle readSwizzle = caps->getReadSwizzle(tex->backendFormat(), colorType);
 
-    return sk_sp<GrTextureProxy>(new GrTextureRenderTargetProxy(std::move(tex), origin, texSwizzle,
+    return sk_sp<GrTextureProxy>(new GrTextureRenderTargetProxy(std::move(tex), origin, readSwizzle,
                                                                 UseAllocator::kNo));
 }
 
@@ -645,9 +645,9 @@
     // Make sure we match how we created the proxy with SkBudgeted::kNo
     SkASSERT(GrBudgetedType::kBudgeted != rt->resourcePriv().budgetedType());
 
-    GrSwizzle texSwizzle = caps->getTextureSwizzle(rt->backendFormat(), grColorType);
+    GrSwizzle readSwizzle = caps->getReadSwizzle(rt->backendFormat(), grColorType);
 
-    return sk_sp<GrRenderTargetProxy>(new GrRenderTargetProxy(std::move(rt), origin, texSwizzle,
+    return sk_sp<GrRenderTargetProxy>(new GrRenderTargetProxy(std::move(rt), origin, readSwizzle,
                                                               UseAllocator::kNo));
 }
 
@@ -678,9 +678,9 @@
     // This proxy should be unbudgeted because we're just wrapping an external resource
     SkASSERT(GrBudgetedType::kBudgeted != rt->resourcePriv().budgetedType());
 
-    GrSwizzle texSwizzle = caps->getTextureSwizzle(rt->backendFormat(), grColorType);
+    GrSwizzle readSwizzle = caps->getReadSwizzle(rt->backendFormat(), grColorType);
 
-    return sk_sp<GrSurfaceProxy>(new GrRenderTargetProxy(std::move(rt), origin, texSwizzle,
+    return sk_sp<GrSurfaceProxy>(new GrRenderTargetProxy(std::move(rt), origin, readSwizzle,
                                                          UseAllocator::kNo));
 }
 
@@ -710,7 +710,7 @@
     SkASSERT(GrBudgetedType::kBudgeted != rt->resourcePriv().budgetedType());
 
     GrColorType colorType = SkColorTypeToGrColorType(imageInfo.colorType());
-    GrSwizzle texSwizzle = this->caps()->getTextureSwizzle(rt->backendFormat(), colorType);
+    GrSwizzle readSwizzle = this->caps()->getReadSwizzle(rt->backendFormat(), colorType);
 
     if (!this->caps()->isFormatAsColorTypeRenderable(colorType, rt->backendFormat(),
                                                      rt->numSamples())) {
@@ -719,7 +719,7 @@
 
     // All Vulkan surfaces uses top left origins.
     return sk_sp<GrRenderTargetProxy>(new GrRenderTargetProxy(
-            std::move(rt), kTopLeft_GrSurfaceOrigin, texSwizzle, UseAllocator::kNo,
+            std::move(rt), kTopLeft_GrSurfaceOrigin, readSwizzle, UseAllocator::kNo,
             GrRenderTargetProxy::WrapsVkSecondaryCB::kYes));
 }
 
@@ -749,7 +749,7 @@
     }
 
     GrColorType colorType = GrPixelConfigToColorType(desc.fConfig);
-    GrSwizzle texSwizzle = this->caps()->getTextureSwizzle(format, colorType);
+    GrSwizzle readSwizzle = this->caps()->getReadSwizzle(format, colorType);
 
     if (renderable == GrRenderable::kYes) {
         return sk_sp<GrTextureProxy>(new GrTextureRenderTargetProxy(*this->caps(),
@@ -760,7 +760,7 @@
                                                                     origin,
                                                                     mipMapped,
                                                                     mipMapsStatus,
-                                                                    texSwizzle,
+                                                                    readSwizzle,
                                                                     fit,
                                                                     budgeted,
                                                                     isProtected,
@@ -773,7 +773,7 @@
                                                         origin,
                                                         mipMapped,
                                                         mipMapsStatus,
-                                                        texSwizzle,
+                                                        readSwizzle,
                                                         fit,
                                                         budgeted,
                                                         isProtected,
@@ -805,7 +805,7 @@
     }
 
     GrColorType colorType = GrPixelConfigToColorType(desc.fConfig);
-    GrSwizzle texSwizzle = this->caps()->getTextureSwizzle(format, colorType);
+    GrSwizzle readSwizzle = this->caps()->getReadSwizzle(format, colorType);
 
     if (textureInfo) {
         // Wrapped vulkan secondary command buffers don't support texturing since we won't have an
@@ -813,7 +813,7 @@
         SkASSERT(!wrapsVkSecondaryCB);
         return sk_sp<GrRenderTargetProxy>(new GrTextureRenderTargetProxy(
                 *this->caps(), std::move(callback), format, desc, sampleCnt, origin,
-                textureInfo->fMipMapped, mipMapsStatus, texSwizzle, fit, budgeted, isProtected,
+                textureInfo->fMipMapped, mipMapsStatus, readSwizzle, fit, budgeted, isProtected,
                 surfaceFlags, useAllocator));
     }
 
@@ -822,7 +822,7 @@
                                : GrRenderTargetProxy::WrapsVkSecondaryCB::kNo;
 
     return sk_sp<GrRenderTargetProxy>(new GrRenderTargetProxy(
-            std::move(callback), format, desc, sampleCnt, origin, texSwizzle, fit, budgeted,
+            std::move(callback), format, desc, sampleCnt, origin, readSwizzle, fit, budgeted,
             isProtected, surfaceFlags, useAllocator, vkSCB));
 }
 
@@ -847,18 +847,18 @@
     desc.fConfig = config;
 
     GrColorType colorType = GrPixelConfigToColorType(desc.fConfig);
-    GrSwizzle texSwizzle = caps.getTextureSwizzle(format, colorType);
+    GrSwizzle readSwizzle = caps.getReadSwizzle(format, colorType);
 
     if (GrRenderable::kYes == renderable) {
         return sk_sp<GrTextureProxy>(new GrTextureRenderTargetProxy(
                 caps, std::move(callback), format, desc, renderTargetSampleCnt, origin,
-                GrMipMapped::kNo, GrMipMapsStatus::kNotAllocated, texSwizzle, SkBackingFit::kApprox,
-                SkBudgeted::kYes, isProtected, surfaceFlags, useAllocator));
+                GrMipMapped::kNo, GrMipMapsStatus::kNotAllocated, readSwizzle,
+                SkBackingFit::kApprox, SkBudgeted::kYes, isProtected, surfaceFlags, useAllocator));
     } else {
         return sk_sp<GrTextureProxy>(new GrTextureProxy(
                 std::move(callback), format, desc, origin, GrMipMapped::kNo,
-                GrMipMapsStatus::kNotAllocated, texSwizzle, SkBackingFit::kApprox, SkBudgeted::kYes,
-                isProtected, surfaceFlags, useAllocator));
+                GrMipMapsStatus::kNotAllocated, readSwizzle, SkBackingFit::kApprox,
+                SkBudgeted::kYes, isProtected, surfaceFlags, useAllocator));
     }
 }