From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:33245) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y9VP7-0005Zz-PF for qemu-devel@nongnu.org; Fri, 09 Jan 2015 03:58:52 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Y9VOw-0004GS-5d for qemu-devel@nongnu.org; Fri, 09 Jan 2015 03:58:49 -0500 Received: from mx1.redhat.com ([209.132.183.28]:33611) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Y9VOv-0004EZ-Or for qemu-devel@nongnu.org; Fri, 09 Jan 2015 03:58:37 -0500 Message-ID: <1420793910.24278.6.camel@nilsson.home.kraxel.org> From: Gerd Hoffmann Date: Fri, 09 Jan 2015 09:58:30 +0100 In-Reply-To: <07B03389-9719-42C2-A561-05347C36D947@gmail.com> References: <3154DC97-3B67-4DBF-BD02-C64E4A9591E3@gmail.com> <77FFD738-1433-4B15-8522-C1EA965B774B@gmail.com> <122C8E58-48F5-4A54-B0AF-A826492D73B6@gmail.com> <4A37A1CE-EE81-4408-A13E-8A4C7C91D498@gmail.com> <54AC45AE.5020804@redhat.com> <54AD0BDE.7020200@redhat.com> <1420641833.27381.39.camel@nilsson.home.kraxel.org> <67F5B5C0-41E1-4399-8A11-C3821394C31D@gmail.com> <1420707776.24470.15.camel@nilsson.home.kraxel.org> <07B03389-9719-42C2-A561-05347C36D947@gmail.com> Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] Gives user ability to select endian format for video display - fixes Mac OS X guest color issue. List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Programmingkid Cc: Paolo Bonzini , qemu-devel qemu-devel , Peter Maydell On Do, 2015-01-08 at 12:07 -0500, Programmingkid wrote: > On Jan 8, 2015, at 4:02 AM, Gerd Hoffmann wrote: > > > Hi, > > > >> VGA: Using shared surface for depth=32 swap=1 > > > > Ok, 32bpp. byteswapping needed. > > > > I guess the host is a intel macintosh then? > > Yes. So we have be guest @ le host. > I unfortunately don't have a fast enough PowerPC Mac to handle QEMU. > It would be interesting to find out if this color issue is on PowerPC > hosts. Indeed. > Is this what you mean? > s->force_shadow = 1; > share_surface = (!s->force_shadow) && > ( depth == 32 || (depth == 16 && !byteswap) ); Yes. > I tried it out and didn't notice any change in colors for the Mac OS X guest. Hmm, strange. Can you test https://www.kraxel.org/cgit/qemu/log/?h=rebase/console-wip ? > I do have an idea. What if on cocoa_update(DisplayChangeListener ...), > we find out the format of the framebuffer. > > The DisplayChangeListener object has a QemuConsole object. The > QemuConsole object has a DisplaySurface object. The DisplaySurface > object has a pixman_format_code_t format variable. This format > variable tells us what format the framebuffer is in. So is it possible > to use it? The format types are listed in pixman.h. Better place is probably switchSurface, so you have to look only once for every surface, not on every display update. Just look at surface->format. cheers, Gerd