-
Notifications
You must be signed in to change notification settings - Fork 6k
Listen for Vsync callback on the UI thread directly #29889
Listen for Vsync callback on the UI thread directly #29889
Conversation
|
It looks like this pull request may not have tests. Please make sure to add tests before merging. If you need an exemption to this rule, contact Hixie on the #hackers channel in Chat. If you are not sure if you need tests, consider this rule of thumb: the purpose of a test is to make sure someone doesn't accidentally revert the fix. Ask yourself, is there anything in your PR that you feel it is important we not accidentally revert back to how it was before your fix? Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing. |
|
Here's the |
|
Another benchmark report on the same device, but I create a busyTask on platform manually. the busyTask code |
chinmaygarde
left a comment
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.
Excellent. This brings Android behavior in line with iOS too. And yeah, existing benchmarks won't show improvements because their main threads don't service blocking code.
|
This LGTM once it LGT @dnfield |
|
Can you add some documentation to |
done |
Fix #29777
we listen for Vsync callback on the UI thread directly, It will save time when the platform thread's MessageQueue is busy.
To implement this, we call
Looper.prepareandLooper.runinMessageLoopAndroid::Runthrough JNI, so we can receive Choreographer's FrameCallback in the UI thread.