From c012d770f739fcbb119aba7983d192b48f34e9a7 Mon Sep 17 00:00:00 2001 From: Simon Ser Date: Sun, 13 Dec 2020 14:12:02 +0100 Subject: backend/x11: implement a real rendering loop Instead of using a timer, rely on X11 Present events and send a new frame event when the parent compositor displays a new frame on screen. The previous attempt at doing this [1] hit issues with EGLSurface, but we don't use that anymore. [1]: https://github.com/swaywm/wlroots/pull/1894 --- include/backend/x11.h | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'include/backend/x11.h') diff --git a/include/backend/x11.h b/include/backend/x11.h index 7ffcf465..22835387 100644 --- a/include/backend/x11.h +++ b/include/backend/x11.h @@ -26,8 +26,6 @@ #define XCB_EVENT_RESPONSE_TYPE_MASK 0x7f -#define X11_DEFAULT_REFRESH (60 * 1000) // 60 Hz - struct wlr_x11_backend; struct wlr_x11_output { @@ -47,12 +45,10 @@ struct wlr_x11_output { struct wlr_input_device touch_dev; struct wl_list touchpoints; // wlr_x11_touchpoint::link - struct wl_event_source *frame_timer; - int frame_delay; - struct wl_list buffers; // wlr_x11_buffer::link bool cursor_hidden; + uint64_t last_msc; }; struct wlr_x11_touchpoint { -- cgit v1.2.3