[PATCHv10 4/5] dri2: Support the DRI2InvalidateBuffers event.
Kristian Høgsberg
krh at bitplanet.net
Mon Mar 22 12:10:06 PDT 2010
On Sun, Mar 21, 2010 at 8:10 PM, Keith Packard <keithp at keithp.com> wrote:
> 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.
The DRI2 API also used internally in AIGLX, which is what patch 5/5
does, which will set a different pointer. The resource tracking is
only necessary when we're allocating DRI2ClientRef on behalf of a DRI2
client. When we're tracking a DRI2 drawable on behalf of AIGLX, we
can rely on AIGLX to cleanly free up resources once the GLX client
goes away or destroys its GLX drawable. We could make the
DRI2ClientRef a resource in both cases, and AIGLX certainly isn't a
hot path in this case, but it's pretty much the same amount of work
either way.
I've rebased the patches in the ~krh/xserver dri2-invalidate branch to
address the issues you describe with the last patch, except the
DRI2ClientRef resource tracking is still done in dri2ext.c.
Kristian
More information about the xorg-devel
mailing list