diff options
author | Marc-André Lureau <marcandre.lureau@redhat.com> | 2023-08-30 13:38:21 +0400 |
---|---|---|
committer | Marc-André Lureau <marcandre.lureau@redhat.com> | 2023-09-12 10:37:02 +0400 |
commit | ff174c67dbe29ee2792cc020e077a0fff8af501c (patch) | |
tree | 6cded0d72e47f0e127e029784c4cc46a64786fa1 /include | |
parent | cc6ba2c6f53d9f6003a52845298807dac7709e0f (diff) | |
download | qemu-ff174c67dbe29ee2792cc020e077a0fff8af501c.zip qemu-ff174c67dbe29ee2792cc020e077a0fff8af501c.tar.gz qemu-ff174c67dbe29ee2792cc020e077a0fff8af501c.tar.bz2 |
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>
Diffstat (limited to 'include')
-rw-r--r-- | include/ui/console.h | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/include/ui/console.h b/include/ui/console.h index 26d63d1..93bb03a 100644 --- a/include/ui/console.h +++ b/include/ui/console.h @@ -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) |