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>
diff --git a/include/private/GrSurfaceProxy.h b/include/private/GrSurfaceProxy.h
index 5fef077..d05d3ad 100644
--- a/include/private/GrSurfaceProxy.h
+++ b/include/private/GrSurfaceProxy.h
@@ -183,13 +183,13 @@
 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) {