[PATCH 2/3] composite: Automatically enable backing store support on the screen

Adam Jackson ajax at redhat.com
Tue Nov 5 07:17:43 PST 2013


... unless you explicitly disabled it with -bs on the command line, or
with the corresponding thing in xorg.conf.

v2: Drop a bogus hunk from compChangeWindowAttributes [vsyrjala]

Signed-off-by: Adam Jackson <ajax at redhat.com>
---
 composite/compinit.c           | 3 +++
 hw/xfree86/common/xf86Helper.c | 5 +++++
 2 files changed, 8 insertions(+)

diff --git a/composite/compinit.c b/composite/compinit.c
index bc1130e..6283136 100644
--- a/composite/compinit.c
+++ b/composite/compinit.c
@@ -355,6 +355,9 @@ compScreenInit(ScreenPtr pScreen)
         return FALSE;
     }
 
+    if (!disableBackingStore)
+        pScreen->backingStoreSupport = TRUE;
+
     cs->PositionWindow = pScreen->PositionWindow;
     pScreen->PositionWindow = compPositionWindow;
 
diff --git a/hw/xfree86/common/xf86Helper.c b/hw/xfree86/common/xf86Helper.c
index 4f1f3d4..f1e6783 100644
--- a/hw/xfree86/common/xf86Helper.c
+++ b/hw/xfree86/common/xf86Helper.c
@@ -1638,6 +1638,11 @@ xf86SetBackingStore(ScreenPtr pScreen)
     else {
         if (xf86GetOptValBool(options, OPTION_BACKING_STORE, &useBS))
             from = X_CONFIG;
+#ifdef COMPOSITE
+        if (from != X_CONFIG)
+            useBS = xf86ReturnOptValBool(options, OPTION_BACKING_STORE,
+                                         !noCompositeExtension);
+#endif
     }
     free(options);
     pScreen->backingStoreSupport = useBS ? WhenMapped : NotUseful;
-- 
1.8.3.1



More information about the xorg-devel mailing list