Add ability for lazy proxy callback to free captured resources

This will be needed for DDLs that get recorded, but then deleted before
the proxies actually get instantiated.

Bug: skia:
Change-Id: I745366fc7a7edbcd43bc617220d3d4997baa8319
Reviewed-on: https://skia-review.googlesource.com/95101
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
diff --git a/src/gpu/ccpr/GrCoverageCountingPathRenderer.cpp b/src/gpu/ccpr/GrCoverageCountingPathRenderer.cpp
index 67098cc..1e0bb29 100644
--- a/src/gpu/ccpr/GrCoverageCountingPathRenderer.cpp
+++ b/src/gpu/ccpr/GrCoverageCountingPathRenderer.cpp
@@ -227,6 +227,9 @@
 
     fAtlasLazyProxy = GrSurfaceProxy::MakeFullyLazy(
             [this](GrResourceProvider* resourceProvider, GrSurfaceOrigin* outOrigin) {
+                if (!resourceProvider) {
+                    return sk_sp<GrTexture>();
+                }
                 SkASSERT(fHasAtlas);
                 SkASSERT(!fHasAtlasTransform);