From d9e54691c35c715c096d25e656911f818e1fb706 Mon Sep 17 00:00:00 2001 From: Lars Svensson Date: Tue, 21 Dec 2021 07:41:57 +0100 Subject: Ensure deferred cleanup when display is off Using DRM video playback app and wi-fi direct, allocation of AutoBackendTexture objects sometimes continue for some time after the display is off. Clean-up of these is deferred until postRender() is called, but only invoked if the display is on. This eventually leads to depletion of secure memory resources and a fatal assert. This ensures cleanupPostRender() is called regardless of display state. Test: Play Movies with screen mirroring, repeatedly sleep/wake device Change-Id: Ib0d530582e124984ef70f91f6e398f62c2312f4c --- services/surfaceflinger/SurfaceFlinger.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'services/surfaceflinger/SurfaceFlinger.cpp') diff --git a/services/surfaceflinger/SurfaceFlinger.cpp b/services/surfaceflinger/SurfaceFlinger.cpp index fabb3fea5d..893dc2a5d2 100644 --- a/services/surfaceflinger/SurfaceFlinger.cpp +++ b/services/surfaceflinger/SurfaceFlinger.cpp @@ -2410,6 +2410,7 @@ void SurfaceFlinger::postComposition() { mTimeStats->recordDisplayEventConnectionCount(sfConnections + appConnections); if (isDisplayConnected && !display->isPoweredOn()) { + getRenderEngine().cleanupPostRender(); return; } -- cgit v1.2.3-59-g8ed1b