[10029] in The GTK GIMP ToolKit mailing list archive
[gtk-list] Re: Gdk, X11, and backing store
daemon@ATHENA.MIT.EDU (Joe Pfeiffer)
Wed Nov 11 19:59:19 1998
Date: Wed, 11 Nov 1998 17:59:00 -0700
From: Joe Pfeiffer <pfeiffer@cs.nmsu.edu>
To: gtk-list@redhat.com
In-reply-to: <199811112220.RAA26193@pretzel.normnet.org> (message from Jeff
Garzik on Wed, 11 Nov 1998 17:20:18 -0500 (EST))
Resent-From: gtk-list@redhat.com
Reply-To: gtk-list@redhat.com
jgarzik@pobox.com writes:
> For some reason not totally clear to me, it is much faster to use
> backing store than to do the exposure handling yourself by drawing in
> a pixmap and just copying it when you get the exposure event. I
> suspect that the X-server is using video-memory than is not visible on
> the screen, whereas such memory is not available for a user process,
> but I might be wrong.
If the server is doing it, there's a whole mess of deciding to send
you an expose, sending it to your client, you picking up the event,
you deciding to copy the pixmap, you sending a message back, and the
server processing the message that is bypassed.
I believe that the X server uses server-side resources for the backing
store, as you suspect. If you want to do your own backing store-type
functionality, use XImage*() calls. An XImage is a server-side
resource, whereas (IIRC) a pixmap is a client-side resource.
Backwards -- an XImage is client-side (it lives in your program), a
Pixmap is server-side (it lives in the server). I haven't gotten as
far as exploring gdk yet, but if you have to do your own backing store
a pixmap is the way to do it.
Server-side versus client-side makes a world of difference in many
situations, especially when running X over a network.
Yep.
--
Joseph J. Pfeiffer, Jr., Ph.D. Phone -- (505) 646-1605
Department of Computer Science FAX -- (505) 646-1002
New Mexico State University http://www.cs.nmsu.edu/~pfeiffer
--
To unsubscribe: mail -s unsubscribe gtk-list-request@redhat.com < /dev/null