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
Loading
Please register or sign in to comment