On Thu, Feb 10, 2011 at 06:22:24PM +0200, Pauli Nieminen wrote: > On 10/02/11 17:40 +0200, Ville Syrjälä wrote: > > On Tue, Feb 08, 2011 at 11:42:49PM +0200, ext Pauli wrote: > > > From: Pauli Nieminen <[email protected]> > > > > > > void > > > -DRI2WaitMSCComplete(ClientPtr client, DrawablePtr pDraw, int frame, > > > - unsigned int tv_sec, unsigned int tv_usec) > > > +DRI2WaitMSCComplete2(DRI2DrawablePtr pPriv, int frame, > > > + unsigned int tv_sec, unsigned int tv_usec, > > > + void *data) > > > { > > > - DRI2DrawablePtr pPriv; > > > - > > > - pPriv = DRI2GetDrawable(pDraw); > > > - if (pPriv == NULL) > > > - return; > > > + ClientPtr client = data; > > > > Why void* instead of ClientPtr? > > > > Because driver shouldn't care what is in the data pointer. > > Because it will contain special structure to track if client has disconnected > later on. Only reason to pass ClienPtr there for now is to make this patch > work without client state tracking.
OK. Since you're already shoveling stuff into these opaque structures, you could also hide the DRI2SwapEventPtr pointer from the driver by moving it into _DRI2SwapCompleteDataRec. You already moved the accompanying data pointer there. Then again, that would also involve a new version of the ScheduleSwap function, so perhaps it's not worth it. I also find the lack of symmetry between the remaining v1 functions and the new v2 functions a little bit distasteful, but on the other hand it helps in minimizing the driver changes. -- Ville Syrjälä _______________________________________________ [email protected]: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
