[PATCH 05/15] dix: xfree86: remove superfluous +br simplifying backing store support options

Tiago Vignatti tiago.vignatti at nokia.com
Thu Oct 28 07:17:00 PDT 2010


Worth to note that behaviour is changed: different from before, -bs now
enables backing store support on windows. By default it's disabled though as
it always been.

Signed-off-by: Tiago Vignatti <tiago.vignatti at nokia.com>
---
 dix/window.c                    |    9 ++++-----
 hw/xfree86/common/xf86Globals.c |    3 +--
 hw/xfree86/common/xf86Helper.c  |   10 +++++-----
 hw/xfree86/common/xf86Init.c    |    8 +-------
 hw/xfree86/common/xf86Priv.h    |    3 +--
 include/opaque.h                |    3 +--
 os/utils.c                      |    7 ++-----
 7 files changed, 15 insertions(+), 28 deletions(-)

diff --git a/dix/window.c b/dix/window.c
index 1913030..8b90974 100644
--- a/dix/window.c
+++ b/dix/window.c
@@ -258,8 +258,7 @@ WalkTree(ScreenPtr pScreen, VisitWindowProcPtr func, pointer data)
 /* hack for forcing backing store on all windows */
 int	defaultBackingStore = NotUseful;
 /* hack to force no backing store */
-Bool	disableBackingStore = FALSE;
-Bool	enableBackingStore = FALSE;
+Bool	BackingStore = FALSE;
 
 static void
 SetWindowToDefaults(WindowPtr pWin)
@@ -435,10 +434,10 @@ CreateRootWindow(ScreenPtr pScreen)
     if (!AddResource(pWin->drawable.id, RT_WINDOW, (pointer)pWin))
 	return FALSE;
 
-    if (disableBackingStore)
-	pScreen->backingStoreSupport = NotUseful;
-    if (enableBackingStore)
+    if (BackingStore)
 	pScreen->backingStoreSupport = Always;
+    else
+	pScreen->backingStoreSupport = NotUseful;
 
     pScreen->saveUnderSupport = NotUseful;
 
