aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authoremersion <contact@emersion.fr>2018-09-29 22:38:13 +0200
committeremersion <contact@emersion.fr>2018-10-04 21:56:38 +0200
commit78389fe72225f9baf7def744825323f54ac4ee8e (patch)
tree17d005298165399ae931692e8b75472cbd3d5985 /include
parent3aad9fd6a96aa7c7d0fcf0dfa421c49caae83625 (diff)
output: add present event
Diffstat (limited to 'include')
-rw-r--r--include/wlr/interfaces/wlr_output.h2
-rw-r--r--include/wlr/types/wlr_output.h14
2 files changed, 16 insertions, 0 deletions
diff --git a/include/wlr/interfaces/wlr_output.h b/include/wlr/interfaces/wlr_output.h
index bfb3bc9d..b06c5db0 100644
--- a/include/wlr/interfaces/wlr_output.h
+++ b/include/wlr/interfaces/wlr_output.h
@@ -45,5 +45,7 @@ void wlr_output_update_enabled(struct wlr_output *output, bool enabled);
void wlr_output_update_needs_swap(struct wlr_output *output);
void wlr_output_damage_whole(struct wlr_output *output);
void wlr_output_send_frame(struct wlr_output *output);
+void wlr_output_send_present(struct wlr_output *output, struct timespec *when,
+ unsigned seq, uint32_t flags);
#endif
diff --git a/include/wlr/types/wlr_output.h b/include/wlr/types/wlr_output.h
index 96394ba4..a794d4b2 100644
--- a/include/wlr/types/wlr_output.h
+++ b/include/wlr/types/wlr_output.h
@@ -91,6 +91,7 @@ struct wlr_output {
struct wl_signal frame;
struct wl_signal needs_swap;
struct wl_signal swap_buffers; // wlr_output_event_swap_buffers
+ struct wl_signal present; // wlr_output_event_present
struct wl_signal enable;
struct wl_signal mode;
struct wl_signal scale;
@@ -123,6 +124,19 @@ struct wlr_output_event_swap_buffers {
pixman_region32_t *damage;
};
+enum wlr_output_present_flag {
+ WLR_OUTPUT_PRESENT_VSYNC = 0x1,
+ WLR_OUTPUT_PRESENT_HW_CLOCK = 0x2,
+ WLR_OUTPUT_PRESENT_HW_COMPLETION = 0x4,
+};
+
+struct wlr_output_event_present {
+ struct wlr_output *output;
+ struct timespec *when;
+ unsigned seq;
+ uint32_t flags; // enum wlr_output_present_flag
+};
+
struct wlr_surface;
/**