提交 537a4391 编写于 作者: G Gerd Hoffmann

console: make qemu_alloc_display static

Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
上级 69c77777
...@@ -1294,30 +1294,8 @@ static QemuConsole *new_console(DisplayState *ds, console_type_t console_type) ...@@ -1294,30 +1294,8 @@ static QemuConsole *new_console(DisplayState *ds, console_type_t console_type)
return s; return s;
} }
DisplaySurface *qemu_create_displaysurface(DisplayState *ds, static void qemu_alloc_display(DisplaySurface *surface, int width, int height,
int width, int height) int linesize, PixelFormat pf, int newflags)
{
DisplaySurface *surface = g_new0(DisplaySurface, 1);
int linesize = width * 4;
qemu_alloc_display(surface, width, height, linesize,
qemu_default_pixelformat(32), 0);
return surface;
}
DisplaySurface *qemu_resize_displaysurface(DisplayState *ds,
int width, int height)
{
int linesize = width * 4;
trace_displaysurface_resize(ds, ds->surface, width, height);
qemu_alloc_display(ds->surface, width, height, linesize,
qemu_default_pixelformat(32), 0);
return ds->surface;
}
void qemu_alloc_display(DisplaySurface *surface, int width, int height,
int linesize, PixelFormat pf, int newflags)
{ {
surface->width = width; surface->width = width;
surface->height = height; surface->height = height;
...@@ -1342,6 +1320,28 @@ void qemu_alloc_display(DisplaySurface *surface, int width, int height, ...@@ -1342,6 +1320,28 @@ void qemu_alloc_display(DisplaySurface *surface, int width, int height,
#endif #endif
} }
DisplaySurface *qemu_create_displaysurface(DisplayState *ds,
int width, int height)
{
DisplaySurface *surface = g_new0(DisplaySurface, 1);
int linesize = width * 4;
qemu_alloc_display(surface, width, height, linesize,
qemu_default_pixelformat(32), 0);
return surface;
}
DisplaySurface *qemu_resize_displaysurface(DisplayState *ds,
int width, int height)
{
int linesize = width * 4;
trace_displaysurface_resize(ds, ds->surface, width, height);
qemu_alloc_display(ds->surface, width, height, linesize,
qemu_default_pixelformat(32), 0);
return ds->surface;
}
DisplaySurface *qemu_create_displaysurface_from(int width, int height, int bpp, DisplaySurface *qemu_create_displaysurface_from(int width, int height, int bpp,
int linesize, uint8_t *data) int linesize, uint8_t *data)
{ {
......
...@@ -190,8 +190,6 @@ void register_displaystate(DisplayState *ds); ...@@ -190,8 +190,6 @@ void register_displaystate(DisplayState *ds);
DisplayState *get_displaystate(void); DisplayState *get_displaystate(void);
DisplaySurface* qemu_create_displaysurface_from(int width, int height, int bpp, DisplaySurface* qemu_create_displaysurface_from(int width, int height, int bpp,
int linesize, uint8_t *data); int linesize, uint8_t *data);
void qemu_alloc_display(DisplaySurface *surface, int width, int height,
int linesize, PixelFormat pf, int newflags);
PixelFormat qemu_different_endianness_pixelformat(int bpp); PixelFormat qemu_different_endianness_pixelformat(int bpp);
PixelFormat qemu_default_pixelformat(int bpp); PixelFormat qemu_default_pixelformat(int bpp);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册