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

Skip to content
Commit 3c814b50 authored by Riddle Hsu's avatar Riddle Hsu
Browse files

Close HardwareBuffer used by rotation animation

The HardwareBuffer used to rely on garbage collection to release.
Since WMS.H#FROCE_GC is removed for reducing random delay, the
buffer references should be released explicitly after use. Otherwise
the lifetime of the buffer on native side may be too long, because
system may not trigger GC frequently.

Note that setBuffer will add a reference to the buffer. So the
close() can be called right after that.

Bug: 264650822
Test: Rotate screen many times, the number from
      adb shell dmabuf_dump -a | grep 10200 | wc -l
      adb shell dmabuf_dump -b | grep 10240000 | wc -l
      should not keep increasing.
      (10200,10240000 may be different according1020 to screen size)
Change-Id: I39c052ccf8f7ae7a5914532ee61596a336af0993
parent 8e6e692f
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