Re: Some perspective from the cheap seats...
Havoc Pennington <[email protected]>
| Newsgroups | gmane.comp.xfree86.forum |
|---|---|
| Message-ID | <[email protected]> |
On Mon, Mar 24, 2003 at 06:59:55PM -0800, Allen Akin wrote: > The question I'd raise now is whether the UI folks (and for that matter, > other users of X11) understand where graphics hardware programmability > is going. Maybe it offers compelling advantages in performance and > features to you. If so, it may still be possible for the GL world and > other graphics worlds to share important infrastructure (resource > management, data formats, high-performance datapaths, etc.). I think the answer to that is "no" - in general, we have near-zero understanding of where hardware is going. ;-) Some people might. It might be worth trying to think about how UI graphics (say, drawing a button, or drawing a word processor document) are different from graphics in general. Here are some things I can think of quickly: - WYSIWYG. We need the same API to draw to screen, printer, and a raster image to be dumped to a file, generating results that are basically the same. A pixel off here and there is OK in most cases, but using a different font or doubling line widths or something would not be. And we need client-side code available that can draw the primitives, even if there's also a server-side option. - Multiple apps. We need to use the API to draw basically every window on the server. So if there's a special visual or other limitations involved this may not work. Also, this means that a simple double-buffer for a single window isn't enough; to make things smooth, double-buffering spanning multiple windows (or some other solution) seems to be needed. - Performance not such an issue. We care about performance, but not *as much* as others might. Not that it hurts to be faster. I don't really understand at all why people feel these things are at odds with using the hardware well (more performance isn't going to make people complain). But, that is probably because I don't understand the hardware. I would like to understand the issues, if someone feels like writing them up. Ah, one other issue I've repeatedly encountered when trying to do nice animations. Say you want to do the "window swooshes into its icon" genie effect from OS X, for example. I haven't found a good way to do this animation. You can't grab the server and draw it IncludeInferiors, then ungrab the server, because the server grab makes things look bad (people can tell the server is locked up during the animation, and if any exposes are pending they won't be handled until post-animation). You can't create a window that is the window-genie thing, because the genie thing isn't square, and SHAPE is slow. (Also, you can't atomically change the shape and repaint the window in one go, so you have to do this in two steps, which looks stupid.) (And 1-bit alpha also looks bad.) If we had a fast full alpha mask for windows, plus a way to atomically change the alpha mask and repaint the window in one go, that would probably let you do the animation, *IF* it was fast enough. ;-) Another thing is that in this particular case the contents of the genie thing are the original contents of the window, and to get those contents and munge them into a genie shape, you would have to GetImage. Again slow. I'm not saying we have to have the genie thing, it's just an example, but one that shows various problems with doing nice animations. You can use it to think about what extensions might help in the general case. I think Raster has probably made more progress on getting X to do nice animations than anyone else, so he may have found better approaches. Havoc