[mutter/wip/frame-synchronization: 116/121] Use clutter_stage_set_sync_delay()
- From: Owen Taylor <otaylor src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter/wip/frame-synchronization: 116/121] Use clutter_stage_set_sync_delay()
- Date: Wed, 30 Jan 2013 20:49:59 +0000 (UTC)
commit 0c2491e3c9082f5d2b57e9d88c786dcbb52c6b6e
Author: Owen W. Taylor <otaylor fishsoup net>
Date: Mon Nov 12 13:39:59 2012 -0500
Use clutter_stage_set_sync_delay()
Using a "sync delay" where we wait for 2 ms after the vblank before
starting to draw the next frame provides for much more predictable
latency for applications. An application can know that if it completes
a frame any time between 8ms before the vblank to the vblank,
it will reliably be drawn on the following vblank period, rather than
having an unpredictable latency depending on whether the compositor
is currently busy drawing a frame or not.
https://bugzilla.gnome.org/show_bug.cgi?id=685463
src/compositor/compositor.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/src/compositor/compositor.c b/src/compositor/compositor.c
index b53e418..d0c40e6 100644
--- a/src/compositor/compositor.c
+++ b/src/compositor/compositor.c
@@ -549,6 +549,9 @@ meta_compositor_manage_screen (MetaCompositor *compositor,
g_signal_connect_after (info->stage, "paint",
G_CALLBACK (after_stage_paint), info);
+ /* Wait 6-ms after vblank before starting to draw next frame */
+ clutter_stage_set_sync_delay (CLUTTER_STAGE (info->stage), 2);
+
meta_screen_get_size (screen, &width, &height);
clutter_actor_realize (info->stage);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]