save-under support

Glynn Clements glynn at gclements.plus.com
Sat Jan 24 06:53:37 PST 2009


Patrick O'Donnell wrote:

> > Date: Fri, 23 Jan 2009 01:44:24 +0000
> > From: =?UTF-8?Q?Rui_Tiago_Ca=C3=A7=C3=A3o_Matos?= <tiagomatos at gmail.com>
> > 
> > 2009/1/22 Patrick O'Donnell <pao at ascent.com>:
> > > I've been told, recently, that "save-under and backing-store under
> > > 8-bit [visuals] are no longer supported in recent X.org
> > > releases". ...  could someone point me to where I would find more
> > > authoritative information on the status of save-under and backing-store?
> > 
> > http://cgit.freedesktop.org/xorg/xserver/commit/?id=ae7f71a8b3d6756161e55d998d6eec37d2695c98
> > 
> > I'm afraid that's as official as it gets.
> 
> So, I take it that backing store (and from a commit last August, save
> under) is being flushed, not just for 8-bit visuals, but completely.
> The theory seems to be that "compositing" will do (almost) the same
> thing.  (It's a shame that backing store = "Always" is being tossed to
> the wind.  Apparently, backward compatibilty is given short shrift in
> favor of "prettiness".)
> 
> Now, I have two additional troubles.  The problem we're seeing with
> our application -- our main "chart" window (with backing store) is
> being left blank under where a pop-up (with save-under) had been
> mapped -- occurs in X.Org servers that predate the commit you pointed
> me to.  So, the removal of backing store, and the much later removal
> of save under don't seem to be the proximal problem.

It has always been the case that a server may or may not honour
requests for backing store and/or save unders.

These features are intended as an optimisation; they do not eliminate
the need to redraw portions of the window in response to Expose
events.

Even if the server does support backing store and/or save unders in
general, whether or not it preserves contents in specific cases could
depend upon factors such as the overall demand for video memory.

IOW, if neglecting to handle Expose events has worked until now, then
you just got lucky.

If you want to perform rendering only at a time of your choosing, the
simplest solution is probably to allocate a suitably-sized Pixmap,
draw into that, and either:

a) handle Expose events using XCopyArea(dpy, pixmap, window, ...), or

b) use the Pixmap as the Window's background_pixmap (the server *may* make
a copy of the Pixmap, so you should call XSetWindowBackgroundPixmap()
whenever you modify its contents).

> Second, although, in my searching, I have found mention of "Composite"
> and "compositing managers", I've yet to find a sufficiently detailed
> explanation of what compositing is doing and how it is invoked or
> configured for me to understand how I should be managing our
> application's windows to make use of it.  Another pointer to a good
> reference would be appreciated.

I don't know enough about compositing to answer this one.

-- 
Glynn Clements <glynn at gclements.plus.com>



More information about the xorg mailing list