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
This commit is contained in:
parent
ca92fbd029
commit
bc0c4bd9df
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user