diff options
author | Greg Daniel <egdaniel@google.com> | 2018-02-08 15:05:44 -0500 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2018-02-08 20:33:40 +0000 |
commit | 457469c7a0c879b9d8ff8ed9fabe3f3dcab06097 (patch) | |
tree | 92ef5dcb793bbe9406730b1576c51bcc6042b86c /src/gpu/GrTextureRenderTargetProxy.cpp | |
parent | 5635631c8887db678e6123c191ae68456b60d2a7 (diff) |
Make non-ddl lazy proxys clean-up and delete their callbacks immediately after instanstation.
This makes sure resources are released and free'd as soon as possible if we
no longer need them.
Bug: skia:
Change-Id: Ic216987649c54183f8cbbff90a633860a97754b3
Reviewed-on: https://skia-review.googlesource.com/105721
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Diffstat (limited to 'src/gpu/GrTextureRenderTargetProxy.cpp')
-rw-r--r-- | src/gpu/GrTextureRenderTargetProxy.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/gpu/GrTextureRenderTargetProxy.cpp b/src/gpu/GrTextureRenderTargetProxy.cpp index 3312077236..b4889faa57 100644 --- a/src/gpu/GrTextureRenderTargetProxy.cpp +++ b/src/gpu/GrTextureRenderTargetProxy.cpp @@ -29,16 +29,17 @@ GrTextureRenderTargetProxy::GrTextureRenderTargetProxy(const GrCaps& caps, // Lazy-callback version GrTextureRenderTargetProxy::GrTextureRenderTargetProxy(LazyInstantiateCallback&& callback, + LazyInstantiationType lazyType, const GrSurfaceDesc& desc, GrMipMapped mipMapped, SkBackingFit fit, SkBudgeted budgeted, uint32_t flags) - : GrSurfaceProxy(std::move(callback), desc, fit, budgeted, flags) + : GrSurfaceProxy(std::move(callback), lazyType, desc, fit, budgeted, flags) // Since we have virtual inheritance, we initialize GrSurfaceProxy directly. Send null // callbacks to the texture and RT proxies simply to route to the appropriate constructors. - , GrTextureProxy(LazyInstantiateCallback(), desc, mipMapped, fit, budgeted, flags) - , GrRenderTargetProxy(LazyInstantiateCallback(), desc, fit, budgeted, flags) { + , GrTextureProxy(LazyInstantiateCallback(), lazyType, desc, mipMapped, fit, budgeted, flags) + , GrRenderTargetProxy(LazyInstantiateCallback(), lazyType, desc, fit, budgeted, flags) { } // Wrapped version |