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

Skip to content
Commit 0cc8a385 authored by Arthur Hung's avatar Arthur Hung Committed by Tony Huang
Browse files

SF: Suppress frame rate when small area updating

The small area is defined as the area that user is hard to obvious the
content updating such as small icon animtion or progress bar.

When content detect frame rate feature is enabled, and no explict
refresh vote is set to the layer, it will heuristically calculate the
predict frame rate by counting the average frame time of recent frames.

This CL will enhance the contect detection by checking the small dirty
frames and supress the predict frame rate that could prevent the app
always running at max frame rate cause unexcpected battery consumption.

This will cover 2 use cases:
1. When a layer contains a textureview, it will enter the heuristic
   calcuation, and this would skip the small dirty frames and supress
   the calculated frame rate not always to be max.

2. When an app has the separated video surface and ui surface, and the
   video had set an explicit rate by the content, this will ignore the
   heristic calculation for ui layer when it detected the small dirty
   frames, so the final refresh rate selection could mainly rely on the
   weight of the video layer.

Bug: 281720315
Test: atest LayerHistoryTest
Merged-In: I9731de8adf8e68b72326b195fa720d51e02bae74
Change-Id: I9731de8adf8e68b72326b195fa720d51e02bae74
parent 19603058
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