diff options
author | Greg Daniel <egdaniel@google.com> | 2018-01-16 16:14:41 -0500 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2018-01-17 14:58:26 +0000 |
commit | 94a6ce84ece51ff1c46c698753716f3f47585742 (patch) | |
tree | 6e8354476a3f3cc1a32906aae553813371af1d35 /include/private/GrSurfaceProxy.h | |
parent | 4e6cf91b7e6f7908d941275dc56c829143345402 (diff) |
Add ability for lazy proxy callback to free captured resources
This will be needed for DDLs that get recorded, but then deleted before
the proxies actually get instantiated.
Bug: skia:
Change-Id: I745366fc7a7edbcd43bc617220d3d4997baa8319
Reviewed-on: https://skia-review.googlesource.com/95101
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
Diffstat (limited to 'include/private/GrSurfaceProxy.h')
-rw-r--r-- | include/private/GrSurfaceProxy.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/private/GrSurfaceProxy.h b/include/private/GrSurfaceProxy.h index 5a2a4b536e..cc12fcb010 100644 --- a/include/private/GrSurfaceProxy.h +++ b/include/private/GrSurfaceProxy.h @@ -198,6 +198,10 @@ public: * (Stencil is not supported by this method.) The width and height must either both be greater * than 0 or both less than or equal to zero. A non-positive value is a signal that the width * and height are currently unknown. + * + * When called, the callback must be able to cleanup any resources that it captured at creation. + * It also must support being passed in a null GrResourceProvider. When this happens, the + * callback should cleanup any resources it captured and return an empty sk_sp<GrTextureProxy>. * DDL TODO: remove this entry point */ static sk_sp<GrTextureProxy> MakeLazy(LazyInstantiateCallback&&, const GrSurfaceDesc& desc, |