Incorporate sample count into RTC fallback color type.

Formats can be renderable but not support MSAA.

Change-Id: I33fd295cce0b4b11a0c132c40a85fc7a7d4973b5
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/281477
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
diff --git a/src/gpu/GrProxyProvider.cpp b/src/gpu/GrProxyProvider.cpp
index 1fa39c4..60ada6c 100644
--- a/src/gpu/GrProxyProvider.cpp
+++ b/src/gpu/GrProxyProvider.cpp
@@ -232,7 +232,8 @@
 
 GrSurfaceProxyView GrProxyProvider::findCachedProxyWithColorTypeFallback(const GrUniqueKey& key,
                                                                          GrSurfaceOrigin origin,
-                                                                         GrColorType ct) {
+                                                                         GrColorType ct,
+                                                                         int sampleCnt) {
     auto proxy = this->findOrCreateProxyByUniqueKey(key);
     if (!proxy) {
         return {};
@@ -241,7 +242,7 @@
     if (proxy->asRenderTargetProxy()) {
         GrBackendFormat expectedFormat;
         std::tie(ct, expectedFormat) =
-                GrRenderTargetContext::GetFallbackColorTypeAndFormat(fImageContext, ct);
+                GrRenderTargetContext::GetFallbackColorTypeAndFormat(fImageContext, ct, sampleCnt);
         SkASSERT(expectedFormat == proxy->backendFormat());
     }
     GrSwizzle swizzle = fImageContext->priv().caps()->getReadSwizzle(proxy->backendFormat(), ct);