Keith Packard <[email protected]> writes: > On Tue, 16 Mar 2010 10:26:54 -0400, Kristian Høgsberg <[email protected]> > wrote: > >> Yes, the series look good and I've updated my branch: > > I don't like this code. It adds an unnecessary layer between > DRI2TrackClient and the dri2ext code, with a 'priv' element, > 'invalidate' and 'destroy' function pointers which are only set to a > single value. > > I see this resulting in abuse of the X server resource management > functions: > > + if (!AddResource(*id, dri2ClientRefRes, pDraw)) > + goto fail; > > The function here has allocated memory (*id) but that memory is only > incidentally associated with the resource ID which ends up pointing at > the drawable. > > I want to see resource IDs point at the allocated object. In this case, > we've got a nice structure, the DRI2ClientRefRec all set to be pointed > at by the resource. > > A nice side-effect of this is that we'd have a single allocation for > each tracking object. Plus, we'd have all of the tracking stuff in one > file instead of spread across two with this weird interface between the > two halves. > v9 of this patch is almost what you're describing (link: [1]). The AIGLX code also makes use of this interface and in that case it didn't make a lot of sense to deal with resources, so we decided to kick resource management out to dri2ext.
I'm fine with going back to v9 if it looks saner to you, it should be functionally equivalent. [1] http://lists.x.org/archives/xorg-devel/2010-February/005841.html
pgpQpgIdP55Lk.pgp
Description: PGP signature
_______________________________________________ [email protected]: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel
