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.h b/src/gpu/GrProxyProvider.h
index aa1d991..af661c1 100644
--- a/src/gpu/GrProxyProvider.h
+++ b/src/gpu/GrProxyProvider.h
@@ -228,6 +228,12 @@
void removeAllUniqueKeys();
+ /**
+ * Helper function for callers who are wrapping a bitmap into an SkImage so they know whether or
+ * not that bitmap should be copied or not.
+ */
+ bool mutableBitmapsNeedCopy() const { return !SkToBool(fResourceProvider); }
+
private:
friend class GrAHardwareBufferImageGenerator; // for createWrapped