Pass size and GrPixelConfig to GrSurface/Texture/RenderTarget constructors

Change-Id: I4421354453a22a0a2853fc3cd64199f76b70c9f2
Bug: skia:6718
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/232556
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Auto-Submit: Brian Salomon <bsalomon@google.com>
diff --git a/src/gpu/mock/GrMockTexture.h b/src/gpu/mock/GrMockTexture.h
index 7406ced..5061f2b 100644
--- a/src/gpu/mock/GrMockTexture.h
+++ b/src/gpu/mock/GrMockTexture.h
@@ -51,8 +51,9 @@
     // constructor for subclasses
     GrMockTexture(GrMockGpu* gpu, const GrSurfaceDesc& desc, GrProtected isProtected,
                   GrMipMapsStatus mipMapsStatus, const GrMockTextureInfo& info)
-            : GrSurface(gpu, desc, isProtected)
-            , INHERITED(gpu, desc, isProtected, GrTextureType::k2D, mipMapsStatus)
+            : GrSurface(gpu, {desc.fWidth, desc.fHeight}, desc.fConfig, isProtected)
+            , INHERITED(gpu, {desc.fWidth, desc.fHeight}, desc.fConfig, isProtected,
+                        GrTextureType::k2D, mipMapsStatus)
             , fInfo(info) {}
 
     void onRelease() override {
@@ -77,8 +78,8 @@
 public:
     GrMockRenderTarget(GrMockGpu* gpu, SkBudgeted budgeted, const GrSurfaceDesc& desc,
                        int sampleCnt, GrProtected isProtected, const GrMockRenderTargetInfo& info)
-            : GrSurface(gpu, desc, isProtected)
-            , INHERITED(gpu, desc, sampleCnt, isProtected)
+            : GrSurface(gpu, {desc.fWidth, desc.fHeight}, desc.fConfig, isProtected)
+            , INHERITED(gpu, {desc.fWidth, desc.fHeight}, desc.fConfig, sampleCnt, isProtected)
             , fInfo(info) {
         this->registerWithCache(budgeted);
     }
@@ -86,8 +87,8 @@
     enum Wrapped { kWrapped };
     GrMockRenderTarget(GrMockGpu* gpu, Wrapped, const GrSurfaceDesc& desc, int sampleCnt,
                        GrProtected isProtected, const GrMockRenderTargetInfo& info)
-            : GrSurface(gpu, desc, isProtected)
-            , INHERITED(gpu, desc, sampleCnt, isProtected)
+            : GrSurface(gpu, {desc.fWidth, desc.fHeight}, desc.fConfig, isProtected)
+            , INHERITED(gpu, {desc.fWidth, desc.fHeight}, desc.fConfig, sampleCnt, isProtected)
             , fInfo(info) {
         this->registerWithCacheWrapped(GrWrapCacheable::kNo);
     }
@@ -122,8 +123,8 @@
     // constructor for subclasses
     GrMockRenderTarget(GrMockGpu* gpu, const GrSurfaceDesc& desc, int sampleCnt,
                        GrProtected isProtected, const GrMockRenderTargetInfo& info)
-            : GrSurface(gpu, desc, isProtected)
-            , INHERITED(gpu, desc, sampleCnt, isProtected)
+            : GrSurface(gpu, {desc.fWidth, desc.fHeight}, desc.fConfig, isProtected)
+            , INHERITED(gpu, {desc.fWidth, desc.fHeight}, desc.fConfig, sampleCnt, isProtected)
             , fInfo(info) {}
 
 private:
@@ -139,7 +140,7 @@
                               int sampleCnt, GrProtected isProtected, GrMipMapsStatus mipMapsStatus,
                               const GrMockTextureInfo& texInfo,
                               const GrMockRenderTargetInfo& rtInfo)
-            : GrSurface(gpu, desc, isProtected)
+            : GrSurface(gpu, {desc.fWidth, desc.fHeight}, desc.fConfig, isProtected)
             , GrMockTexture(gpu, desc, isProtected, mipMapsStatus, texInfo)
             , GrMockRenderTarget(gpu, desc, sampleCnt, isProtected, rtInfo) {
         this->registerWithCache(budgeted);
@@ -150,7 +151,7 @@
                               GrProtected isProtected, GrMipMapsStatus mipMapsStatus,
                               const GrMockTextureInfo& texInfo,
                               const GrMockRenderTargetInfo& rtInfo, GrWrapCacheable cacheble)
-            : GrSurface(gpu, desc, isProtected)
+            : GrSurface(gpu, {desc.fWidth, desc.fHeight}, desc.fConfig, isProtected)
             , GrMockTexture(gpu, desc, isProtected, mipMapsStatus, texInfo)
             , GrMockRenderTarget(gpu, desc, sampleCnt, isProtected, rtInfo) {
         this->registerWithCacheWrapped(cacheble);