[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Re: Can GTK+ make use of XSHM extension from MIT
- From: "Bin Chen" <binary chen gmail com>
- To: "Tristan Van Berkom" <tvb gnome org>
- Cc: Eero Tamminen <eero tamminen nokia com>, maemo-developers maemo org, gtk-app-devel-list gnome org, Tapani Pälli <tapani palli nokia com>
- Subject: Re: Can GTK+ make use of XSHM extension from MIT
- Date: Fri, 11 Jan 2008 22:16:30 +0800
On Jan 11, 2008 10:13 PM, Tristan Van Berkom <tvb gnome org> wrote:
> On Jan 11, 2008 12:03 PM, Bin Chen <binary chen gmail com> wrote:
>
> [...]
>
> > Thanks for your reply, but I wonder how the Xlib or GDK knows the
> > image is drawing in a shared memory segment? In detail can you show me
> > some pseudo code to how to do it?
>
> Well Gdk does know because it created the backing Image, but doesnt
> need to because Xlib knows to treat normal images differently than
> shared ones when doing XCopyArea (Gdk needs to know that its shared
> only so that it can properly clean up its resources when destroying
> the GdkImage).
>
> See in the docs[1] you can even verify by explicitly trying to create
> a shared memory pixmap, it will fail if it was not possible to create
> a shared memory pixmap.
>
> For X, all Windows Pixmaps Images etc are resources and different
> casts of the XID (which is just a numeric resource identifier), if the
> underlying Image of the GdkImage is shared, the X server will know
> because the X server created/returned the resource identifier.
>
> Cheers,
> -Tristan
>
> [1]
> http://library.gnome.org/devel/gdk/unstable/gdk-Images.html#gdk-image-new
Thanks! This is what I want!
Thanks all the people who followed this thread!
Bin
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]