[PATCH weston 5/6] test: Add client driven repaint

Derek Foreman derekf at osg.samsung.com
Fri Dec 19 10:45:49 PST 2014


Allow a test client to call for a repaint.

Signed-off-by: Derek Foreman <derekf at osg.samsung.com>
---
 protocol/wayland-test.xml | 1 +
 tests/weston-test.c       | 9 +++++++++
 2 files changed, 10 insertions(+)

diff --git a/protocol/wayland-test.xml b/protocol/wayland-test.xml
index 7133555..4b914b4 100644
--- a/protocol/wayland-test.xml
+++ b/protocol/wayland-test.xml
@@ -64,5 +64,6 @@
       <arg name="sec" type="string"/>
       <arg name="nsec" type="string"/>
     </request>
+    <request name="repaint"/>
   </interface>
 </protocol>
diff --git a/tests/weston-test.c b/tests/weston-test.c
index ba37cdf..8d64d89 100644
--- a/tests/weston-test.c
+++ b/tests/weston-test.c
@@ -255,6 +255,14 @@ settime(struct wl_client *client, struct wl_resource *resource,
 	weston_compositor_presentation_clock_settime(test->compositor, &ts);
 }
 
+static void
+repaint(struct wl_client *client, struct wl_resource *resource)
+{
+	struct weston_test *test = wl_resource_get_user_data(resource);
+
+	weston_compositor_schedule_repaint(test->compositor);
+}
+
 static const struct wl_test_interface test_implementation = {
 	move_surface,
 	move_pointer,
@@ -264,6 +272,7 @@ static const struct wl_test_interface test_implementation = {
 	get_n_buffers,
 	enable_test_mode,
 	settime,
+	repaint,
 };
 
 static void
-- 
2.1.3



More information about the wayland-devel mailing list