mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-03 07:43:54 -06:00
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>
This commit is contained in:
parent
56bd9ea1a3
commit
30f1e661b6
8 changed files with 42 additions and 45 deletions
|
@ -1689,9 +1689,11 @@ static void vga_draw_graphic(VGACommonState *s, int full_update)
|
|||
height != s->last_height ||
|
||||
s->last_depth != depth) {
|
||||
if (depth == 32 || (depth == 16 && !byteswap)) {
|
||||
pixman_format_code_t format =
|
||||
qemu_default_pixman_format(depth, !byteswap);
|
||||
surface = qemu_create_displaysurface_from(disp_width,
|
||||
height, depth, s->line_offset,
|
||||
s->vram_ptr + (s->start_addr * 4), byteswap);
|
||||
height, format, s->line_offset,
|
||||
s->vram_ptr + (s->start_addr * 4));
|
||||
dpy_gfx_replace_surface(s->con, surface);
|
||||
} else {
|
||||
qemu_console_resize(s->con, disp_width, height);
|
||||
|
@ -1707,9 +1709,11 @@ static void vga_draw_graphic(VGACommonState *s, int full_update)
|
|||
} else if (is_buffer_shared(surface) &&
|
||||
(full_update || surface_data(surface) != s->vram_ptr
|
||||
+ (s->start_addr * 4))) {
|
||||
pixman_format_code_t format =
|
||||
qemu_default_pixman_format(depth, !byteswap);
|
||||
surface = qemu_create_displaysurface_from(disp_width,
|
||||
height, depth, s->line_offset,
|
||||
s->vram_ptr + (s->start_addr * 4), byteswap);
|
||||
height, format, s->line_offset,
|
||||
s->vram_ptr + (s->start_addr * 4));
|
||||
dpy_gfx_replace_surface(s->con, surface);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue