Move GrMakeCachedBitmapProxy work in lazy mode

This basically wraps the bitmap in an SkImage and uses the GrMakeCachedImageProxy
call to create the proxy.

Bug: skia:
Change-Id: I648a9cac3a316231bfb1bcedaae2009b7de0356c
Reviewed-on: https://skia-review.googlesource.com/105360
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
diff --git a/src/gpu/GrProxyProvider.cpp b/src/gpu/GrProxyProvider.cpp
index b73d9244..0076a1a 100644
--- a/src/gpu/GrProxyProvider.cpp
+++ b/src/gpu/GrProxyProvider.cpp
@@ -341,8 +341,8 @@
     // In non-ddl we will always instantiate right away. Thus we never want to copy the SkBitmap
     // even if its mutable. In ddl, if the bitmap is mutable then we must make a copy since the
     // upload of the data to the gpu can happen at anytime and the bitmap may change by then.
-    SkCopyPixelsMode copyMode = fResourceProvider ? kNever_SkCopyPixelsMode
-                                                  : kIfMutable_SkCopyPixelsMode;
+    SkCopyPixelsMode copyMode = this->mutableBitmapsNeedCopy() ? kIfMutable_SkCopyPixelsMode
+                                                               : kNever_SkCopyPixelsMode;
     sk_sp<SkImage> baseLevel = SkMakeImageFromRasterBitmap(bitmap, copyMode);
 
     if (!baseLevel) {