Consolidate GrSurfaceProxy Make methods

I think GrSurfaceDesc is still the most compact way to communicate the deferred GrSurface's settings to the Proxy but this CL, at least, reduces where it is used.

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4559

Change-Id: Ica599c28a5aef1ed4094f47a4ac119e2d204d652
Reviewed-on: https://skia-review.googlesource.com/4559
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
diff --git a/src/gpu/GrTextureProxy.cpp b/src/gpu/GrTextureProxy.cpp
index 5fe43f7..9798747 100644
--- a/src/gpu/GrTextureProxy.cpp
+++ b/src/gpu/GrTextureProxy.cpp
@@ -8,7 +8,6 @@
 #include "GrTextureProxy.h"
 
 #include "GrTextureProvider.h"
-#include "GrTextureRenderTargetProxy.h"
 
 GrTextureProxy::GrTextureProxy(const GrSurfaceDesc& srcDesc, SkBackingFit fit, SkBudgeted budgeted,
                                const void* srcData, size_t /*rowBytes*/)
@@ -16,8 +15,8 @@
     SkASSERT(!srcData);   // currently handled in Make()
 }
 
-GrTextureProxy::GrTextureProxy(sk_sp<GrTexture> tex)
-    : INHERITED(std::move(tex), SkBackingFit::kExact) {
+GrTextureProxy::GrTextureProxy(sk_sp<GrSurface> surf)
+    : INHERITED(std::move(surf), SkBackingFit::kExact) {
 }
 
 GrTexture* GrTextureProxy::instantiate(GrTextureProvider* texProvider) {
@@ -38,32 +37,3 @@
     // TODO: add tracking of mipmap state to improve the estimate
     return GrSurface::ComputeSize(fDesc, 1, kHasMipMaps);
 }
-
-sk_sp<GrTextureProxy> GrTextureProxy::Make(const GrCaps& caps,
-                                           GrTextureProvider* texProvider,
-                                           const GrSurfaceDesc& desc,
-                                           SkBackingFit fit,
-                                           SkBudgeted budgeted,
-                                           const void* srcData,
-                                           size_t rowBytes) {
-    if (srcData) {
-        // If we have srcData, for now, we create a wrapped GrTextureProxy
-        sk_sp<GrTexture> tex(texProvider->createTexture(desc, budgeted, srcData, rowBytes));
-        return GrTextureProxy::Make(std::move(tex));
-    }
-
-    if (desc.fFlags & kRenderTarget_GrSurfaceFlag) {
-        return GrTextureRenderTargetProxy::Make(caps, desc, fit, budgeted);
-    }
-
-    return sk_sp<GrTextureProxy>(new GrTextureProxy(desc, fit, budgeted, nullptr, 0));
-}
-
-sk_sp<GrTextureProxy> GrTextureProxy::Make(sk_sp<GrTexture> tex) {
-    if (tex->asRenderTarget()) {
-        return GrTextureRenderTargetProxy::Make(std::move(tex));
-    }
-
-    // Not renderable
-    return sk_sp<GrTextureProxy>(new GrTextureProxy(std::move(tex)));
-}