summaryrefslogtreecommitdiffstats
path: root/hw/display/qxl-render.c
diff options
context:
space:
mode:
authorGerd Hoffmann2014-06-18 11:03:15 +0200
committerGerd Hoffmann2014-09-05 13:27:11 +0200
commit30f1e661b640de58ba1e8178f7f2290179a7e01c (patch)
treedc373a0d374386bc793e67a9e185dbc5ecdfc8f1 /hw/display/qxl-render.c
parentconsole: reimplement qemu_default_pixelformat (diff)
downloadqemu-30f1e661b640de58ba1e8178f7f2290179a7e01c.tar.gz
qemu-30f1e661b640de58ba1e8178f7f2290179a7e01c.tar.xz
qemu-30f1e661b640de58ba1e8178f7f2290179a7e01c.zip
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/qxl-render.c')
-rw-r--r--hw/display/qxl-render.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/hw/display/qxl-render.c b/hw/display/qxl-render.c
index bcc5c3701a..e812ddd6e7 100644
--- a/hw/display/qxl-render.c
+++ b/hw/display/qxl-render.c
@@ -116,13 +116,14 @@ static void qxl_render_update_area_unlocked(PCIQXLDevice *qxl)
qxl->guest_primary.bytes_pp,
qxl->guest_primary.bits_pp);
if (qxl->guest_primary.qxl_stride > 0) {
+ pixman_format_code_t format =
+ qemu_default_pixman_format(qxl->guest_primary.bits_pp, true);
surface = qemu_create_displaysurface_from
(qxl->guest_primary.surface.width,
qxl->guest_primary.surface.height,
- qxl->guest_primary.bits_pp,
+ format,
qxl->guest_primary.abs_stride,
- qxl->guest_primary.data,
- false);
+ qxl->guest_primary.data);
} else {
surface = qemu_create_displaysurface
(qxl->guest_primary.surface.width,