qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH] Update cocoa.m to match new DisplayState code


From: Stefano Stabellini
Subject: Re: [Qemu-devel] [PATCH] Update cocoa.m to match new DisplayState code
Date: Mon, 26 Jan 2009 11:14:29 +0000
User-agent: Thunderbird 2.0.0.14 (X11/20080505)

Samuel Benson wrote:

>> It would be better not to change the DisplayState surface from
>> cocoa\sdl\vnc but try to render the format exposed by the emulated
>> graphic card ourself.
>> In fact in most cases the emulated vga exposes a 32bpp surface with
>> linesize = width * 4, so you don't need to force it yourself.
>> The only exception is the 16bpp case, but you should be able to render
>> that as well without too many problems.
> 
> The previous code forced this change, and as this code merely synced it
> to the new structures,
> I did not think anything to be wrong with it. If the structures come pre
> initialized,
> I'll remove these lines and see if it still works.


The old DisplayState interface was supposed to be initialized by cocoa,
then the emulated graphic card would do the conversion into the format
requested by cocoa.

The new DisplayState interface is initialized by the graphic card and
cocoa is supposed to be able to render whatever format is exposed by the
graphic card. The pixel formats actually exposed are very few, see my
other mail.

But from the second version of the patch I gather that you already
understand how the new interface works.

 
> The one section I did have trouble understanding was the DisplaySurface
> flags; are those set
> in regards to the host endianness or the guests?
> 

QEMU_BIG_ENDIAN_FLAG refers to the host endianness.
The guest video buffer is automatically converted into the host
endianness if necessary, so you don't have to worry about it.
You can always assume that the DisplayState surface has the same
endianness as the host, as long as you repect the pixelformat
ds->surface->pf (see my other mail and console.c:qemu_default_pixelformat).





reply via email to

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