summaryrefslogtreecommitdiff
path: root/hw/display/xenfb.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 /hw/display/xenfb.c
parent56bd9ea1a37395012adecca8b9c4762da15b01e7 (diff)
downloadqemu-30f1e661b640de58ba1e8178f7f2290179a7e01c.tar.gz
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 'hw/display/xenfb.c')
-rw-r--r--hw/display/xenfb.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/hw/display/xenfb.c b/hw/display/xenfb.c
index 07ddc9deba..8a61e959a6 100644
--- a/hw/display/xenfb.c
+++ b/hw/display/xenfb.c
@@ -713,15 +713,17 @@ static void xenfb_update(void *opaque)
/* resize if needed */
if (xenfb->do_resize) {
+ pixman_format_code_t format;
+
xenfb->do_resize = 0;
switch (xenfb->depth) {
case 16:
case 32:
/* console.c supported depth -> buffer can be used directly */
+ format = qemu_default_pixman_format(xenfb->depth, true);
surface = qemu_create_displaysurface_from
- (xenfb->width, xenfb->height, xenfb->depth,
- xenfb->row_stride, xenfb->pixels + xenfb->offset,
- false);
+ (xenfb->width, xenfb->height, format,
+ xenfb->row_stride, xenfb->pixels + xenfb->offset);
break;
default:
/* we must convert stuff */