commit 31fae1b
Michael Forney
·
2014-01-21 04:32:50 +0000 UTC
parent b561fc7
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.
1 files changed,
+8,
-1
+8,
-1
1@@ -97,6 +97,13 @@ static bool update(struct swc_view * view)
2 return true;
3 }
4
5+static void send_frame(void * data)
6+{
7+ struct swc_framebuffer_plane * plane = data;
8+
9+ swc_view_frame(&plane->view, swc_time());
10+}
11+
12 static bool attach(struct swc_view * view, struct swc_buffer * buffer)
13 {
14 struct swc_framebuffer_plane * plane
15@@ -112,7 +119,7 @@ static bool attach(struct swc_view * view, struct swc_buffer * buffer)
16 plane->connectors.data, plane->connectors.size / 4,
17 &plane->mode.info) == 0)
18 {
19- swc_view_frame(&plane->view, swc_time());
20+ wl_event_loop_add_idle(swc.event_loop, &send_frame, plane);
21 plane->need_modeset = false;
22 }
23 else