DescriptionFix logic on high Windows resolution timer and have
two possible period values for timeBeginPeriod and timeEndPeriod.
Currently while on battery we disable calls to timeBeginPeriod
which make the windows timers have 15ms resolution.
This change makes it so when EnableHighResolutionTimer(true) which
is on AC power the timer is 1ms and EnableHighResolutionTimer(false)
is 4ms.
This should provide significant power savings while meeting some
timer resolution requirements needed by the GPU compositor.
But also this CL fixes the following:
EnableHighResolutionTimer() and ActivateHighResolutionTimer() are
pretty broken. This CL fixes most issues:
1- The existing logic fails to account that EnableHighResolutionTimer
can be called while the browser is running
2- All related functions need to be thread safe.
3- ActivateHighResolutionTimer was buggy.
BUG=153139
Committed: https://crrev.com/be8f40e67f300e9452cfabb3ad594d907cfaa947
Cr-Commit-Position: refs/heads/master@{#292094}
Patch Set 1 #
Total comments: 2
Patch Set 2 : lock fixes and utest #
Total comments: 3
Patch Set 3 : nits and leaky singleton #
Messages
Total messages: 12 (0 generated)
|