Add createTextureProxy function to ProxyProvider that takes an SkImage

Bug: skia:
Change-Id: I46c66dc5b58839596c639b130f19a57cb85529d6
Reviewed-on: https://skia-review.googlesource.com/99700
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
diff --git a/src/gpu/GrProxyProvider.h b/src/gpu/GrProxyProvider.h
index 8ddd61c..0ac7d49 100644
--- a/src/gpu/GrProxyProvider.h
+++ b/src/gpu/GrProxyProvider.h
@@ -18,6 +18,7 @@
 class GrResourceProvider;
 class GrSingleOwner;
 class GrBackendRenderTarget;
+class SkImage;
 
 /*
  * A factory for creating GrSurfaceProxy-derived objects.
@@ -75,6 +76,17 @@
                                              const void* srcData, size_t rowBytes);
 
     /*
+     * Create an un-mipmapped texture proxy with data. The SkImage must be a raster backend image.
+     * Since the SkImage is ref counted, we simply take a ref on it to keep the data alive until we
+     * actually upload the data to the gpu.
+     */
+    sk_sp<GrTextureProxy> createTextureProxy(sk_sp<SkImage> srcImage,
+                                             GrSurfaceFlags flags,
+                                             GrSurfaceOrigin origin,
+                                             int sampleCnt,
+                                             SkBudgeted budgeted);
+
+    /*
      * Create a mipmapped texture proxy with data.
      *
      * @param desc          Description of the texture properties.