Skip to content
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

Send epoch timestamp with the frame #106

Merged
merged 1 commit into from Dec 11, 2019
Merged

Conversation

@Manishearth
Copy link
Member

Manishearth commented Dec 11, 2019

Fixes #36

r? @asajeffrey

@Manishearth Manishearth force-pushed the Manishearth:timestamp branch from d8bd867 to 92d77f1 Dec 11, 2019
@@ -447,6 +448,7 @@ impl DeviceAPI<Surface> for OpenXrDevice {
transform,
inputs: vec![right_input_frame, left_input_frame],
events,
time_ns

This comment has been minimized.

@Manishearth

Manishearth Dec 11, 2019

Author Member

That's the predicted display time, not the time for the actual frame data.

That said the frame data may itself be predicted. I'm not sure. There are WPT tests ensuring that Performance.now() is greater than the frame timestamp.

This comment has been minimized.

@Manishearth

Manishearth Dec 11, 2019

Author Member

Basically, I'm not sure what to do here and need spec clarification

@Manishearth Manishearth force-pushed the Manishearth:timestamp branch from 92d77f1 to 358b564 Dec 11, 2019
Copy link
Member

asajeffrey left a comment

LGTM.

@@ -26,6 +26,9 @@ pub struct Frame {

/// Events that occur with the frame.
pub events: Vec<FrameUpdateEvent>,

/// Value of time::precise_time_ns() when frame was obtained
pub time_ns: u64,

This comment has been minimized.

@asajeffrey

asajeffrey Dec 11, 2019

Member

Use an Instant here?

This comment has been minimized.

@Manishearth

Manishearth Dec 11, 2019

Author Member

Instant can only be compared with other Instants, and we don't use that in servo for Performance.now()

@Manishearth Manishearth force-pushed the Manishearth:timestamp branch from 358b564 to b916c34 Dec 11, 2019
@Manishearth
Copy link
Member Author

Manishearth commented Dec 11, 2019

@bors-servo r=asajeffrey

@bors-servo
Copy link
Contributor

bors-servo commented Dec 11, 2019

📌 Commit b916c34 has been approved by asajeffrey

@bors-servo
Copy link
Contributor

bors-servo commented Dec 11, 2019

Testing commit b916c34 with merge b223bc0...

bors-servo added a commit that referenced this pull request Dec 11, 2019
Send epoch timestamp with the frame

Fixes #36

r? @asajeffrey
@bors-servo
Copy link
Contributor

bors-servo commented Dec 11, 2019

☀️ Test successful - checks-travis
Approved by: asajeffrey
Pushing b223bc0 to master...

@bors-servo bors-servo merged commit b916c34 into servo:master Dec 11, 2019
3 checks passed
3 checks passed
Travis CI - Pull Request Build Passed
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
homu Test successful
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

4 participants
You can’t perform that action at this time.