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

Skip to content
Commit 487fc020 authored by Shane's avatar Shane
Browse files

Fix frame rate idleness and TextureView video play logic

Previously we check whether setFrameRateCategoy is called to detect idleness. However, if the frame rate cateogry remain the same when View are invalided, setFrameRateCategoy will not be called. Therefore, moving the logic to votePreferredFrameRate and votePreferredFrameRateCategory. Also, increase the timeout for revaluating idleness from 500 ms to 1000 ms.

Morever, update video play logic in TextureView to do the following:
1. Store the last 3 invalidates time - FT1, FT2, FT3.
2. If FT2-FT1 > 15ms && FT3-FT2 > 15ms -> vote for NORMAL category

Also, don't take the too frequent invalidation (interval between 2 ms)
into account when determining whether it's a infrequent or frequent
update.

Bug: 322398850
Test: atest ViewRootImplTest
Change-Id: I6181f8d25dcd0922cbc2921d1e2972ce347e8028
parent b24bcc88
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