qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Anthony Liguori <anthony@codemonkey.ws>
To: balrogg@gmail.com, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] Guest mouse cursor drawing in SDL
Date: Tue, 20 Mar 2007 20:28:38 -0500	[thread overview]
Message-ID: <46008A46.3070902@codemonkey.ws> (raw)
In-Reply-To: <fb249edb0703200906u5c996434p77209a88b614c484@mail.gmail.com>

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
> Qemu-devel@nongnu.org
> http://lists.nongnu.org/mailman/listinfo/qemu-devel
>

  reply	other threads:[~2007-03-21  1:30 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-03-11 14:19 [Qemu-devel] [PATCH] Guest mouse cursor drawing in SDL andrzej zaborowski
2007-03-20 15:08 ` Thiemo Seufer
2007-03-20 15:38   ` Anthony Liguori
2007-03-20 16:06     ` andrzej zaborowski
2007-03-21  1:28       ` Anthony Liguori [this message]
2007-03-23 13:57         ` andrzej zaborowski
2007-03-25 23:49           ` Anthony Liguori
2007-03-26 20:30             ` andrzej zaborowski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=46008A46.3070902@codemonkey.ws \
    --to=anthony@codemonkey.ws \
    --cc=balrogg@gmail.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).