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

2010-04-26 Thread Pauli Nieminen
2010/4/19 Michel Dänzer mic...@daenzer.net: On Fre, 2010-04-09 at 14:18 -0400, Kristian Høgsberg wrote: The main motivation here is to have the resource system clean up the DRI2 drawable automatically so glx doesn't have to.  Right now, the glx drawable resource must be destroyed before the X

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

2010-04-26 Thread Pauli Nieminen
On Mon, Apr 26, 2010 at 3:44 PM, Pauli Nieminen suok...@gmail.com wrote: 2010/4/19 Michel Dänzer mic...@daenzer.net: On Fre, 2010-04-09 at 14:18 -0400, Kristian Høgsberg wrote: The main motivation here is to have the resource system clean up the DRI2 drawable automatically so glx doesn't have

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

2010-04-23 Thread Pierre Willenbrock
Michel Dänzer schrieb: On Fre, 2010-04-09 at 14:18 -0400, Kristian Høgsberg wrote: The main motivation here is to have the resource system clean up the DRI2 drawable automatically so glx doesn't have to. Right now, the glx drawable resource must be destroyed before the X drawable, so that

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

2010-04-19 Thread Michel Dänzer
On Fre, 2010-04-09 at 14:18 -0400, Kristian Høgsberg wrote: The main motivation here is to have the resource system clean up the DRI2 drawable automatically so glx doesn't have to. Right now, the glx drawable resource must be destroyed before the X drawable, so that calling

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

2010-04-15 Thread Keith Packard
On Wed, 14 Apr 2010 20:30:55 -0400, Kristian Høgsberg k...@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

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

2010-04-15 Thread Kristian Høgsberg
2010/4/15 Keith Packard kei...@keithp.com: On Wed, 14 Apr 2010 20:30:55 -0400, Kristian Høgsberg k...@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

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

2010-04-15 Thread Kristian Høgsberg
2010/4/15 Keith Packard kei...@keithp.com: On Thu, 15 Apr 2010 14:15:05 -0400, Kristian Høgsberg k...@bitplanet.net wrote: 2010/4/15 Keith Packard kei...@keithp.com: On Wed, 14 Apr 2010 20:30:55 -0400, Kristian Høgsberg k...@bitplanet.net wrote: Oh, I was thinking I could just

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

2010-04-15 Thread Keith Packard
On Thu, 15 Apr 2010 14:47:51 -0400, Kristian Høgsberg k...@bitplanet.net wrote: Right, it would linger until the client exits. So I guess I'll have to actually AddResource the pixmap with the FakeClientID and then use FreeResource to destroy it instead of pScreen-DestroyPixmap. I think that

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

2010-04-15 Thread Kristian Høgsberg
2010/4/15 Keith Packard kei...@keithp.com: On Thu, 15 Apr 2010 14:47:51 -0400, Kristian Høgsberg k...@bitplanet.net wrote: Right, it would linger until the client exits.  So I guess I'll have to actually AddResource the pixmap with the FakeClientID and then use FreeResource to destroy it

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

2010-04-15 Thread Keith Packard
On Thu, 15 Apr 2010 16:35:02 -0400, Kristian Høgsberg k...@bitplanet.net wrote: Ah, we can just assign the pixmap the XID of the pbuffer and AddResource it using that XID. That way both the hidden pixmap and the DRI2 drawable will automatically be reclaimed when the client destroys the

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

2010-04-14 Thread Kristian Høgsberg
Keith, have you had time to look at this respun fix for 26394? 2010/4/9 Kristian Høgsberg k...@bitplanet.net: The main motivation here is to have the resource system clean up the DRI2 drawable automatically so glx doesn't have to.  Right now, the glx drawable resource must be destroyed before

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

2010-04-14 Thread Keith Packard
On Wed, 14 Apr 2010 10:25:49 -0400, Kristian Høgsberg k...@bitplanet.net wrote: Keith, have you had time to look at this respun fix for 26394? Oh. I just had a bad thought -- pixmaps don't follow the same rule as windows, they aren't always in the resource database and don't always have

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

2010-04-14 Thread Kristian Høgsberg
On Wed, Apr 14, 2010 at 1:18 PM, Keith Packard kei...@keithp.com wrote: On Wed, 14 Apr 2010 10:25:49 -0400, Kristian Høgsberg k...@bitplanet.net wrote: Keith, have you had time to look at this respun fix for 26394? Oh. I just had a bad thought -- pixmaps don't follow the same rule as

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

2010-04-14 Thread Keith Packard
On Wed, 14 Apr 2010 14:22:05 -0400, Kristian Høgsberg k...@bitplanet.net wrote: Right, true. But we always create DRI2 drawable for client created drawables, except in the case of an AIGLX pbuffer. There we create a pixmap behind the scenes and then create a DRI2 drawable for that. I

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

2010-04-09 Thread Kristian Høgsberg
The main motivation here is to have the resource system clean up the DRI2 drawable automatically so glx doesn't have to. Right now, the glx drawable resource must be destroyed before the X drawable, so that calling DRI2DestroyDrawable doesn't crash. By making the DRI2 drawable a resource, GLX