mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2026-04-17 06:46:39 -04:00
scene: switch to new frame scheduling
This commit is contained in:
parent
5fd3dc7fca
commit
06515129d3
7 changed files with 32 additions and 32 deletions
|
|
@ -12,6 +12,7 @@
|
|||
#include <wlr/types/wlr_cursor.h>
|
||||
#include <wlr/types/wlr_compositor.h>
|
||||
#include <wlr/types/wlr_data_device.h>
|
||||
#include <wlr/types/wlr_frame_scheduler.h>
|
||||
#include <wlr/types/wlr_input_device.h>
|
||||
#include <wlr/types/wlr_keyboard.h>
|
||||
#include <wlr/types/wlr_output.h>
|
||||
|
|
@ -73,6 +74,7 @@ struct tinywl_output {
|
|||
struct wl_list link;
|
||||
struct tinywl_server *server;
|
||||
struct wlr_output *wlr_output;
|
||||
struct wlr_frame_scheduler *frame_scheduler;
|
||||
struct wl_listener frame;
|
||||
struct wl_listener request_state;
|
||||
struct wl_listener destroy;
|
||||
|
|
@ -590,6 +592,7 @@ static void output_destroy(struct wl_listener *listener, void *data) {
|
|||
wl_list_remove(&output->request_state.link);
|
||||
wl_list_remove(&output->destroy.link);
|
||||
wl_list_remove(&output->link);
|
||||
wlr_frame_scheduler_destroy(output->frame_scheduler);
|
||||
free(output);
|
||||
}
|
||||
|
||||
|
|
@ -628,10 +631,6 @@ static void server_new_output(struct wl_listener *listener, void *data) {
|
|||
output->wlr_output = wlr_output;
|
||||
output->server = server;
|
||||
|
||||
/* Sets up a listener for the frame event. */
|
||||
output->frame.notify = output_frame;
|
||||
wl_signal_add(&wlr_output->events.frame, &output->frame);
|
||||
|
||||
/* Sets up a listener for the state request event. */
|
||||
output->request_state.notify = output_request_state;
|
||||
wl_signal_add(&wlr_output->events.request_state, &output->request_state);
|
||||
|
|
@ -655,6 +654,10 @@ static void server_new_output(struct wl_listener *listener, void *data) {
|
|||
wlr_output);
|
||||
struct wlr_scene_output *scene_output = wlr_scene_output_create(server->scene, wlr_output);
|
||||
wlr_scene_output_layout_add_output(server->scene_layout, l_output, scene_output);
|
||||
|
||||
/* Sets up a listener for the frame event. */
|
||||
output->frame.notify = output_frame;
|
||||
wl_signal_add(&scene_output->frame_scheduler->events.frame, &output->frame);
|
||||
}
|
||||
|
||||
static void xdg_toplevel_map(struct wl_listener *listener, void *data) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue