viz: Fix leak in GLOutputSurfaceBufferQueue.
This CL fixes a GPU resource leak in the GLOutputSurfaceBufferQueue. Whenever we tell the BufferQueue to free all its buffers, GLOutputSurfaceBufferQueue should delete the corresponding textures and the stencil buffer. This was being done in the case of Reshape(), but not in the case of DidReceiveSwapBuffersAck() with a response of SWAP_NAK_RECREATE_BUFFERS. As a consequence, the underlying buffer was not being freed since there is reference counting in the SharedImage system. An example of this path happens in kukui when the screen is turned off and then on. If this is done many times, eventually too many buffers are allocated and leaked and we run out of memory. /sys/kernel/debug/dri/1/framebuffer Bug: b:149972616, 1054166 Test: turn screen on/off in kukui repeatedly and monitor Change-Id: Idfbd97a470951103e115cc3ecd9e3d2c4c05f6b4 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2093021Reviewed-by:Daniele Castagna <dcastagna@chromium.org> Commit-Queue: Andres Calderon Jaramillo <andrescj@chromium.org> Cr-Commit-Position: refs/heads/master@{#748009}
Showing
Please register or sign in to comment