xf86-video-intel: man/intel.man src/i830_driver.c src/i830.h

Michel Dänzer michel at daenzer.net
Wed Jun 24 01:33:05 PDT 2009


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



More information about the xorg mailing list