-
Notifications
You must be signed in to change notification settings - Fork 1.7k
[Win] Improvements to run loop timer resolution #42936
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Win] Improvements to run loop timer resolution #42936
Conversation
|
EWS run on previous version of this PR (hash 79805fc) |
79805fc to
b8a3e2e
Compare
|
EWS run on previous version of this PR (hash b8a3e2e) |
b8a3e2e to
b9d5665
Compare
|
EWS run on previous version of this PR (hash b9d5665) |
b9d5665 to
9b6d578
Compare
|
EWS run on previous version of this PR (hash 9b6d578) |
9b6d578 to
ea2075e
Compare
|
EWS run on current version of this PR (hash ea2075e) |
https://bugs.webkit.org/show_bug.cgi?id=284823 Reviewed by Yusuke Suzuki. WM_TIMER has a 10ms resolution, which means we can't hit 60fps on requestAnimationFrame. By using MsgWaitForMultipleObjectsEx and maintaining our own timer queue we can get better timer resolution. * Source/WTF/wtf/RunLoop.h: * Source/WTF/wtf/win/RunLoopWin.cpp: (WTF::RunLoop::wndProc): (WTF::RunLoop::run): (WTF::RunLoop::msTillNextTimer): (WTF::RunLoop::fireTimers): (WTF::RunLoop::cycle): (WTF::RunLoop::TimerBase::timerFired): (WTF::RunLoop::TimerBase::start): (WTF::RunLoop::TimerBase::stop): Canonical link: https://commits.webkit.org/292846@main
ea2075e to
70d5b92
Compare
|
Committed 292846@main (70d5b92): https://commits.webkit.org/292846@main Reviewed commits have been landed. Closing PR #42936 and removing active labels. |
|
Unfortenately, this change made layout tests crashy. Even though EWS actually catched a crash, but not reported it with a red bubble. I'm going to revert this change temporarily. Will take a look next week. |
| if (m_liveTimers.contains(wParam)) | ||
| timer = std::bit_cast<RunLoop::TimerBase*>(wParam); | ||
| } | ||
| timer = std::bit_cast<RunLoop::TimerBase*>(wParam); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
timer can be already destroyed here. I fixed it in #43244
🧪 bindings
70d5b92
ea2075e
🧪 mac-AS-debug-wk2🧪 vision-wk2