qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 0 of 7] [UPDATE] DisplayState interface change


From: Stefano Stabellini
Subject: Re: [Qemu-devel] [PATCH 0 of 7] [UPDATE] DisplayState interface change
Date: Thu, 11 Dec 2008 11:55:43 +0000
User-agent: Thunderbird 2.0.0.14 (X11/20080505)

Anthony Liguori wrote:

> I think this patch series is a big step in this direction.  The
> is_graphics_console is an artifact.  What we need to follow up this
> series with, is adding keyboard/mouse input to DisplayState, and pushing
> all the virtual terminal switching into TextConsole and cleaning
> TextConsole up to be a more clean virtual KVM.
> 



if it is any better I can move the is_graphic_console artifact from
vga.c to console.c:

void qemu_console_resize(DisplayState *ds, int width, int height, int bpp,
                         int linesize, uint8_t *data)
{
    TextConsole *s = get_graphic_console();
    s->g_width = width;
    s->g_height = height;
    if (is_graphic_console()) {
        if (data && (bpp == 16 || bpp == 32)) {
            qemu_freeDisplaySurface(ds->surface);
            ds->surface = qemu_createDisplaySurfaceFrom(width, height, bpp, 
linesize, data);
        } else {
            ds->surface = qemu_resizeDisplaySurface(ds->surface, width, height, 
32, 4 * width);
        }
        dpy_resize(ds);
    }
}


of course this means changing every single call to qemu_console_resize
in qemu because the number of arguments is changed.






reply via email to

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