diff options
| author | 2021-12-21 07:41:57 +0100 | |
|---|---|---|
| committer | 2022-01-19 10:08:47 +0100 | |
| commit | d9e54691c35c715c096d25e656911f818e1fb706 (patch) | |
| tree | 88d9b4d58ccd86028c091ee90dca4b8bf5ed463c /services/surfaceflinger/SurfaceFlinger.cpp | |
| parent | dd63c88f4e64cae2b7c6bfc73e7f3135266e7a9c (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.cpp | 1 |
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; } |