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

Skip to content
Commit 61dbcfa4 authored by kaiyiz's avatar kaiyiz
Browse files

Workaround for native memory leak during charging animation

There is a path texture cache is HWUI, it is 10M. The texture size is 25*36, format is A8.
So HWUI calculate the size as 25*36 = 900. But actually the buffer in graphic driver is align to 8K(to be check).
And also this battery view draw different path every time, so the cache is not reused, it exhaust the entire 10M path cache .
Say 10M, each cache is 900, then there are 10*1024*1024/900  caches, each cache create a 8K texture buffer in graphics driver ,
so the texture memory is 10*1024*1024/900*8*1024 = 95M. And if the driver compress the texture,
there will be another compress buffer, so the total memory is even higher.

Since this battery icon is so small (25*36), cannot benefit from GPU accelerate. Use CPU is more simple and save power as well.
And this is the save way to fix this issue

Change-Id: Ib41a8e2baa6d7072db05d3ab6f47404b8e1a2964
parent 59ff9325
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment