Re: Snappy GUI response
Mark Vojkovich <[email protected]>
| Newsgroups | gmane.comp.xfree86.forum |
|---|---|
| Message-ID | <[email protected]> |
On 4 Jul 2003, Owen Taylor wrote: > On Fri, 2003-07-04 at 14:05, Mark Vojkovich wrote: > > > > And how many billions of pixels a second of constant fill can a > > > modern nvidia card? Optimizing out XFillRectangle() doesn't strike > > > me as being that important. > > > > It's not the actually drawing that is a problem. It's having > > to get an expose event at all. If a button rarely changes, set > > the image as a window background and request no expose events > > on it. > > > > I advocate backing pixmaps for as many windows as it > > makes sense, and no expose events on them. Not only is this > > extremely fast even if server is rendering in software, but > > it looks great (you don't see redrawing). That is, save all > > your expensive rendering, don't keep redrawing it. Put it in > > a pixmap and set it as the window background. There's also > > a good change this pixmap will end up in video ram rather than > > system ram. > > Saving the full contents of each toplevel window makes a lot > of sense these days. Doing it in the toolkit doesn't: Perhaps the burden should be entirely on the app, but it's one its not bearing very well, and it's a space where there doesn't seem to have been much enlightenment on the part of developers. The impression I get from looking at the apps is that it's getting worse. I see alot of people saying "things would be fast if we only had this, or that", but I know that's not going to change anything. Direct rendered 2D doesn't solve the event problem. I'm pretty convinced that the synchronization issues will make it worse. We don't direct render 3D so that window moves will be smoother; it has quite the opposite effect. Adding more complete acceleration will help, but the core problem is still there: people don't seem to know how to write apps to take advantage of what X has to offer. Mark. > > * If the windowing system saves the full contents of each > toplevel (see below for why that works better), then you > double the 50+ megabytes of memory you are using by > saving the full contents of each window in the toolkit. > > The directfb and OS X servers are current examples of > servers that save the full contents of each window. > > * The windowing system, if it has the full contents, can > do neat things like per-window alpha channels. > > * The windowing system is generally in a much better position > to know when to dump the window contents and ask the app to > redraw them. (because you are out of memory, because > the window is fully obscured or on a different desktop, etc.) > > Regards, > Owen > > [ You could argue that only "expensive" windows should save > their contents in the toolkit, but that's a real hard > thing to define. There is no reason why a web browser > should be expensive, really... ] > > > _______________________________________________ > Forum mailing list > [email protected] > http://XFree86.Org/mailman/listinfo/forum >