Disconnect from surface when the RenderSurface object is removed.
When a display is created, SurfaceFlinger creates a DisplayDevice object that handles connecting to the surface. This is done through the RenderSurface class. However, there's no implicit call to disconnect the surface when the DisplayDevice is removed, leaving the surface connected. This prevents the surface from behing able to get connected to to another renderer. This change adds the disconnect call in the destructor of the RenderSurface object to ensure it's disconnected when the renderer is removed. Fixes: 124415123 Test: No longer repro issue in bug Test: VirtualDisplayTest.VirtualDisplayDestroyedSurfaceReuse Test: libsurfaceflinger_unittest Test: libcompositionengine_test Change-Id: I2061e4e66c63f2b46608f599dcb31304ac8e11f5
Loading
Please register or sign in to comment