commit | 94a6ce84ece51ff1c46c698753716f3f47585742 | [log] [tgz] |
---|---|---|
author | Greg Daniel <egdaniel@google.com> | Tue Jan 16 16:14:41 2018 -0500 |
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | Wed Jan 17 14:58:26 2018 +0000 |
tree | 6e8354476a3f3cc1a32906aae553813371af1d35 | |
parent | 4e6cf91b7e6f7908d941275dc56c829143345402 [diff] [blame] |
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);