[10026] in The GTK GIMP ToolKit mailing list archive

home help back first fref pref prev next nref lref last post

[gtk-list] Re: Gdk, X11, and backing store

daemon@ATHENA.MIT.EDU (Jeff Garzik)
Wed Nov 11 17:21:13 1998

To: dov@imagic.weizmann.ac.il
Date: Wed, 11 Nov 1998 17:20:18 -0500 (EST)
Cc: gtk-list@redhat.com
Reply-To: jgarzik@pobox.com
In-Reply-To: <199811112207.AAA02146@imagic.weizmann.ac.il> from "Dov Grobgeld" at Nov 12, 98 00:07:11 am
From: Jeff Garzik <jgarzik@pobox.com>
Resent-From: gtk-list@redhat.com

Dov Grobgeld wrote:
> 
> I have a question concerned with the lack of backing store in Gdk. I'm
> not a big expert on X, but one of the things that I have picked up is
> that if when you create a window do:
> 
>     unsigned long valuemask;
>     XSetWindowAttributes attributes;
> 
>     :
>     valuemask = CWBackingStore;
>     attributes.backing_store = WhenMapped;
>     :
> 
>     win = XCreateWindow(... , valuemask, &attributes);
>     XMapWindow(dpy, win);
> 
> you no longer get any exposure events for the window, but the X server
> is taking care of the exposure events on its own by using backing_store.
> 
> 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.

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.

Server-side versus client-side makes a world of difference in many
situations, especially when running X over a network.

	Jeff


-- 
To unsubscribe: mail -s unsubscribe gtk-list-request@redhat.com < /dev/null


home help back first fref pref prev next nref lref last post