Linked by Thom Holwerda on Sat 28th Jun 2008 22:09 UTC, submitted by diegocg
X11, Window Managers "Maybe I'm just naive, but designing a graphics API such that all image data had to be sent over a socket to another process every time the image needed to be drawn seems like complete idiocy. Unfortunately, that is precisely what the X Window System forces a program to do, and exactly what Cairo does when drawing images in Linux - a full copy of the image data, send to another process, no less, every time it is drawn. One would think there would be some room for improvement. Unsurprisingly, others felt the same way about X, and decided to write an extension, Xlib Shm or XShm for short, that allows images to placed in a shared memory segment from which the X server reads which allows the program to avoid the memory copy. GTK already makes use of the XShm extension, and it seems like a good idea to see if Gecko couldn't do the same."
Permalink for comment 320556
To read all comments associated with this story, please click here.
RE: Exaggerating
by luzr on Sun 29th Jun 2008 08:49 UTC in reply to "Exaggerating"
Member since:

Well, we are speaking about Cairo here right?

Cairo is basically a software renderer. That implies that in fact you do all your rendering to the memory, then transfer the resulting image to X11.

That in fact implies that you rarely are able to "reuse" stored images. Each screen update means a new image and new transfer.

IME, the difference in image transfer is about 2x. OTOH, the rendering itself can perhaps take quite a bit of time too, so in practice, maybe it really is not that critical.

BTW, you can try it:

x11perf -putimage500
x11perf -shmput500

Reply Parent Score: 1