diff --git a/hw/xfree86/common/xf86Globals.c b/hw/xfree86/common/xf86Globals.c
index 3ec35a3..0194424 100644
--- a/hw/xfree86/common/xf86Globals.c
+++ b/hw/xfree86/common/xf86Globals.c
@@ -170,8 +170,7 @@ const char *xf86VisualNames[] = {
 /* Parameters set only from the command line */
 char *xf86ServerName = "no-name";
 Bool xf86fpFlag = FALSE;
-Bool xf86bsEnableFlag = FALSE;
-Bool xf86bsDisableFlag = FALSE;
+Bool xf86bsFlag = FALSE;
 Bool xf86silkenMouseDisableFlag = FALSE;
 Bool xf86xkbdirFlag = FALSE;
 #ifdef HAVE_ACPI
diff --git a/hw/xfree86/common/xf86Helper.c b/hw/xfree86/common/xf86Helper.c
index 67be200..0960c44 100644
--- a/hw/xfree86/common/xf86Helper.c
+++ b/hw/xfree86/common/xf86Helper.c
@@ -1831,16 +1831,16 @@ xf86SetBackingStore(ScreenPtr pScreen)
     xf86ProcessOptions(pScrn->scrnIndex, pScrn->options, options);
 
     /* check for commandline option here */
-    if (xf86bsEnableFlag) {
+    if (xf86bsFlag) {
 	from = X_CMDLINE;
 	useBS = TRUE;
-    } else if (xf86bsDisableFlag) {
+    } else {
 	from = X_CMDLINE;
 	useBS = FALSE;
-    } else {
-	if (xf86GetOptValBool(options, OPTION_BACKING_STORE, &useBS))
-	    from = X_CONFIG;
     }
+    if (xf86GetOptValBool(options, OPTION_BACKING_STORE, &useBS))
+	from = X_CONFIG;
+
     free(options);
     pScreen->backingStoreSupport = useBS ? Always : NotUseful;
     if (serverGeneration == 1)
diff --git a/hw/xfree86/common/xf86Init.c b/hw/xfree86/common/xf86Init.c
index 533bbd7..987a1be 100644
--- a/hw/xfree86/common/xf86Init.c
+++ b/hw/xfree86/common/xf86Init.c
@@ -1185,13 +1185,7 @@ ddxProcessArgument(int argc, char **argv, int i)
   /* Notice the -bs flag, but allow it to pass to the dix layer */
   if (!strcmp(argv[i], "-bs"))
   {
-    xf86bsDisableFlag = TRUE;
-    return 0;
-  }
-  /* Notice the +bs flag, but allow it to pass to the dix layer */
-  if (!strcmp(argv[i], "+bs"))
-  {
-    xf86bsEnableFlag = TRUE;
+    xf86bsFlag = TRUE;
     return 0;
   }
   if (!strcmp(argv[i], "-pixmap24"))
diff --git a/hw/xfree86/common/xf86Priv.h b/hw/xfree86/common/xf86Priv.h
index 0d8506b..2e406bc 100644
--- a/hw/xfree86/common/xf86Priv.h
+++ b/hw/xfree86/common/xf86Priv.h
@@ -51,8 +51,7 @@ extern _X_EXPORT  Bool xf86VidModeDisabled;
 extern _X_EXPORT  Bool xf86VidModeAllowNonLocal;
 #endif 
 extern _X_EXPORT  Bool xf86fpFlag;
-extern _X_EXPORT  Bool xf86bsEnableFlag;
-extern _X_EXPORT  Bool xf86bsDisableFlag;
+extern _X_EXPORT  Bool xf86bsFlag;
 extern _X_EXPORT  Bool xf86silkenMouseDisableFlag;
 extern _X_EXPORT  Bool xf86xkbdirFlag;
 #ifdef HAVE_ACPI
diff --git a/include/opaque.h b/include/opaque.h
index dfe440c..7919e4a 100644
--- a/include/opaque.h
+++ b/include/opaque.h
@@ -52,8 +52,7 @@ extern _X_EXPORT int defaultScreenSaverAllowExposures;
 extern _X_EXPORT char *display;
 
 extern _X_EXPORT int defaultBackingStore;
-extern _X_EXPORT Bool disableBackingStore;
-extern _X_EXPORT Bool enableBackingStore;
+extern _X_EXPORT Bool BackingStore;
 extern _X_EXPORT Bool PartialNetwork;
 extern _X_EXPORT Bool RunFromSigStopParent;
 #ifndef NOLOGOHACK
diff --git a/os/utils.c b/os/utils.c
index 760f2f9..98aabce 100644
--- a/os/utils.c
+++ b/os/utils.c
@@ -467,8 +467,7 @@ void UseMsg(void)
     ErrorF("-ac                    disable access control restrictions\n");
     ErrorF("-audit int             set audit trail level\n");	
     ErrorF("-auth file             select authorization file\n");	
-    ErrorF("+bs                    enable any backing store support\n");
-    ErrorF("-bs                    disable any backing store support\n");
+    ErrorF("-bs                    enable any backing store support\n");
     ErrorF("-c                     turns off key-click\n");
     ErrorF("c #                    key-click volume (0-100)\n");
     ErrorF("-cc int                default color visual class\n");
@@ -615,10 +614,8 @@ ProcessCommandLine(int argc, char *argv[])
 	    else
 		UseMsg();
 	}
-	else if ( strcmp( argv[i], "+bs") == 0)
-	    enableBackingStore = TRUE;
 	else if ( strcmp( argv[i], "-bs") == 0)
-	    disableBackingStore = TRUE;
+	    BackingStore = TRUE;
 	else if ( strcmp( argv[i], "c") == 0)
 	{
 	    if(++i < argc)
-- 
1.7.0.4



More information about the xorg-devel mailing list