Remove GrSurfaceDesc member from GrSurfaceProxy.

Stores the config, origin, and dimensions in GrSurfaceProxy, sample count in GrRenderTargetProxy, and "was constructed with mip maps" in GrTextureProxy.

Change-Id: Iee058674dce49107a991cca9d083cd33e3572809
Reviewed-on: https://skia-review.googlesource.com/17209
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
diff --git a/include/private/GrTextureProxy.h b/include/private/GrTextureProxy.h
index e14e285..342e920 100644
--- a/include/private/GrTextureProxy.h
+++ b/include/private/GrTextureProxy.h
@@ -22,7 +22,13 @@
     const GrTextureProxy* asTextureProxy() const override { return this; }
 
     // Actually instantiate the backing texture, if necessary
-    GrTexture* instantiate(GrResourceProvider*);
+    GrSurface* instantiate(GrResourceProvider*) override;
+    GrTexture* instantiateTexture(GrResourceProvider* resourceProvider) {
+        if (auto surf = this->instantiate(resourceProvider)) {
+            return surf->asTexture();
+        }
+        return nullptr;
+    }
 
     void setMipColorMode(SkDestinationSurfaceColorMode colorMode);
 
@@ -36,6 +42,8 @@
         }
     }
 
+    bool isMipMapped() const { return fIsMipMapped; }
+
 protected:
     friend class GrSurfaceProxy; // for ctors
 
@@ -46,7 +54,9 @@
     GrTextureProxy(sk_sp<GrSurface>);
 
 private:
-    size_t onGpuMemorySize() const override;
+    bool fIsMipMapped;
+
+    size_t onUninstantiatedGpuMemorySize() const override;
 
     // For wrapped proxies the GrTexture pointer is stored in GrIORefProxy.
     // For deferred proxies that pointer will be filled in when we need to instantiate