From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (qmail 19043 invoked from network); 23 Jun 1998 17:02:36 -0000 Received: from gatecoms.gatecom.com (198.87.96.251) by mail2.redhat.com with SMTP; 23 Jun 1998 17:02:36 -0000 Received: (from jsturm@localhost) by gatecoms.gatecom.com (8.8.7/8.8.7) id NAA19131; Tue, 23 Jun 1998 13:01:14 -0400 (EDT) Date: Tue, 23 Jun 1998 13:01:14 -0400 (EDT) From: Jeff Sturm X-Sender: jsturm@gatecoms To: Christopher Curtis cc: axp-list@redhat.com Subject: Re: The new X (was Re: Making programs 64 bit clean) In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII On Tue, 23 Jun 1998, Christopher Curtis wrote: > On Tue, 23 Jun 1998, Jeff Sturm wrote: > > > Windows runs like crap in 4-bit color. You don't really like dithering, > > do you?? > > Runs like crap? Looks like crap, yes, but runs well. Many (most, all?) X > apps won't even load in a 4-bit display. Hmm... never tried it. I've had pretty good luck with greyscale though... > > The biggest difference here is that Windows application developers had > > gotten used to 4-bit and 8-bit displays. Until recently there were few > > Windows applications that would even attempt to use more than 256 colors. > > point?? If you go buy a Sparc 10 for $5,000 you only get an 8-bit dpy. Yup. Our Ultra-2 does no better. I've been meaning to ask those Sun guys what on earth were they thinking. Meanwhile I've got a darn nice X console running on Linux :) If I bought another Sun I wouldn't even bother ordering a graphics adapter. > > If applications like Netscape and GIMP hog color resources, well, that's > > not exactly a X problem... > > It is because they aren't allowed to share. I don't know the details of > exactly what is wrong, but you cannot have two color-intensive apps > loaded. Like Netscape and anything, or GIMP and anything. One color > intensive app screws everybody. Oh, they can share, all right. The problem is that there are just not enough colormap entries to go around when you can only allocate 256 colors out of a possible 16 million or so. Let's say I render a .gif in one window. I'ts an 8-bit picture of a rose blossom growing in my backyard. The hardware colormap gets filled with shades of red and green. Then I open another .gif, a picture of a blue sky. It wants shades of blue, but no colormap entries are available (they get used on a first-come, first-serve basis). The results are horrible unless I use private colormaps, in which case the flickering is horrendous but I can view both images (alternately). If the images both use a lot of red, or similar colors, the application can try to map closest possible shades when the colormap is full. The result is a degraded image quality that may still be acceptable. The problem is many applications do not manage colors very intelligently, and I suspect some don't release colormap cells either. Desktop colors are another story. Most desktops (KDE) settle on white, black, a few shades of grey and maybe some blue or something else. Maybe 16 colors altogether. Typically you can open as many windows as you want and never run out of colormap cells even on an 8-bit display because they are properly shared. I have observed colormap behavior many times under 8bpp and 16bpp displays on various flavors of Windows and X. The results are pretty consistent. X can actually be more flexible by enabling you to run several visuals simultaneously, or turn them on/off during server init. I really don't believe Windows does any better than X at managing color resources, it exhibits the same problems. (Granted, Netscape is probably broken on X. Now that Mozilla is out we might finally have a chance to fix it :) ) In your case, try forcing Netscape to use a DirectColor visual at 8bpp if your display server supports it. I bet images aren't as pretty but you won't get the same colormap contention either... I have a hunch we're getting too off-topic for axp-list now :) Jeff