[maemo-developers] Can GTK+ make use of XSHM extension from MIT
From: Bin Chen binary.chen at gmail.comDate: Fri Jan 11 16:16:30 EET 2008
- Previous message: Can GTK+ make use of XSHM extension from MIT
- Next message: The gift certificate has no balance
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Jan 11, 2008 10:13 PM, Tristan Van Berkom <tvb at gnome.org> wrote: > On Jan 11, 2008 12:03 PM, Bin Chen <binary.chen at 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
- Previous message: Can GTK+ make use of XSHM extension from MIT
- Next message: The gift certificate has no balance
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]