aboutsummaryrefslogtreecommitdiff
path: root/ui/sdl.c
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2014-06-18 11:03:15 +0200
committerGerd Hoffmann <kraxel@redhat.com>2014-09-05 13:27:11 +0200
commit30f1e661b640de58ba1e8178f7f2290179a7e01c (patch)
treedc373a0d374386bc793e67a9e185dbc5ecdfc8f1 /ui/sdl.c
parent56bd9ea1a37395012adecca8b9c4762da15b01e7 (diff)
downloadqemu-30f1e661b640de58ba1e8178f7f2290179a7e01c.zip
qemu-30f1e661b640de58ba1e8178f7f2290179a7e01c.tar.gz
qemu-30f1e661b640de58ba1e8178f7f2290179a7e01c.tar.bz2
console: stop using PixelFormat
With this patch the qemu console core stops using PixelFormat and pixman format codes side-by-side, pixman format code is the primary way to specify the DisplaySurface format: * DisplaySurface stops carrying a PixelFormat field. * qemu_create_displaysurface_from() expects a pixman format now. Functions to convert PixelFormat to pixman_format_code_t (and back) exist for those who still use PixelFormat. As PixelFormat allows easy access to masks and shifts it will probably continue to exist. [ xenfb added by Benjamin Herrenschmidt ] Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'ui/sdl.c')
-rw-r--r--ui/sdl.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/ui/sdl.c b/ui/sdl.c
index 4e7f920..94c1d9d 100644
--- a/ui/sdl.c
+++ b/ui/sdl.c
@@ -127,6 +127,7 @@ static void do_sdl_resize(int width, int height, int bpp)
static void sdl_switch(DisplayChangeListener *dcl,
DisplaySurface *new_surface)
{
+ PixelFormat pf = qemu_pixelformat_from_pixman(new_surface->format);
/* temporary hack: allows to call sdl_switch to handle scaling changes */
if (new_surface) {
@@ -148,8 +149,8 @@ static void sdl_switch(DisplayChangeListener *dcl,
(surface_data(surface),
surface_width(surface), surface_height(surface),
surface_bits_per_pixel(surface), surface_stride(surface),
- surface->pf.rmask, surface->pf.gmask,
- surface->pf.bmask, surface->pf.amask);
+ pf.rmask, pf.gmask,
+ pf.bmask, pf.amask);
}
/* generic keyboard conversion */