qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Dave Airlie <airlied@gmail.com>
To: Gerd Hoffmann <kraxel@redhat.com>
Cc: "qemu-devel@nongnu.org" <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] console muti-head some more design input
Date: Wed, 20 Nov 2013 12:59:30 +1000	[thread overview]
Message-ID: <CAPM=9tx08mf08OR2dETiSQwcy4ze35iTAP=e50aETf+eZ9xThQ@mail.gmail.com> (raw)
In-Reply-To: <1384848690.16718.139.camel@nilsson.home.kraxel.org>

On Tue, Nov 19, 2013 at 6:11 PM, Gerd Hoffmann <kraxel@redhat.com> wrote:
>   Hi,
>
>> So I felt I had a choice here for sharing a single output surface
>> amongst outputs:
>>
>> a) have multiple QemuConsole reference multiple DisplaySurface wihch
>> reference a single pixman image,
>
> This one.
>
>> In either case we need to store, width/height of the console and x/y
>> offset into the output surface somewhere, as the output dimensions
>> will not correspond to surface dimensions or the surface dimensions
>> won't correspond to the pixman image dimensions
>
> Not needed (well, internal to virtio-gpu probably).

I think you are only considering output here, for input we definitely
need some idea of screen layout, and this needs to be stored
somewhere.

e.g. SDL2 gets an input event in the right hand window it needs to
translate that into an input event on the whole output surface.

Have a look the virtio-gpu branch in my repo (don't look at the
history, its ugly, just the final state), you'll see code in sdl2.c to
do input translation from window coordinates to the overall screen
space. So we need at least the x,y offset in the ui code, and I think
we need to communicate that via the console.

Otherwise I think I've done things the way you've said and it seems to
be working for me on a dual-head setup.

(oh and yes this all sw rendering only, to do 3D rendering we need to
put a thread in to do the GL stuff, but it interacts with the console
layer quite a bit, since SDL and the virtio-gpu need to be in the same
thread, so things like resize can work).

Dave.

  reply	other threads:[~2013-11-20  2:59 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-19  6:24 [Qemu-devel] console muti-head some more design input Dave Airlie
2013-11-19  8:11 ` Gerd Hoffmann
2013-11-20  2:59   ` Dave Airlie [this message]
2013-11-20  4:06     ` John Baboval
2013-11-20  5:17       ` Dave Airlie
2013-11-20  5:18         ` Dave Airlie
2013-11-20  8:12     ` Gerd Hoffmann
2013-11-20 14:32       ` John Baboval
2013-11-20 15:14         ` Gerd Hoffmann
2013-11-20 15:49           ` John Baboval
2013-11-22  8:36             ` Gerd Hoffmann
2013-11-21  0:45           ` Dave Airlie
2013-11-22  8:41             ` Gerd Hoffmann
2013-11-27  4:29               ` Dave Airlie
2013-11-27  7:11                 ` Gerd Hoffmann
2013-11-27 14:23                 ` John Baboval

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='CAPM=9tx08mf08OR2dETiSQwcy4ze35iTAP=e50aETf+eZ9xThQ@mail.gmail.com' \
    --to=airlied@gmail.com \
    --cc=kraxel@redhat.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).