mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2026-04-14 08:22:25 -04:00
scene: switch to new frame scheduling
This commit is contained in:
parent
ee100e2586
commit
b2550a88ff
7 changed files with 30 additions and 25 deletions
|
|
@ -8,6 +8,7 @@
|
|||
#include <wlr/backend.h>
|
||||
#include <wlr/render/allocator.h>
|
||||
#include <wlr/render/wlr_renderer.h>
|
||||
#include <wlr/types/wlr_frame_scheduler.h>
|
||||
#include <wlr/types/wlr_output.h>
|
||||
#include <wlr/types/wlr_scene.h>
|
||||
#include <wlr/util/log.h>
|
||||
|
|
@ -104,10 +105,10 @@ static void server_handle_new_output(struct wl_listener *listener, void *data) {
|
|||
struct output *output = calloc(1, sizeof(*output));
|
||||
output->wlr = wlr_output;
|
||||
output->server = server;
|
||||
output->frame.notify = output_handle_frame;
|
||||
wl_signal_add(&wlr_output->events.frame, &output->frame);
|
||||
|
||||
output->scene_output = wlr_scene_output_create(server->scene, wlr_output);
|
||||
output->frame.notify = output_handle_frame;
|
||||
wl_signal_add(&output->scene_output->frame_scheduler->events.frame, &output->frame);
|
||||
|
||||
struct wlr_output_state state;
|
||||
wlr_output_state_init(&state);
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@
|
|||
#include <wlr/backend/wayland.h>
|
||||
#include <wlr/render/allocator.h>
|
||||
#include <wlr/types/wlr_compositor.h>
|
||||
#include <wlr/types/wlr_frame_scheduler.h>
|
||||
#include <wlr/types/wlr_scene.h>
|
||||
#include <wlr/types/wlr_xdg_shell.h>
|
||||
#include <wlr/util/log.h>
|
||||
|
|
@ -220,10 +221,10 @@ int main(int argc, char *argv[]) {
|
|||
wl_subsurface_set_position(subsurface, 20, 20);
|
||||
struct wlr_output *output = wlr_wl_output_create_from_surface(backend, child_surface);
|
||||
wlr_output_init_render(output, allocator, renderer);
|
||||
scene_output = wlr_scene_output_create(scene, output);
|
||||
|
||||
scene_output = wlr_scene_output_create(scene, output);
|
||||
output_frame.notify = output_handle_frame;
|
||||
wl_signal_add(&output->events.frame, &output_frame);
|
||||
wl_signal_add(&scene_output->frame_scheduler->events.frame, &output_frame);
|
||||
|
||||
struct wlr_output_state state;
|
||||
wlr_output_state_init(&state);
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@
|
|||
#include <wlr/render/allocator.h>
|
||||
#include <wlr/render/wlr_renderer.h>
|
||||
#include <wlr/types/wlr_compositor.h>
|
||||
#include <wlr/types/wlr_frame_scheduler.h>
|
||||
#include <wlr/types/wlr_output.h>
|
||||
#include <wlr/types/wlr_scene.h>
|
||||
#include <wlr/types/wlr_xdg_shell.h>
|
||||
|
|
@ -74,10 +75,10 @@ static void server_handle_new_output(struct wl_listener *listener, void *data) {
|
|||
struct output *output = calloc(1, sizeof(*output));
|
||||
output->wlr = wlr_output;
|
||||
output->server = server;
|
||||
output->frame.notify = output_handle_frame;
|
||||
wl_signal_add(&wlr_output->events.frame, &output->frame);
|
||||
|
||||
output->scene_output = wlr_scene_output_create(server->scene, wlr_output);
|
||||
output->frame.notify = output_handle_frame;
|
||||
wl_signal_add(&output->scene_output->frame_scheduler->events.frame, &output->frame);
|
||||
|
||||
struct wlr_output_state state;
|
||||
wlr_output_state_init(&state);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue