Re: color depth change
- From: "Daniel P. Berrange" <dan berrange com>
- To: Jonh Wendell <jwendell gnome org>
- Cc: gtk-vnc-devel List <gtk-vnc-list gnome org>
- Subject: Re: color depth change
- Date: Wed, 30 Sep 2009 15:08:16 +0100
On Wed, Sep 30, 2009 at 10:53:56AM -0300, Jonh Wendell wrote:
> Em Qua, 2009-09-30 às 14:40 +0100, Daniel P. Berrange escreveu:
>
> > One further thought occurrs to me - the enum of possible depth values has
> > the first member as
> >
> > VNC_DISPLAY_DEPTH_COLOR_FULL = 0,
> >
> > So no matter what the VNC server is configured todo, we will request full
> > colour. I think its probably a good idea if our default setting is in
> > fact to just use the server's preferred format.
> >
> > We could do this quite easily with your patch by inserting a new value
> >
> > VNC_DISPLAY_DEPTH_COLOR_DEFAULT = 0
> >
> > as the first elememt in the enum and in the method
> >
> > gboolean on_get_preferred_pixel_format()
> >
> > in the switch statement case for the VNC_DISPLAY_DEPTH_COLOR_DEFAULT simply
> > do not update any of the fields in 'fmt' - which leaves them initialized to
> > the server's default values.
> >
> > Thus by default we'd get the server's preferred format, but we can still
> > also explicitly override it to full/medium/low/ultralow.
>
> The problem here is that we do not support anything but true color.
> That's why we had on_get_preferred_format() in first place, so that we
> change the format to true color, which we can handle.
Oh right I forgot that - i think it'd still be worth having a separate
VNC_DISPLAY_DEPTH_COLOR_DEFAULT though - it future proofs us in case
we do decide to implement non-true colour depths natively later.
> So, what do you suggest to do in such cases? Force it to FULL COLOR
> (just as we do today)?
How about for VNC_DISPLAY_DEPTH_COLOR_DEFAULT we do:
if (server fmt is true colour)
.. use default server fmt...
else
.. do same as VNC_DISPLAY_DEPTH_COLOR_FULL fmt..
Daniel
--
|: http://berrange.com/ -o- http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org -o- http://virt-manager.org -o- http://ovirt.org :|
|: http://autobuild.org -o- http://search.cpan.org/~danberr/ :|
|: http://freshmeat.net/~danielpb/ -o- http://gtk-vnc.sourceforge.net :|
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]