diff options
author | 2018-02-01 12:21:39 -0500 | |
---|---|---|
committer | 2018-02-01 17:24:38 +0000 | |
commit | 0a375db9a4c1dc96f9d5856526e074ab2802fb0e (patch) | |
tree | 1c90864c9dfaa1eaa019fa06e688e620eff58284 /include/private | |
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 'include/private')
-rw-r--r-- | include/private/GrSurfaceProxy.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/private/GrSurfaceProxy.h b/include/private/GrSurfaceProxy.h index 5fef077088..d05d3ad1cb 100644 --- a/include/private/GrSurfaceProxy.h +++ b/include/private/GrSurfaceProxy.h @@ -183,13 +183,13 @@ private: class GrSurfaceProxy : public GrIORefProxy { public: enum class LazyState { - kNot, // The proxy has no lazy callback that must be made. + kNot, // The proxy is instantiated or does not have a lazy callback kPartially, // The proxy has a lazy callback but knows basic information about itself. kFully, // The proxy has a lazy callback and also doesn't know its width, height, etc. }; LazyState lazyInstantiationState() const { - if (!SkToBool(fLazyInstantiateCallback)) { + if (fTarget || !SkToBool(fLazyInstantiateCallback)) { return LazyState::kNot; } else { if (fWidth <= 0) { |