summaryrefslogtreecommitdiff
path: root/libs/renderengine/RenderEngine.cpp
diff options
context:
space:
mode:
author Marin Shalamanov <shalamanov@google.com> 2020-12-28 18:11:41 +0100
committer Marin Shalamanov <shalamanov@google.com> 2021-01-14 12:43:20 +0100
commit2045d5b2cf7dea797a27f1177be068a69eece96b (patch)
treeaea616387a21d2ea2abfd0546b9348bd19dea93e /libs/renderengine/RenderEngine.cpp
parent35f2d67812362e057cd32ba9e06e594a77095483 (diff)
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
Diffstat (limited to 'libs/renderengine/RenderEngine.cpp')
0 files changed, 0 insertions, 0 deletions