aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrRenderTargetProxy.cpp
diff options
context:
space:
mode:
authorGravatar Greg Daniel <egdaniel@google.com>2018-02-01 12:21:39 -0500
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2018-02-01 17:24:38 +0000
commit0a375db9a4c1dc96f9d5856526e074ab2802fb0e (patch)
tree1c90864c9dfaa1eaa019fa06e688e620eff58284 /src/gpu/GrRenderTargetProxy.cpp
parent82a4c055d14fe942ab05b7f5d4503fc7b92d4b45 (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/GrRenderTargetProxy.cpp')
-rw-r--r--src/gpu/GrRenderTargetProxy.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/gpu/GrRenderTargetProxy.cpp b/src/gpu/GrRenderTargetProxy.cpp
index d1b77d2354..9eb37a0b2f 100644
--- a/src/gpu/GrRenderTargetProxy.cpp
+++ b/src/gpu/GrRenderTargetProxy.cpp
@@ -61,6 +61,9 @@ int GrRenderTargetProxy::maxWindowRectangles(const GrCaps& caps) const {
}
bool GrRenderTargetProxy::instantiate(GrResourceProvider* resourceProvider) {
+ if (LazyState::kNot != this->lazyInstantiationState()) {
+ return false;
+ }
static constexpr GrSurfaceFlags kFlags = kRenderTarget_GrSurfaceFlag;
if (!this->instantiateImpl(resourceProvider, fSampleCnt, fNeedsStencil, kFlags,