diff options
author | Greg Daniel <egdaniel@google.com> | 2018-02-08 09:15:33 -0500 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2018-02-08 15:03:54 +0000 |
commit | 7e1912a8ab48134eb3a631f188ad8aa262e8eaa0 (patch) | |
tree | 4340aad809ff02d1cacb88b57c9b941611c106a3 /src/gpu/GrProxyProvider.h | |
parent | aee01c298519c9d08d7cc13fd7c4264d01f8630e (diff) |
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>
Diffstat (limited to 'src/gpu/GrProxyProvider.h')
-rw-r--r-- | src/gpu/GrProxyProvider.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/gpu/GrProxyProvider.h b/src/gpu/GrProxyProvider.h index aa1d991fae..af661c1f4d 100644 --- a/src/gpu/GrProxyProvider.h +++ b/src/gpu/GrProxyProvider.h @@ -228,6 +228,12 @@ public: 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 |