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

Skip to content
Commit 2045d5b2 authored by Marin Shalamanov's avatar Marin Shalamanov
Browse files

SF: Improve LayerInfo::calculateAverageFrameTime

This refactors and improves LayerInfo::calculateAverageFrameTime.
The behaviour is changed in two ways:

 * if two consecutive frames are too close to each other we count
   them as one frame and consider the delta between them in
   the total. This gives a better estimation for the average
   refresh rate. See CalculateAverageFrameTimeTest::ignoresSmallPeriods
   which was failing with the previous implementation.

 * if two consecutive frames are too far apart we discard the delta
   between them. This is covered by the test "ignoresLargePeriods".

Fixes: 170476958
Test: atest CalculateAverageFrameTimeTest
Change-Id: If98199bb8198f74c93e93c9996107c021f1bc7ba
parent 35f2d678
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