From: andrzej zaborowski <balrogg@gmail.com>
To: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] use corect depth from DisplaySurface in vmware_vga.c
Date: Tue, 25 Aug 2009 01:45:15 +0200 [thread overview]
Message-ID: <fb249edb0908241645m6d9690b8pe5b35d44ad07f251@mail.gmail.com> (raw)
In-Reply-To: <20090824132229.GB24730@1und1.de>
2009/8/24 Reimar Döffinger <Reimar.Doeffinger@gmx.de>:
> On Sun, Aug 23, 2009 at 07:25:32PM +0200, andrzej zaborowski wrote:
>> It was discussed at some point earlier that at the time this code runs
>> SDL is not initialised and the depth returned is an arbitrary value
>> from default allocator.
>
> It is not arbitrary. It matches exactly the DisplaySurface's
> linesize and data buffer size.
Only at the moment the function is called. The value is still
hardcoded, just elsewhere. Once display backend initialises this
value may be invalid.
> As such, I want to add that the revert commit message of "was
> incorrect." doesn't qualify as useful to me.
I wasn't intending to push this commit, instead I responded to the
thread but later noticed I had pushed it.
>
>> What vmware_vga really should do is ask SDL
>> for the host's depth and set the surface's pixelformat to that.
>
> Obvious question: why shouldn't SDL ask the VGA for its depth and try
> to use a surface with that format?
It should, the VGA should create the surface using
qemu_create_displaysurface... like in vga.c. But, this depth is not
set by the guest, it should match the host's depth because this is how
the vmware's "specification" (if you can call it that) defines it.
Beside that it's an obvious performance gain. The API change did not
magically remove the pixel by pixel conversion of the colour space, it
just hid it in SDL, under more indirection.
> Has the advantage that the depth
> of the emulated stuff stays the same, whereas with your suggestion
> if I tried a loadvm from a savevm of your machine qemu would get
> in a bit in trouble.
I'm not sure I understand this sentence, but apparently there's some
way vmware can communicate to the guest that the bit depth has
changed. This is not implemented in vmware_vga.c yet.
Similarly when the window is resized, instead of zooming we could
communicate the resolution change to the guest, but it's not
implemented yet.
Cheers
next prev parent reply other threads:[~2009-08-24 23:45 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-17 10:08 [Qemu-devel] [PATCH] use corect depth from DisplaySurface in vmware_vga.c Reimar Döffinger
2009-08-23 17:25 ` andrzej zaborowski
2009-08-24 13:22 ` Reimar Döffinger
2009-08-24 23:45 ` andrzej zaborowski [this message]
2009-08-25 14:54 ` Reimar Döffinger
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=fb249edb0908241645m6d9690b8pe5b35d44ad07f251@mail.gmail.com \
--to=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).