swc

Unnamed repository; edit this file 'description' to name the repository.
git clone git://git.nihaljere.xyz/swc
Log | Files | Refs | README | LICENSE

commit 31fae1b4da1261ebb6506e89b3dca941d4da3137
parent b561fc70a132f0bc82e7df62f1e7b12af759fbeb
Author: Michael Forney <mforney@mforney.org>
Date:   Mon, 20 Jan 2014 20:32:50 -0800

framebuffer_plane: When using SetCrtc, send frame events on idle rather than immediately

This way, when the compositor is updating the screens, it doesn't
receive frame events before the update finishes.

Diffstat:
Mlibswc/framebuffer_plane.c | 9++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/libswc/framebuffer_plane.c b/libswc/framebuffer_plane.c @@ -97,6 +97,13 @@ static bool update(struct swc_view * view) return true; } +static void send_frame(void * data) +{ + struct swc_framebuffer_plane * plane = data; + + swc_view_frame(&plane->view, swc_time()); +} + static bool attach(struct swc_view * view, struct swc_buffer * buffer) { struct swc_framebuffer_plane * plane @@ -112,7 +119,7 @@ static bool attach(struct swc_view * view, struct swc_buffer * buffer) plane->connectors.data, plane->connectors.size / 4, &plane->mode.info) == 0) { - swc_view_frame(&plane->view, swc_time()); + wl_event_loop_add_idle(swc.event_loop, &send_frame, plane); plane->need_modeset = false; } else