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

Ville Syrjälä syrjala at sci.fi
Thu Sep 12 14:16:52 PDT 2013


On Thu, Sep 12, 2013 at 12:04:14PM -0400, Adam Jackson wrote:
> ... unless you explicitly disabled it with -bs on the command line, or
> with the corresponding thing in xorg.conf.
> 
> Signed-off-by: Adam Jackson <ajax at redhat.com>
> ---
>  composite/compinit.c           | 9 +++++----
>  hw/xfree86/common/xf86Helper.c | 5 +++++
>  2 files changed, 10 insertions(+), 4 deletions(-)
> 
> diff --git a/composite/compinit.c b/composite/compinit.c
> index bc1130e..2001c8a 100644
> --- a/composite/compinit.c
> +++ b/composite/compinit.c
> @@ -115,13 +115,11 @@ compChangeWindowAttributes(WindowPtr pWin, unsigned long mask)
>      pScreen->ChangeWindowAttributes = cs->ChangeWindowAttributes;
>      ret = pScreen->ChangeWindowAttributes(pWin, mask);
>  
> -    if (ret && (mask & CWBackingStore) &&
> -        pScreen->backingStoreSupport != NotUseful) {

So even if the server was started w/ -bs, you still allow the client to
enable backing store?

> +    if (ret && (mask & CWBackingStore)) {
>          if (pWin->backingStore != NotUseful) {
>              compRedirectWindow(serverClient, pWin, CompositeRedirectAutomatic);
>              pWin->backStorage = (pointer) (intptr_t) 1;
> -        }
> -        else {
> +        } else {
>              compUnredirectWindow(serverClient, pWin,
>                                   CompositeRedirectAutomatic);
>              pWin->backStorage = NULL;
> @@ -355,6 +353,9 @@ compScreenInit(ScreenPtr pScreen)
>          return FALSE;
>      }
>  
> +    if (!disableBackingStore)
> +	pScreen->backingStoreSupport = WhenMapped;
> +
>      cs->PositionWindow = pScreen->PositionWindow;
>      pScreen->PositionWindow = compPositionWindow;
>  
> diff --git a/hw/xfree86/common/xf86Helper.c b/hw/xfree86/common/xf86Helper.c
> index 4f1f3d4..70885e3 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
> 
> _______________________________________________
> xorg-devel at lists.x.org: X.Org development
> Archives: http://lists.x.org/archives/xorg-devel
> Info: http://lists.x.org/mailman/listinfo/xorg-devel

-- 
Ville Syrjälä
syrjala at sci.fi
http://www.sci.fi/~syrjala/


More information about the xorg-devel mailing list