diff options
author | aliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162> | 2009-01-26 15:37:30 +0000 |
---|---|---|
committer | aliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162> | 2009-01-26 15:37:30 +0000 |
commit | 90a1e3c0b5811d6b334085d56fba1f5f47eaaea3 (patch) | |
tree | 1d4ee628580028fe1a29b3f44670e2d26a4d867d /console.c | |
parent | Use the default subsystem vendor ID for virtio devices (Mark McLoughlin) (diff) | |
download | qemu-kvm-90a1e3c0b5811d6b334085d56fba1f5f47eaaea3.tar.gz qemu-kvm-90a1e3c0b5811d6b334085d56fba1f5f47eaaea3.tar.bz2 qemu-kvm-90a1e3c0b5811d6b334085d56fba1f5f47eaaea3.zip |
vnc fixes and improvements (Stefano Stabellini)
this patch fixes a bug and improves the generic pixel conversion
function in vnc.c.
The bug is that when a new vnc client connects we need to reset the flag
has_WMVi but currently we don't.
The generic pixel conversion function is vnc_convert_pixel and currently
is not very efficient since uses the division and multiplication
operators.
To make it more efficient I changed to use bit shift operators instead.
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6441 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'console.c')
-rw-r--r-- | console.c | 17 |
1 files changed, 17 insertions, 0 deletions
@@ -1470,6 +1470,9 @@ PixelFormat qemu_different_endianness_pixelformat(int bpp) pf.rshift = 0; pf.gshift = 8; pf.bshift = 16; + pf.rbits = 8; + pf.gbits = 8; + pf.bbits = 8; break; case 32: pf.rmask = 0x0000FF00; @@ -1484,6 +1487,10 @@ PixelFormat qemu_different_endianness_pixelformat(int bpp) pf.rshift = 8; pf.gshift = 16; pf.bshift = 24; + pf.rbits = 8; + pf.gbits = 8; + pf.bbits = 8; + pf.abits = 8; break; default: break; @@ -1512,6 +1519,9 @@ PixelFormat qemu_default_pixelformat(int bpp) pf.rshift = 11; pf.gshift = 5; pf.bshift = 0; + pf.rbits = 5; + pf.gbits = 6; + pf.bbits = 5; break; case 24: pf.rmask = 0x00FF0000; @@ -1523,6 +1533,9 @@ PixelFormat qemu_default_pixelformat(int bpp) pf.rshift = 16; pf.gshift = 8; pf.bshift = 0; + pf.rbits = 8; + pf.gbits = 8; + pf.bbits = 8; case 32: pf.rmask = 0x00FF0000; pf.gmask = 0x0000FF00; @@ -1535,6 +1548,10 @@ PixelFormat qemu_default_pixelformat(int bpp) pf.rshift = 16; pf.gshift = 8; pf.bshift = 0; + pf.rbits = 8; + pf.gbits = 8; + pf.bbits = 8; + pf.abits = 8; break; default: break; |