diff options
author | Greg Daniel <egdaniel@google.com> | 2018-02-01 12:21:39 -0500 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2018-02-01 17:24:38 +0000 |
commit | 0a375db9a4c1dc96f9d5856526e074ab2802fb0e (patch) | |
tree | 1c90864c9dfaa1eaa019fa06e688e620eff58284 /src/gpu/GrTextureRenderTargetProxy.cpp | |
parent | 82a4c055d14fe942ab05b7f5d4503fc7b92d4b45 (diff) |
Have lazy proxies keep their callbacks around and clean up their lambdas in the dtor
I believe after this CL we will be at a place where we just have to null out the
fTarget of a lazy proxy and it will reinstantiate itself.
Bug: skia:
Change-Id: I88fdc70e149eba4514a0823da99383583394005c
Reviewed-on: https://skia-review.googlesource.com/102021
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 | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/gpu/GrTextureRenderTargetProxy.cpp b/src/gpu/GrTextureRenderTargetProxy.cpp index fe12a0a975..da8e48307d 100644 --- a/src/gpu/GrTextureRenderTargetProxy.cpp +++ b/src/gpu/GrTextureRenderTargetProxy.cpp @@ -61,6 +61,9 @@ size_t GrTextureRenderTargetProxy::onUninstantiatedGpuMemorySize() const { } bool GrTextureRenderTargetProxy::instantiate(GrResourceProvider* resourceProvider) { + if (LazyState::kNot != this->lazyInstantiationState()) { + return false; + } static constexpr GrSurfaceFlags kFlags = kRenderTarget_GrSurfaceFlag; const GrUniqueKey& key = this->getUniqueKey(); |