mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 00:03:54 -06:00
console: rework DisplaySurface handling [dcl/ui side]
Replace the dpy_gfx_resize and dpy_gfx_setdata DisplayChangeListener callbacks with a dpy_gfx_switch callback which notifies the ui code when the framebuffer backing storage changes. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
This commit is contained in:
parent
da229ef3b3
commit
c12aeb860c
9 changed files with 43 additions and 55 deletions
|
@ -367,7 +367,8 @@ void qemu_spice_display_update(SimpleSpiceDisplay *ssd,
|
|||
qemu_spice_rect_union(&ssd->dirty, &update_area);
|
||||
}
|
||||
|
||||
void qemu_spice_display_resize(SimpleSpiceDisplay *ssd)
|
||||
void qemu_spice_display_switch(SimpleSpiceDisplay *ssd,
|
||||
DisplaySurface *surface)
|
||||
{
|
||||
SimpleSpiceUpdate *update;
|
||||
|
||||
|
@ -589,11 +590,12 @@ static void display_update(DisplayChangeListener *dcl,
|
|||
qemu_spice_display_update(ssd, x, y, w, h);
|
||||
}
|
||||
|
||||
static void display_resize(DisplayChangeListener *dcl,
|
||||
struct DisplayState *ds)
|
||||
static void display_switch(DisplayChangeListener *dcl,
|
||||
struct DisplayState *ds,
|
||||
struct DisplaySurface *surface)
|
||||
{
|
||||
SimpleSpiceDisplay *ssd = container_of(dcl, SimpleSpiceDisplay, dcl);
|
||||
qemu_spice_display_resize(ssd);
|
||||
qemu_spice_display_switch(ssd, surface);
|
||||
}
|
||||
|
||||
static void display_refresh(DisplayChangeListener *dcl,
|
||||
|
@ -606,7 +608,7 @@ static void display_refresh(DisplayChangeListener *dcl,
|
|||
static const DisplayChangeListenerOps display_listener_ops = {
|
||||
.dpy_name = "spice",
|
||||
.dpy_gfx_update = display_update,
|
||||
.dpy_gfx_resize = display_resize,
|
||||
.dpy_gfx_switch = display_switch,
|
||||
.dpy_refresh = display_refresh,
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue