[maemo-developers] Can GTK+ make use of XSHM extension from MIT
From: Bin Chen binary.chen at gmail.comDate: Fri Jan 11 16:03:38 EET 2008
- Previous message: Duplicating the Backlight statusbar app's "menu"
- Next message: Can GTK+ make use of XSHM extension from MIT
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Jan 11, 2008 9:54 PM, Tristan Van Berkom <tvb at gnome.org> wrote: > On Jan 10, 2008 11:38 PM, Bin Chen <binary.chen at gmail.com> wrote: > > [...] > > Ok, let me make the things clear, the content in a gdk window includes > > many widgets, such as label, entry, button. But from the perspective of > > X server, this widgets are just bitmaps with the states updated by GTK+, > > right? > > A kind of mix of the above, generally many widgets draw to the same > GdkWindow yes, for the X server this is only one Window. > > > > Xshm will accelerate the client to server transfer for type of Image and > > Pixmap, but the GTK+ use XCopyArea to update the bitmap, can XCopyArea > > can benefit from the Xshm? > > Yes XCopyArea will do a different proceedure depending if you are using > an XSHM Image or not. > > > > In more detail, I am using gdk_draw_image to draw an image to a gdk > > drawable, will this benefit the Xshm? > > Assuming the Images were created as shared memory segments then > yes they will be transfered as shared memory, this can be faster than > using unix sockets for _large_ images (for smaller images its probably > the same considering there has to be task switching/locking involved > anyway when updating a window from an image). > 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? Thanks a lot. Bin
- Previous message: Duplicating the Backlight statusbar app's "menu"
- Next message: Can GTK+ make use of XSHM extension from MIT
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]