Re: 30bit colordepth



[ BTW - this discussion really should be on gtk-devel-list since
  it is about modificatins to GTK+ ]

Havoc Pennington <hp redhat com> writes:

> On Mon, Dec 23, 2002 at 10:31:36AM -0500, btouchet wrote: 
> > Unfortunately i have pretty much exhausted the time i could use to take
> > a look at this, what i would like to know is how hard would it be to get
> > this working correctly? What files need tweaking to set some way of
> > setting gtk/gnome to respect either 8 or 10 bits per RGB?
> 
> Probably the pixbuf to/from image code (gdk/gdkpixbuf-*.c) would need
> to handle the 10-10-10 RGB case. That should take care of the missing
> icons. For fonts, I can't imagine why they would break if not using
> Xft, so I'm not sure what needs fixing there. If using Xft, Xft is
> probably what needs fixing rather than GTK. Note that most Linux
> distributions are defaulting to Xft in newer releases.
> 
> Your easiest route may be: get at least one driver that people
> commonly use in XFree86 to default to 10-10-10. Then the free software
> community will fix the issue quickly on its own.

Probably not really feasible, even though several high-end consumer
cards now support 10-10-10 ... there just is no good reason to 
use this, if all your source images are 8-bit.

Fixing up GDK for 10-10-10 should be straightforward; aside from
perhaps a few tweaks in gdkvisual-x11.c, all you should need
to change is gdkrgb.c and gdkpixbuf-drawable.c. In fact, both
of these have slow fallbacks for unsupported depths, so if they 
aren't working at all, it may well just be a matter of bug fixing.
(But you probably want to add special-casing, for speed.)

The bigger program is going to be the RENDER extension in XFree86;
you might be able to get a quick hack going easily where it
just ignored the low bits, but making it actually handle 10-10-10
colors is going to be harder, since the code makes a lot of use
of passing around RGBA color components packed into a 32-bit
word. Also, I'm not sure RENDER has a good definition of the
correct arithmetic for depths > 8 yet.

If the RENDER extension isn't advertised, then the code that
needs fixing to get antialiased fonts drawing is in the Xft 
library.

Regards,
                                        Owen



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]