From: Paolo Bonzini <pbonzini@redhat.com>
To: Programmingkid <programmingkidx@gmail.com>,
Gerd Hoffmann <kraxel@redhat.com>
Cc: Peter Maydell <peter.maydell@linaro.org>,
qemu-devel qemu-devel <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] [PATCH v2] Gives user ability to select endian format for video display - fixes Mac OS X guest color issue.
Date: Mon, 12 Jan 2015 16:11:21 +0100 [thread overview]
Message-ID: <54B3E419.1070408@redhat.com> (raw)
In-Reply-To: <E463F8D8-3DFF-48DF-8EA0-7703077007BE@gmail.com>
On 12/01/2015 15:51, Programmingkid wrote:
>>>>> + /* Determines the pixel format of the frame buffer */ +
>>>>> if (surface->format == PIXMAN_b8g8r8x8) { +
>>>>> bitmap_info = kCGBitmapByteOrder32Big |
>>>>> kCGImageAlphaNoneSkipFirst; + }
>>>
>>> That certainly goes into the right direction.
> Thank you.
>
>>> PIXMAN_* is native endian though, so I expect this will work on
>>> the intel macos host you are testing on but will fail on powerpc
>>> macos hosts.
> Unfortunately there appears to be no way to know. The last PowerPC
> Macs came out over 9 years ago. There probably isn't anyone on the
> list who uses one.
I have one, though it does not have enough memory to run Mac OS X
guests. In any case, pixman clearly says that b8g8r8x8 is BGRA in
host-endianness, so not the same as kCGBitmapByteOrder32Big.
So your patch just needs something like this in ui/cocoa.m:
#ifdef HOST_WORDS_BIGENDIAN
#define PIXMAN_BE_b8g8r8x8 PIXMAN_b8g8r8x8
#else
#define PIXMAN_BE_b8g8r8x8 PIXMAN_x8r8g8b8
#endif
so that you can replace PIXMAN_b8g8r8x8 with PIXMAN_BE_x8r8g8b8 in your
test. (You'll also need a matching "else" that restores
kCGBitmapByteOrder32Little---if only for clarity: assuming little-endian
in the initializer is ugly).
Paolo
next prev parent reply other threads:[~2015-01-12 15:11 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-05 21:27 [Qemu-devel] Gives user ability to select endian format for video display - fixes Mac OS X guest color issue Programmingkid
2015-01-05 22:06 ` Peter Maydell
2015-01-06 0:22 ` Programmingkid
2015-01-06 9:47 ` Peter Maydell
2015-01-06 10:04 ` Peter Maydell
2015-01-06 14:46 ` Programmingkid
[not found] ` <B7EDB3C1-FEBC-4A62-9AAE-193B3EBE09E1@gmail.com>
[not found] ` <CAFEAcA9LoKh=tguGA53qXrjsUGGM8PJdN9SvXHPWnMkwDhqUAQ@mail.gmail.com>
[not found] ` <122C8E58-48F5-4A54-B0AF-A826492D73B6@gmail.com>
[not found] ` <CAFEAcA_qEXULtxkFu3n+qrQhqVfN_b0VGRgm+=2idW8i=OZVMQ@mail.gmail.com>
2015-01-06 17:19 ` Programmingkid
2015-01-06 17:30 ` Peter Maydell
2015-01-06 17:57 ` Programmingkid
2015-01-06 18:07 ` Programmingkid
2015-01-06 20:29 ` Paolo Bonzini
2015-01-06 21:33 ` G 3
2015-01-07 10:35 ` Paolo Bonzini
2015-01-07 14:43 ` Gerd Hoffmann
2015-01-07 16:26 ` Programmingkid
2015-01-08 9:02 ` Gerd Hoffmann
2015-01-08 17:07 ` Programmingkid
2015-01-09 8:58 ` Gerd Hoffmann
2015-01-09 15:11 ` Programmingkid
2015-01-09 16:27 ` [Qemu-devel] [PATCH v2] " Programmingkid
2015-01-12 9:12 ` Gerd Hoffmann
2015-01-12 14:51 ` Programmingkid
2015-01-12 15:04 ` Peter Maydell
2015-01-12 16:12 ` Programmingkid
2015-01-12 15:11 ` Paolo Bonzini [this message]
2015-01-12 15:14 ` Peter Maydell
2015-01-12 15:37 ` Paolo Bonzini
2015-01-12 16:08 ` Programmingkid
2015-01-07 17:38 ` [Qemu-devel] " Programmingkid
[not found] ` <DDB1ECFE-F925-468A-9C9B-2EF3E276DF21@gmail.com>
[not found] ` <CAFEAcA805AGKAXQ+z938YtAPN3i3hc30Hx8cYFeNR+-4Xr08=Q@mail.gmail.com>
[not found] ` <8BCF0489-13DE-4E29-88FD-78F94E65FC27@gmail.com>
[not found] ` <CAFEAcA_hm1qTfyHPW2BuR9r7V_o_uUVYLjoT0Sa059ESdEs9kg@mail.gmail.com>
2015-01-06 23:57 ` Programmingkid
2015-01-07 5:17 ` Paolo Bonzini
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=54B3E419.1070408@redhat.com \
--to=pbonzini@redhat.com \
--cc=kraxel@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=programmingkidx@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.