From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1HTpei-0003dC-Fe for qemu-devel@nongnu.org; Tue, 20 Mar 2007 21:30:24 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1HTpeg-0003cw-WC for qemu-devel@nongnu.org; Tue, 20 Mar 2007 21:30:24 -0400 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HTpeg-0003ct-P7 for qemu-devel@nongnu.org; Tue, 20 Mar 2007 20:30:22 -0500 Received: from wx-out-0506.google.com ([66.249.82.233]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1HTpd3-0001FO-Kw for qemu-devel@nongnu.org; Tue, 20 Mar 2007 21:28:41 -0400 Received: by wx-out-0506.google.com with SMTP id i30so191533wxd for ; Tue, 20 Mar 2007 18:28:41 -0700 (PDT) Message-ID: <46008A46.3070902@codemonkey.ws> Date: Tue, 20 Mar 2007 20:28:38 -0500 From: Anthony Liguori MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH] Guest mouse cursor drawing in SDL References: <20070320150848.GC2311@networkno.de> <45FFFFF2.3090702@codemonkey.ws> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: balrogg@gmail.com, qemu-devel@nongnu.org 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 >