mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 23:33: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
|
@ -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 */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue