[PATCH] xserver/glx/dri2: use new GLX/DRI2 swap event types

Michel Dänzer michel at daenzer.net
Fri May 6 00:25:35 PDT 2011


On Don, 2011-05-05 at 14:02 -0700, Jesse Barnes wrote: 
> > >    if (swap_complete) {
> > >        if (pPriv->swap_count > 0xffffffff)
> > >            ErrorF("something appropriate");
> > >        swap_complete(client, swap_data, type, ust, frame, (CARD32)pPriv->swap_count);
> > >    }
> > 
> > Yeah, it's annoying.  How about I leave out the error message and handle
> > wrapping on the client side instead?  That way at least the client code
> > won't notice that the server is only transmitting 32 bits...
> 
> Nevermind, that can't work generally since clients are free to
> mask/unmask the events, so we could miss a 0 count and thus a wrap.

Missing 0 isn't a problem, you can assume there's been a wraparound
whenever the current value is smaller than the previous one. This would
only fail if the client misses several wraparounds, in which case
apparently it doesn't care all that much in the first place. :)

Please do this.


-- 
Earthling Michel Dänzer           |                http://www.vmware.com
Libre software enthusiast         |          Debian, X and DRI developer


More information about the xorg-devel mailing list