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

Implement presentation-time #1272

Merged
merged 11 commits into from Oct 4, 2018

Conversation

Projects
None yet
5 participants
@emersion
Copy link
Member

emersion commented Sep 29, 2018

Test plan: weston-presentation-shm under DRM

Fixes #1172

@emersion emersion force-pushed the emersion:presentation-time branch 3 times, most recently from 40c7fcd to 306b9cd Sep 29, 2018

@@ -19,13 +19,17 @@ lib_wlr_types = static_library(
'xdg_shell_v6/wlr_xdg_shell_v6.c',
'xdg_shell_v6/wlr_xdg_surface_v6.c',
'xdg_shell_v6/wlr_xdg_toplevel_v6.c',
'tablet_v2/wlr_tablet_v2_pad.c',

This comment has been minimized.

@Ongy

Ongy Sep 29, 2018

Contributor

Is this alphabetical? X -> t -> w is weird, inside the subdirs it looks reasonable alphabetical.

@emersion emersion force-pushed the emersion:presentation-time branch 2 times, most recently from c4cf9a3 to c8c0124 Sep 29, 2018

void wlr_output_send_present(struct wlr_output *output, struct timespec *when,
unsigned seq, uint32_t flags) {
struct wlr_output_event_present event = {
.output = output,

This comment has been minimized.

@Ongy

Ongy Sep 30, 2018

Contributor

What's the reason for adding the output pointer here?
I'd expect it to be derivable from the actual handler that's called.

This comment was marked as resolved.

@emersion

emersion Sep 30, 2018

Member

wlroots has no idea on which output the surface is on. How could you "derive it from the handler"?

This comment has been minimized.

@emersion

emersion Sep 30, 2018

Member

Oh, yeah, sorry, I misunderstood. I just added it for consistency with other events. It's not strictly necessary I guess.

This comment has been minimized.

@ammen99

ammen99 Sep 30, 2018

Member

I think this is a good thing, because wl_container_of doesn't reliably work in c++(maybe other languages/bindings might need it as well?).

@@ -18,6 +18,8 @@

#define OUTPUT_VERSION 3

#define DEFAULT_PRESENT_CLOCK CLOCK_MONOTONIC

This comment has been minimized.

@ddevault

This comment has been minimized.

@emersion

emersion Oct 1, 2018

Member

What do you mean?

This comment has been minimized.

@ddevault

ddevault Oct 1, 2018

Member

This doesn't need to be abstracted, just use CLOCK_MONOTONIC explicitly.

This comment has been minimized.

@emersion

emersion Oct 1, 2018

Member

There's more to come.

This comment has been minimized.

@ddevault

ddevault Oct 1, 2018

Member

Okay, but I'm probably not going to change my mind.

@emersion emersion changed the title [WIP] Implement presentation-time Implement presentation-time Oct 2, 2018

@emersion

This comment has been minimized.

Copy link
Member

emersion commented Oct 2, 2018

This is ready for review.

Show resolved Hide resolved backend/drm/drm.c

@emersion emersion force-pushed the emersion:presentation-time branch from 3aa5ffd to eac7c2a Oct 4, 2018

@emersion

This comment has been minimized.

Copy link
Member

emersion commented Oct 4, 2018

Rebased against master.

@ddevault ddevault merged commit 24a48d4 into swaywm:master Oct 4, 2018

1 check passed

builds.sr.ht builds.sr.ht job completed successfully
Details
@ddevault

This comment has been minimized.

Copy link
Member

ddevault commented Oct 4, 2018

Thanks!

@emersion emersion deleted the emersion:presentation-time branch Oct 9, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment