summaryrefslogtreecommitdiff
path: root/src/sna/sna_driver.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2013-08-01 14:49:36 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2013-08-01 15:21:04 +0100
commit3f04b6f33f05f8a24698f934a23462269b84917d (patch)
treee314cec9f5429b9a390e20460d9139ec6c454fb8 /src/sna/sna_driver.c
parent0ae07158c3550b418d3596cacda33a64ee653790 (diff)
sna/dri: Disable TripleBuffering by default for compositors
Ideally, the method of swapping is something that the applications have control over, along with how to synchronise to the vertical refresh. Whilst triple buffering is good to reduce jitter for games (at the cost of an extra frame of latency, usually considered a good tradeoff), it prevents the applications from accurately controlling the presentation of animations. One vocal critique is Owen Taylor, who demands accurate swap control for smooth animations in gnome-shell. For example, http://blog.fishsoup.net/2012/11/28/avoiding-jitter-in-composited-frame-display/ In lieu of application control, just apply a quirk for the compositor. Everyone else will just have to wait for DRI3. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/sna/sna_driver.c')
-rw-r--r--src/sna/sna_driver.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/sna/sna_driver.c b/src/sna/sna_driver.c
index 16dbc91b..fc8773bc 100644
--- a/src/sna/sna_driver.c
+++ b/src/sna/sna_driver.c
@@ -77,6 +77,7 @@ DevPrivateKeyRec sna_pixmap_key;
DevPrivateKeyRec sna_gc_key;
DevPrivateKeyRec sna_window_key;
DevPrivateKeyRec sna_glyph_key;
+DevPrivateKeyRec sna_client_key;
static void
sna_load_palette(ScrnInfoPtr scrn, int numColors, int *indices,
@@ -788,6 +789,10 @@ sna_register_all_privates(void)
if (!dixRegisterPrivateKey(&sna_window_key, PRIVATE_WINDOW,
3*sizeof(void *)))
return FALSE;
+
+ if (!dixRegisterPrivateKey(&sna_client_key, PRIVATE_CLIENT,
+ sizeof(struct sna_client)))
+ return FALSE;
#else
if (!dixRequestPrivate(&sna_pixmap_key, 3*sizeof(void *)))
return FALSE;
@@ -800,6 +805,9 @@ sna_register_all_privates(void)
if (!dixRequestPrivate(&sna_window_key, 3*sizeof(void *)))
return FALSE;
+
+ if (!dixRequestPrivate(&sna_client_key, sizeof(struct sna_client)))
+ return FALSE;
#endif
return TRUE;