summaryrefslogtreecommitdiff
path: root/services/surfaceflinger/SurfaceFlinger.cpp
diff options
context:
space:
mode:
author Lars Svensson <lars.svensson@sony.com> 2021-12-21 07:41:57 +0100
committer Snild Dolkow <snild@sony.com> 2022-01-19 10:08:47 +0100
commitd9e54691c35c715c096d25e656911f818e1fb706 (patch)
tree88d9b4d58ccd86028c091ee90dca4b8bf5ed463c /services/surfaceflinger/SurfaceFlinger.cpp
parentdd63c88f4e64cae2b7c6bfc73e7f3135266e7a9c (diff)
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
Diffstat (limited to 'services/surfaceflinger/SurfaceFlinger.cpp')
-rw-r--r--services/surfaceflinger/SurfaceFlinger.cpp1
1 files changed, 1 insertions, 0 deletions
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;
}