forked from Pissandshittium/pissandshittium
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
D3D V-sync: prevent timestamp drift on a secondary monitor
I got back some preliminary UMA data from Canary experiment that confirm the timestamp drift relative to the timing of v-sync signal which makes BeginImplFrameLatency2 UMA to be all over the place with a distribution that is spread evenly in the entire 0 - 16667 range. This happens because D3D V-sync signal is generated based on v-blank event for a display that contains contains the window (the current display), but the timestamp is obtained from DWM which is based on the most recent v-blank timing for the primary monitor. So if a secondary monitor frequency is even slightly different that causes v-sync / RAF timestamp drift that is clearly visible on some websites like vsynctester.com. One possible solution is to capture the timestamp when v-blank event is received, but that seems to be a bit less smooth than the DWM timestamp. So the compromise is to use DWM timing only when running on a primary monitor; otherwise use the v-blank wake-up timestamp. I've verified that this fixes BeginImplFrameLatency2 UMA distribution on my setup where the secondary monitor refresh rate seems to differ from the primary monitor by about 0.15 Hz. BUG=467617,680639 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.android:android_optional_gpu_tests_rel;master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel Review-Url: https://codereview.chromium.org/2874833003 Cr-Commit-Position: refs/heads/master@{#472279}
- Loading branch information
stanisc
authored and
Commit bot
committed
May 17, 2017
1 parent
5e6a740
commit 873b91f
Showing
2 changed files
with
151 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters