Partially defer SkImage_Gpu

One of SkImageCacherator, GrBitmapTextureMaker, GrImageTextureMaker, GrTextureAdjuster, GrTextureProducer or SkImage has to take the first step. This is probably the least odd of the options.

Change-Id: Ie167034553451f4b3633a5a1548dbd4d75839b3d
Reviewed-on: https://skia-review.googlesource.com/9488
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
diff --git a/tools/gpu/GrTest.cpp b/tools/gpu/GrTest.cpp
index fa0556d..15faffa 100644
--- a/tools/gpu/GrTest.cpp
+++ b/tools/gpu/GrTest.cpp
@@ -130,15 +130,9 @@
         return nullptr;
     }
 
-    GrTexture* tex = proxy->instantiate(this->resourceProvider());
-    if (!tex) {
-        return nullptr;
-    }
-
-    // MDB TODO: add proxy-backed SkImage_Gpu's
-    sk_sp<SkImage> image(new SkImage_Gpu(tex->width(), tex->height(),
-                                         kNeedNewImageUniqueID, kPremul_SkAlphaType,
-                                         sk_ref_sp(tex), nullptr, SkBudgeted::kNo));
+    SkASSERT(proxy->priv().isExact());
+    sk_sp<SkImage> image(new SkImage_Gpu(this, kNeedNewImageUniqueID, kPremul_SkAlphaType,
+                                         std::move(proxy), nullptr, SkBudgeted::kNo));
     return image;
 }