Check if we should exit high precision timer mode after all requestAnimationFrame callbacks have been processed.

This should make our rendering more efficient (instead of relying on the default timer which keep 1ms precision mode active for up to 90s).
- Lowers CPU usage
- Lowers power consumption
This commit is contained in:
Pale Moon
2017-09-10 12:26:22 +02:00
committed by Roy Tam
parent 13384568eb
commit b2dbcedc91
+3
View File
@@ -1735,6 +1735,9 @@ nsRefreshDriver::Tick(int64_t aNowEpoch, TimeStamp aNowTime)
mPostRefreshObservers[i]->DidRefresh();
}
// Check if we should exit high precision timer mode.
ConfigureHighPrecision();
NS_ASSERTION(mInRefresh, "Still in refresh");
}