windows: Use DwmFlush() to trigger vsync event (#11731)
Currently , on Windows 10, we used a `Timer` to trigger the vsync event, but the `Timer`'s time precision is only about 15ms, which means a maximum of 60FPS. This PR introduces a new function to allow for higher frame rates on Windows 10. And after reading the codes, I found that zed triggers a draw after handling mouse or keyboard events, so we don't need to call draw again when we handle `WM_*` messages. Therefore, I removed the `invalidate_client_area` function. Release Notes: - N/A
This commit is contained in:
+1
-1
@@ -402,11 +402,11 @@ features = [
|
||||
"Win32_Graphics_Direct2D",
|
||||
"Win32_Graphics_Direct2D_Common",
|
||||
"Win32_Graphics_DirectWrite",
|
||||
"Win32_Graphics_Dwm",
|
||||
"Win32_Graphics_Dxgi_Common",
|
||||
"Win32_Graphics_Gdi",
|
||||
"Win32_Graphics_Imaging",
|
||||
"Win32_Graphics_Imaging_D2D",
|
||||
"Win32_Media",
|
||||
"Win32_Security",
|
||||
"Win32_Security_Credentials",
|
||||
"Win32_Storage_FileSystem",
|
||||
|
||||
Reference in New Issue
Block a user