On Tue, 2009-06-23 at 15:06 -0700, Jesse Barnes wrote:
> @@ -2663,10 +2665,23 @@ I830ScreenInit(int scrnIndex, ScreenPtr pScreen, int 
> argc, char **argv)
>         pI830->fb_compression = FALSE;
>     }
>  
> +   /* SwapBuffers delays to avoid tearing */
> +   pI830->swapbuffers_wait = TRUE;
> +
> +   /* Allow user override if they set a value */
> +   if (xf86IsOptionSet(pI830->Options, OPTION_SWAPBUFFERS_WAIT)) {
> +       if (xf86ReturnOptValBool(pI830->Options, OPTION_SWAPBUFFERS_WAIT, 
> FALSE))
> +        pI830->swapbuffers_wait = TRUE;
> +       else
> +        pI830->swapbuffers_wait = FALSE;
> +   }

FYI, the xf86IsOptionSet() call is superfluous. xf86ReturnOptValBool()
returns its last argument (the default value) if the option isn't set in
the config file. So you could simplify the code added above to

   /* SwapBuffers delays to avoid tearing */
   pI830->swapbuffers_wait = xf86ReturnOptValBool(pI830->Options, 
OPTION_SWAPBUFFERS_WAIT, FALSE);


-- 
Earthling Michel Dänzer           |                http://www.vmware.com
Libre software enthusiast         |          Debian, X and DRI developer
_______________________________________________
xorg mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/xorg

Reply via email to