console: rework DisplaySurface handling [vga emu side]

Decouple DisplaySurface allocation & deallocation from DisplayState.
Replace dpy_gfx_resize + dpy_gfx_setdata with a dpy_gfx_replace_surface
function.

This handles the graphic hardware emulation.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
This commit is contained in:
Gerd Hoffmann 2013-02-28 10:48:02 +01:00
parent 468dfd6de2
commit da229ef3b3
8 changed files with 54 additions and 84 deletions

View file

@ -210,11 +210,8 @@ DisplaySurface* qemu_create_displaysurface_from(int width, int height, int bpp,
PixelFormat qemu_different_endianness_pixelformat(int bpp);
PixelFormat qemu_default_pixelformat(int bpp);
DisplaySurface *qemu_create_displaysurface(DisplayState *ds,
int width, int height);
DisplaySurface *qemu_resize_displaysurface(DisplayState *ds,
int width, int height);
void qemu_free_displaysurface(DisplayState *ds);
DisplaySurface *qemu_create_displaysurface(int width, int height);
void qemu_free_displaysurface(DisplaySurface *surface);
static inline int is_surface_bgr(DisplaySurface *surface)
{
@ -236,8 +233,8 @@ void register_displaychangelistener(DisplayState *ds,
void unregister_displaychangelistener(DisplayChangeListener *dcl);
void dpy_gfx_update(DisplayState *s, int x, int y, int w, int h);
void dpy_gfx_resize(DisplayState *s);
void dpy_gfx_setdata(DisplayState *s);
void dpy_gfx_replace_surface(DisplayState *s,
DisplaySurface *surface);
void dpy_refresh(DisplayState *s);
void dpy_gfx_copy(struct DisplayState *s, int src_x, int src_y,
int dst_x, int dst_y, int w, int h);