qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH] Guest mouse cursor drawing in SDL


From: Anthony Liguori
Subject: Re: [Qemu-devel] [PATCH] Guest mouse cursor drawing in SDL
Date: Tue, 20 Mar 2007 20:28:38 -0500
User-agent: Thunderbird 1.5.0.10 (X11/20070306)

andrzej zaborowski wrote:
> (the pixel format of the cursor was the same as the pixel format of
DisplayState).

I'm not sure if we want to always use the same pixel format - for
example with VMware SVGA and SDL in 16 bit mode, the cursor pixel
format reported by guest Xorg was 8 bpp. This would mean two
conversions instead of one: first VMware SVGA would have to convert 8
-> 16 bpp then SDL 16 -> 1 bpp.

VNC expects the cursor data to be in the current pixel format. The nice thing about this approach is you don't need to pass a bunch of pixel info (for instance, you don't need to pass the depth, endianness, etc.).

The Cirrus hardware cursor also has to be copied anyway and doing the conversion is really straight forward.

One question in my mind is what the alpha mask should look like.  All
that VNC (and SDL) can use is a 1-bit alpha depth.  That's all Cirrus
supports too.  VMware SVGA supports an 8-bit alpha channel though so it
may make sense to design the interface now to support that.

VMware SVGA without CAP_ALPHA_CURSOR also does only 1-bit alpha. Maybe
we should keep two masks - if the frontend (e.g SDL) supports only
1-bit alpha it would use only this basic mask - if the emulated VGA
supports only 1-bit alpha it would leave the other mask opaque.

I thought about that. Right now with my patch, the cursor mask is always 1-bit deep. I was thinking that perhaps the right thing to do is to make it always 8-bits deep and then convert in VNC.

Do you think using the SDL cursor is all that useful? As soon as gtk widgets get involved, the cursor becomes ARGB so in practice, I'm not sure that it's all that helpful.

BTW, I've got the ALPHA_CURSOR working with VNC.. it's very sweet :-)

Regards,

Anthony Liguori

Regards,
Andrzej


_______________________________________________
Qemu-devel mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/qemu-devel






reply via email to

[Prev in Thread] Current Thread [Next in Thread]