xf86-video-intel: man/intel.man src/i830_driver.c src/i830.h
Jesse Barnes
jbarnes at virtuousgeek.org
Wed Jun 24 09:26:27 PDT 2009
On Wed, 24 Jun 2009 10:37:34 +0200
Michel Dänzer <michel at daenzer.net> wrote:
> On Wed, 2009-06-24 at 10:33 +0200, Michel Dänzer wrote:
> > 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);
>
> Actually the default value should be TRUE of course - the default
> values in your code are mixed, and I just copied & pasted the
> xf86ReturnOptValBool call.
And I was just copy & pasting from some of our other option checking
code... looks like more of it could be simplified.
Thanks,
--
Jesse Barnes, Intel Open Source Technology Center
More information about the xorg
mailing list