Fix leaking OffscreenSurface objects
SkiaRenderer was failing to delete OffscreenSurface objects corresponding to RenderPasses that are drawn to texture because of a CopyOutputRequest but not embedded in another RenderPass. No ImageContextImpl would be created but an OffscreenSurface would be. In SkiaOutputSurfaceImpl::RemoveRenderPassResources() it ignores RenderPassIds with no corresponding ImageContextImpl. This caused a memory leak for the lifetime of the SkiaOutputSurfaceImpl unless another RenderPass with the same ID was created later. It also likely caused some size mismatches if another RenderPass with the same ID but a different size was created later. Bug: 1043676 Change-Id: I3dea76bc20171146814bf47b2fc3d3ded40f8fd1 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2067332 Commit-Queue: kylechar <kylechar@chromium.org> Reviewed-by:Vasiliy Telezhnikov <vasilyt@chromium.org> Cr-Commit-Position: refs/heads/master@{#743350}
Showing
Please register or sign in to comment