Pass GrBackendFormat to GrResourceProvider and GrGpu texture create
functions.

Change-Id: Ie3fe9d56fdbf369ccacd0188a3d3d73ce1d30d48
Bug: skia:6718
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/232141
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
diff --git a/src/gpu/ccpr/GrCCClipPath.cpp b/src/gpu/ccpr/GrCCClipPath.cpp
index 922e170..451d545 100644
--- a/src/gpu/ccpr/GrCCClipPath.cpp
+++ b/src/gpu/ccpr/GrCCClipPath.cpp
@@ -18,31 +18,34 @@
         GrCCAtlas::CoverageType atlasCoverageType, const GrCaps& caps) {
     SkASSERT(!this->isInitialized());
 
-    fAtlasLazyProxy = GrCCAtlas::MakeLazyAtlasProxy([this](
-            GrResourceProvider* resourceProvider, GrPixelConfig pixelConfig, int sampleCount) {
-        SkASSERT(fHasAtlas);
-        SkASSERT(!fHasAtlasTransform);
+    fAtlasLazyProxy = GrCCAtlas::MakeLazyAtlasProxy(
+            [this](GrResourceProvider* resourceProvider, GrPixelConfig,
+                   const GrBackendFormat& format, int sampleCount) {
+                SkASSERT(fHasAtlas);
+                SkASSERT(!fHasAtlasTransform);
 
-        GrTextureProxy* textureProxy = fAtlas ? fAtlas->textureProxy() : nullptr;
+                GrTextureProxy* textureProxy = fAtlas ? fAtlas->textureProxy() : nullptr;
 
-        if (!textureProxy || !textureProxy->instantiate(resourceProvider)) {
-            fAtlasScale = fAtlasTranslate = {0, 0};
-            SkDEBUGCODE(fHasAtlasTransform = true);
-            return sk_sp<GrTexture>();
-        }
+                if (!textureProxy || !textureProxy->instantiate(resourceProvider)) {
+                    fAtlasScale = fAtlasTranslate = {0, 0};
+                    SkDEBUGCODE(fHasAtlasTransform = true);
+                    return sk_sp<GrTexture>();
+                }
 
-        sk_sp<GrTexture> texture = sk_ref_sp(textureProxy->peekTexture());
-        SkASSERT(texture);
-        SkASSERT(texture->asRenderTarget()->numSamples() == sampleCount);
-        SkASSERT(textureProxy->origin() == kTopLeft_GrSurfaceOrigin);
+                sk_sp<GrTexture> texture = sk_ref_sp(textureProxy->peekTexture());
+                SkASSERT(texture);
+                SkASSERT(texture->backendFormat() == format);
+                SkASSERT(texture->asRenderTarget()->numSamples() == sampleCount);
+                SkASSERT(textureProxy->origin() == kTopLeft_GrSurfaceOrigin);
 
-        fAtlasScale = {1.f / texture->width(), 1.f / texture->height()};
-        fAtlasTranslate.set(fDevToAtlasOffset.fX * fAtlasScale.x(),
-                            fDevToAtlasOffset.fY * fAtlasScale.y());
-        SkDEBUGCODE(fHasAtlasTransform = true);
+                fAtlasScale = {1.f / texture->width(), 1.f / texture->height()};
+                fAtlasTranslate.set(fDevToAtlasOffset.fX * fAtlasScale.x(),
+                                    fDevToAtlasOffset.fY * fAtlasScale.y());
+                SkDEBUGCODE(fHasAtlasTransform = true);
 
-        return texture;
-    }, atlasCoverageType, caps);
+                return texture;
+            },
+            atlasCoverageType, caps);
 
     fDeviceSpacePath = deviceSpacePath;
     fDeviceSpacePath.getBounds().roundOut(&fPathDevIBounds);