Skip to content
Commit 162f78c8 authored by Naomi Musgrave's avatar Naomi Musgrave
Browse files

[MediaProjection] Immediately clean up mirrored surface.

When MediaProjection is stopped, the VirtualDisplay used to capture
content is released. This triggers DisplayContent#remove, for the
DisplayContent associated with that VirtualDisplay.

Clean up the mirrored surface if the DisplayContent is used for
layer mirroring, to prevent an eventual out of memory error
when MediaProjection is started/stopped several times, and the
garbage collection has not yet cleared up unusued surfaces. Note
the surfaces would be removed eventually, since they no longer
have a reference.

Bug: 197576836
Test: manual
Change-Id: Ic28c0b3deeb1c332c36feaf661342c68c28db192
parent 0e08f813
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment