Chrome Version: (M71)
OS: (Win10)
The original code:
UINT interval = first_swap_ || !vsync_enabled_ || allow_tearing_ ? 0 : 1;
Should change to:
UINT interval = first_swap_ || vsync_enabled_ || allow_tearing_ ? 0 : 1;
Definition for interval in IDXGISwapChain1::Present1():
0 - The presentation occurs immediately, there is no synchronization.
1 through 4 - Synchronize presentation after the nth vertical blank.
When vsync is enabled (vsync_enabled_ == 1), we want the presentation occurs after the next vertical blank instead of immediately. Therefore, use vsync_enabled_, not !vsync_enabled_.
Chrome Version: (M71)
OS: (Win10)
The original code:
UINT interval = first_swap_ || !vsync_enabled_ || allow_tearing_ ? 0 : 1;
swap_chain_->Present1(interval, flags, ¶ms)
The new code:
UINT interval = first_swap_ || vsync_enabled_ || allow_tearing_ ? 0 : 1;
IDXGISwapChain1::Present1(interval, flags, ¶ms)
Definition for interval
0 - The presentation occurs immediately, there is no synchronization.
1 through 4 - Synchronize presentation after the nth vertical blank.
When vsync is enabled (vsync_enabled_ == 1), we want the presentation occurs
after the next vertical blank instead of immediately.
It should be vsync_enabled_, not !vsync_enabled_.
Chrome Version: (M71)
OS: (Win10)
The original code:
UINT interval = first_swap_ || !vsync_enabled_ || allow_tearing_ ? 0 : 1;
swap_chain_->Present1(interval, flags, ¶ms)
The new code:
UINT interval = first_swap_ || vsync_enabled_ || allow_tearing_ ? 0 : 1;
IDXGISwapChain1::Present1(interval, flags, ¶ms)
Definition for interval
0 - The presentation occurs immediately, there is no synchronization.
1 through 4 - Synchronize presentation after the nth vertical blank.
When vsync_enabled_ == 0, the presentation should occurs immediately,
When vsync_enabled_ == 1, the presentation should occurs after next vsync.
Summary: Fix a typo in setting interval for swap_chain_->Present1(UINT interval,..) (was: Fix a typo in the logic for setting the interval in swap_chain_->Present1(interval,..))
Comment 1 by magchen@chromium.org
, Sep 13