diff options
author | robertphillips <robertphillips@google.com> | 2014-12-01 11:39:59 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-12-01 11:39:59 -0800 |
commit | bc0c4bd9dff5c7be1a0845ef0d5cc3f4faaef5f3 (patch) | |
tree | 9159b4a543ae890784b132883ffe686613c0d49f | |
parent | ca92fbd029518c1fb0f568d21e5a58008923e14f (diff) |
Add additional clean up code in MPD path
This addresses an edge case where a picture only has one layer which is atlasable but doesn't make it into the atlas. In this case asserts can fire since there is no atlased layer to clean up the tracking picture object.
Review URL: https://codereview.chromium.org/764393002
-rw-r--r-- | src/gpu/GrLayerCache.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/gpu/GrLayerCache.cpp b/src/gpu/GrLayerCache.cpp index 5374d115ca..c347512188 100644 --- a/src/gpu/GrLayerCache.cpp +++ b/src/gpu/GrLayerCache.cpp @@ -226,6 +226,11 @@ bool GrLayerCache::tryToAtlas(GrCachedLayer* layer, break; // We weren't able to purge any plots } } + + if (pictInfo->fPlotUsage.isEmpty()) { + fPictureHash.remove(pictInfo->fPictureID); + SkDELETE(pictInfo); + } } return false; |