-
Notifications
You must be signed in to change notification settings - Fork 6k
Map the Android VsyncWaiter frame start time to the clock used by fml::TimePoint #29093
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. |
|
Hi, @jason-simmons Thank you for taking the time out of your busy schedule to solve this problem. I'm not sure if this change is needed for Android. The following are some of my personal views:
Thanks |
|
Yes - this is not strictly necessary given the similarity between the clocks used by However, I do think this will help ensure correctness because that similarlity is an implementation detail. If either clock implementation ever changes, then it will be valuable to do an explicit conversion of the timestamp between the two clocks. |
That sounds good. |
iskakaushik
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.
LGTM
…::TimePoint The Android Choreographer.doFrame callback provides a timestamp in the clock used by System.nanoTime. The VsyncWaiter needs to translate this to a frame start time based on the fml::TimePoint clock (similar to how VsyncWaiterIOS calculates the frame start time)
f7da0bf to
628cf20
Compare
…d by fml::TimePoint (flutter/engine#29093)
The Android Choreographer.doFrame callback provides a timestamp in
the clock used by System.nanoTime. The VsyncWaiter needs to translate
this to a frame start time based on the fml::TimePoint clock
(similar to how VsyncWaiterIOS calculates the frame start time)