mirror of
https://github.com/mii443/qemu.git
synced 2025-08-31 03:19:27 +00:00
ui/console: remove redundant format field
It's already part of PIXMAN image. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
This commit is contained in:
@ -152,7 +152,6 @@ typedef struct ScanoutTexture {
|
||||
} ScanoutTexture;
|
||||
|
||||
typedef struct DisplaySurface {
|
||||
pixman_format_code_t format;
|
||||
pixman_image_t *image;
|
||||
uint8_t flags;
|
||||
#ifdef CONFIG_OPENGL
|
||||
@ -436,23 +435,23 @@ static inline int surface_height(DisplaySurface *s)
|
||||
return pixman_image_get_height(s->image);
|
||||
}
|
||||
|
||||
static inline pixman_format_code_t surface_format(DisplaySurface *s)
|
||||
{
|
||||
return pixman_image_get_format(s->image);
|
||||
}
|
||||
|
||||
static inline int surface_bits_per_pixel(DisplaySurface *s)
|
||||
{
|
||||
int bits = PIXMAN_FORMAT_BPP(s->format);
|
||||
int bits = PIXMAN_FORMAT_BPP(surface_format(s));
|
||||
return bits;
|
||||
}
|
||||
|
||||
static inline int surface_bytes_per_pixel(DisplaySurface *s)
|
||||
{
|
||||
int bits = PIXMAN_FORMAT_BPP(s->format);
|
||||
int bits = PIXMAN_FORMAT_BPP(surface_format(s));
|
||||
return DIV_ROUND_UP(bits, 8);
|
||||
}
|
||||
|
||||
static inline pixman_format_code_t surface_format(DisplaySurface *s)
|
||||
{
|
||||
return s->format;
|
||||
}
|
||||
|
||||
typedef uint32_t console_ch_t;
|
||||
|
||||
static inline void console_write_ch(console_ch_t *dest, uint32_t ch)
|
||||
|
Reference in New Issue
Block a user