[clutter] wayland: Queue a redraw after showing the stage
- From: Neil Roberts <nroberts src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [clutter] wayland: Queue a redraw after showing the stage
- Date: Thu, 28 Mar 2013 16:32:54 +0000 (UTC)
commit d5896d284ee39243f84bab903d1429d3cab35bf7
Author: Neil Roberts <neil linux intel com>
Date: Thu Mar 28 15:30:50 2013 +0000
wayland: Queue a redraw after showing the stage
On the other backends we will get some sort of expose event after
showing the stage's window which will queue a redraw. These expose
events don't exist on Wayland so nothing will cause Clutter to queue a
redraw. Weston doesn't bother displaying anything for the stage's
surface until the first buffer is sent, which of course it will never
receive if Clutter doesn't paint anything. This patch just makes it
explicitly queue a redraw after the stage is shown so that we will
always pass at least one frame to the compositor.
The bug can be seen by running test-stage-sizing. That example doesn't
have any animations so it won't try to queue any redraws until
something interacts with it. On the other hand something like
test-actors works fine without the patch because it constantly queues
redraws anyway in order to display the animation.
https://bugzilla.gnome.org/show_bug.cgi?id=696791
clutter/wayland/clutter-stage-wayland.c | 17 +++++++++++++++++
1 files changed, 17 insertions(+), 0 deletions(-)
---
diff --git a/clutter/wayland/clutter-stage-wayland.c b/clutter/wayland/clutter-stage-wayland.c
index 5179eb6..2a3346b 100644
--- a/clutter/wayland/clutter-stage-wayland.c
+++ b/clutter/wayland/clutter-stage-wayland.c
@@ -130,6 +130,22 @@ clutter_stage_wayland_realize (ClutterStageWindow *stage_window)
}
static void
+clutter_stage_wayland_show (ClutterStageWindow *stage_window,
+ gboolean do_raise)
+{
+ ClutterStageCogl *stage_cogl = CLUTTER_STAGE_COGL (stage_window);
+
+ clutter_stage_window_parent_iface->show (stage_window, do_raise);
+
+ /* We need to queue a redraw after the stage is shown because all of
+ * the other queue redraws up to this point will have been ignored
+ * because the actor was not visible. The other backends do not need
+ * to do this because they will get expose events at some point, but
+ * that does not happen for Wayland. */
+ clutter_actor_queue_redraw (CLUTTER_ACTOR (stage_cogl->wrapper));
+}
+
+static void
clutter_stage_wayland_set_fullscreen (ClutterStageWindow *stage_window,
gboolean fullscreen)
{
@@ -203,6 +219,7 @@ clutter_stage_window_iface_init (ClutterStageWindowIface *iface)
clutter_stage_window_parent_iface = g_type_interface_peek_parent (iface);
iface->realize = clutter_stage_wayland_realize;
+ iface->show = clutter_stage_wayland_show;
iface->set_fullscreen = clutter_stage_wayland_set_fullscreen;
iface->resize = clutter_stage_wayland_resize;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]