mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-10-31 22:25:21 -04:00
output: add wlr_output_schedule_frame
This commit is contained in:
parent
ece2c1e4e2
commit
8d58ed502b
9 changed files with 41 additions and 31 deletions
|
|
@ -881,7 +881,7 @@ static void page_flip_handler(int fd, unsigned seq,
|
|||
}
|
||||
|
||||
if (drm->session->active) {
|
||||
wl_signal_emit(&conn->output.events.frame, &conn->output);
|
||||
wlr_output_send_frame(&conn->output);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -85,7 +85,7 @@ bool wlr_output_is_headless(struct wlr_output *wlr_output) {
|
|||
|
||||
static int signal_frame(void *data) {
|
||||
struct wlr_headless_output *output = data;
|
||||
wl_signal_emit(&output->wlr_output.events.frame, &output->wlr_output);
|
||||
wlr_output_send_frame(&output->wlr_output);
|
||||
wl_event_source_timer_update(output->frame_timer, output->frame_delay);
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -17,11 +17,11 @@ int os_create_anonymous_file(off_t size);
|
|||
|
||||
static struct wl_callback_listener frame_listener;
|
||||
|
||||
static void surface_frame_callback(void *data, struct wl_callback *cb, uint32_t time) {
|
||||
static void surface_frame_callback(void *data, struct wl_callback *cb,
|
||||
uint32_t time) {
|
||||
struct wlr_wl_backend_output *output = data;
|
||||
struct wlr_output *wlr_output = (struct wlr_output *)output;
|
||||
assert(wlr_output);
|
||||
wl_signal_emit(&wlr_output->events.frame, wlr_output);
|
||||
assert(output);
|
||||
wlr_output_send_frame(&output->wlr_output);
|
||||
wl_callback_destroy(cb);
|
||||
output->frame_callback = NULL;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ static bool handle_x11_event(struct wlr_x11_backend *x11, xcb_generic_event_t *e
|
|||
|
||||
switch (event->response_type) {
|
||||
case XCB_EXPOSE: {
|
||||
wl_signal_emit(&output->wlr_output.events.frame, output);
|
||||
wlr_output_send_frame(&output->wlr_output);
|
||||
break;
|
||||
}
|
||||
case XCB_KEY_PRESS:
|
||||
|
|
@ -174,7 +174,7 @@ static int x11_event(int fd, uint32_t mask, void *data) {
|
|||
|
||||
static int signal_frame(void *data) {
|
||||
struct wlr_x11_backend *x11 = data;
|
||||
wl_signal_emit(&x11->output.wlr_output.events.frame, &x11->output);
|
||||
wlr_output_send_frame(&x11->output.wlr_output);
|
||||
wl_event_source_timer_update(x11->frame_timer, 16);
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue