[Fwd: What is the role of drawable parameter in XCreatePixmap()]

Adam Jackson ajax at nwnk.net
Fri Feb 13 09:58:29 PST 2009


On Thu, 2009-02-12 at 13:59 +0530, Mustafizur Rahaman wrote:

> Hi,
> 
> We pass a drawable parameter as input while calling XCreatePixmap().Now 
> this drawable can be either a X window Id(which we got from a previous 
> call to XCreateWindow) Or, this drawable could be a X pixmap id(which we 
> got from a previous XCreatePixmap() call).
> 
> I checked the xlib manual and it mentions that this drawable parameter 
> is used to just determine the screen number, where the new pixmap will 
> be created. I want to know is there any other significance of this 
> drawable? Is there any difference between the behavior of when we pass X 
> window id as drawable to XCreatePixmap and when we pass a X pixmap id as 
> drawable to another XCreatePixmap call.

At the moment, there's no difference, and the drawable is only used to
indicate the desired screen.

In the future, we want to use it as a performance hint for Xinerama, to
indicate which screen the pixmap will probably be used on, so we can
avoid creating it on all screens (or the wrong screen, or whatever).  So
if you know the window that the pixmap's contents are going to be
blitted to, use that as the drawable parameter for CreatePixmap.

- ajax
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part
Url : http://lists.x.org/archives/xorg-devel/attachments/20090213/d27c2b35/attachment.pgp 


More information about the xorg-devel mailing list