[PATCHv10 4/5] dri2: Support the DRI2InvalidateBuffers event.
Francisco Jerez
currojerez at riseup.net
Mon Mar 22 04:51:36 PDT 2010
Keith Packard <keithp at keithp.com> writes:
> On Tue, 16 Mar 2010 10:26:54 -0400, Kristian Høgsberg <krh at bitplanet.net> 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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://lists.x.org/archives/xorg-devel/attachments/20100322/90092eee/attachment.pgp>
More information about the xorg-devel
mailing list