[PATCHv2 1/2] DRI2: Track DRI2 drawables as resources, not privates
Keith Packard
keithp at keithp.com
Thu Apr 15 11:28:55 PDT 2010
On Thu, 15 Apr 2010 14:15:05 -0400, Kristian Høgsberg <krh at bitplanet.net> wrote:
> 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.
So how is the DRI2 drawable going to get cleaned up? From what I
understand, it gets destroyed when FreeResource is called on the
drawable ID.
--
keith.packard at intel.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.x.org/archives/xorg-devel/attachments/20100415/88835627/attachment.pgp>
More information about the xorg-devel
mailing list