[PATCHv2 1/2] DRI2: Track DRI2 drawables as resources, not privates

Kristian Høgsberg krh at bitplanet.net
Thu Apr 15 11:15:05 PDT 2010


2010/4/15 Keith Packard <keithp at keithp.com>:
> On Wed, 14 Apr 2010 20:30:55 -0400, Kristian Høgsberg <krh at bitplanet.net> wrote:
>
>> Oh, I was thinking I could just allocate the ID, but not actually add
>> the Pixmap as a resource. Is that bad form?
>
> It wouldn't help -- you need FreeResource to be invoked on that XID to
> get the other resources with that XID to be freed as well.

No, pbuffers are client resources and gets cleaned up when the client
exits.  The pixmap used behind these scenes is references from the
pbuffer and when that goes away, the pixmap goes away.  The reason I
want to give the pixmap an XID is that DRI2 will create a DRI2
drawable and add it as a resource with the XID of the pixmap.  That's
the only reason the pixmap needs an ID, it gets cleaned up just fine
as it is.

Kristian


More information about the xorg-devel mailing list