From 30f1e661b640de58ba1e8178f7f2290179a7e01c Mon Sep 17 00:00:00 2001 From: Gerd Hoffmann Date: Wed, 18 Jun 2014 11:03:15 +0200 Subject: 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 --- hw/display/vmware_vga.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'hw/display/vmware_vga.c') diff --git a/hw/display/vmware_vga.c b/hw/display/vmware_vga.c index 591b645439..b8901d018b 100644 --- a/hw/display/vmware_vga.c +++ b/hw/display/vmware_vga.c @@ -1052,10 +1052,12 @@ static inline void vmsvga_check_size(struct vmsvga_state_s *s) s->new_height != surface_height(surface) || s->new_depth != surface_bits_per_pixel(surface)) { int stride = (s->new_depth * s->new_width) / 8; + pixman_format_code_t format = + qemu_default_pixman_format(s->new_depth, true); trace_vmware_setmode(s->new_width, s->new_height, s->new_depth); surface = qemu_create_displaysurface_from(s->new_width, s->new_height, - s->new_depth, stride, - s->vga.vram_ptr, false); + format, stride, + s->vga.vram_ptr); dpy_gfx_replace_surface(s->vga.con, surface); s->invalidated = 1; } -- cgit v1.2.3-55-g7522