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: Paul Brook
Subject: Re: [Qemu-devel] [PATCH 0 of 7] [UPDATE] DisplayState interface change
Date: Thu, 11 Dec 2008 15:45:16 +0000
User-agent: KMail/1.9.9

On Thursday 11 December 2008, Stefano Stabellini wrote:
> Paul Brook wrote:
> > On Thursday 11 December 2008, Stefano Stabellini wrote:
> >> Paul Brook wrote:
> >>>> 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);
> >>>>     }
> >>>> }
> >>>
> >>> It feels wrong to be modifying the surface here. We already have to
> >>> recreate the surface when we switch consoles, so why can't we use the
> >>> same code for a resize?
> >>
> >> We use mostly the same code already.
> >
> > Why only mostly?
> >
> > IIUC if a console is resized while active you get different behavior to a
> > console that is resized when inactive, then activated. This is wrong.
>
> Are we arguing about where to put two lines of code?
> I can use the same function for both even if the code is already the same.

No. We're arguing about how surface creation is managed. As I pointed out the 
two implementations are no equivalent.

Paul




reply via email to

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