Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 1684c708 authored by Alec Mouri's avatar Alec Mouri
Browse files

Only cache framebuffers for internal displays for drawLayers.

Currently SkiaGlRenderEngine leaks memory when virtual displays are
created and destroyed because their output buffers are cached into a
texture and then never evicted.

The simplest workaround which is implemented in this patch is to never
cache framebuffers for virtual displays; we only cache when driving
internal displays.

On phones, there is usually one primary internal display and that
display is never destroyed, so this assumption is safe for the majority
of phone form factors. In the very near future we should remove this
assumption by changing the RenderEngine interface to take in a struct
that manages GPU textures on creation and destruction so that
SurfaceFlinger can maintain its own cached set, but that change is
longer than a few lines of code, which motivates this patch.

Bug: 178539829
Test: builds, boots
Change-Id: I8e501d297090b6f5056a0b0ead598f85bb4b9f07
parent e5d7b701
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment