composite: Automatically enable backing store support on the screen

... 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]
v3: s/TRUE/WhenMapped/ [jcristau]

Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Adam Jackson <ajax@redhat.com>
This commit is contained in:
Adam Jackson 2013-11-05 10:08:17 -05:00
parent e0cac00560
commit a2b2c271e0
2 changed files with 8 additions and 0 deletions

View File

@ -355,6 +355,9 @@ compScreenInit(ScreenPtr pScreen)
return FALSE;
}
if (!disableBackingStore)
pScreen->backingStoreSupport = WhenMapped;
cs->PositionWindow = pScreen->PositionWindow;
pScreen->PositionWindow = compPositionWindow;

View File

@ -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;