From 4fa90b05119720a67ccb63cd89246abdb4abf4ea Mon Sep 17 00:00:00 2001 From: emersion Date: Tue, 23 Jan 2018 22:06:54 +0100 Subject: Backport screenshooter fixes from the renderer redesign v1 This backports some changes to #319 to fix the screenshooter data format. This also adds wlr_backend_get_renderer which will be useful to support multiple renderers. --- rootston/desktop.c | 3 +-- rootston/main.c | 4 +--- 2 files changed, 2 insertions(+), 5 deletions(-) (limited to 'rootston') diff --git a/rootston/desktop.c b/rootston/desktop.c index d7da1600..5d400c10 100644 --- a/rootston/desktop.c +++ b/rootston/desktop.c @@ -494,8 +494,7 @@ struct roots_desktop *desktop_create(struct roots_server *server, desktop->gamma_control_manager = wlr_gamma_control_manager_create( server->wl_display); - desktop->screenshooter = wlr_screenshooter_create(server->wl_display, - server->renderer); + desktop->screenshooter = wlr_screenshooter_create(server->wl_display); desktop->server_decoration_manager = wlr_server_decoration_manager_create(server->wl_display); wlr_server_decoration_manager_set_default_mode( diff --git a/rootston/main.c b/rootston/main.c index a327576a..3273c53f 100644 --- a/rootston/main.c +++ b/rootston/main.c @@ -8,7 +8,6 @@ #include #include #include -#include #include #include "rootston/config.h" #include "rootston/server.h" @@ -34,13 +33,12 @@ int main(int argc, char **argv) { assert(server.wl_event_loop = wl_display_get_event_loop(server.wl_display)); server.backend = wlr_backend_autocreate(server.wl_display); - if (server.backend == NULL) { wlr_log(L_ERROR, "could not start backend"); return 1; } - assert(server.renderer = wlr_gles2_renderer_create(server.backend)); + assert(server.renderer = wlr_backend_get_renderer(server.backend)); server.data_device_manager = wlr_data_device_manager_create(server.wl_display); wl_display_init_shm(server.wl_display); -- cgit v1.2.3