From a7dfbe289ede8adb253d735daef88a39709053dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Date: Thu, 4 Feb 2021 14:52:23 +0400 Subject: ui: add an optional get_flags callback to GraphicHwOps MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Those flags can be used to express different requirements for the display or other needs. Signed-off-by: Marc-André Lureau Message-Id: <20210204105232.834642-12-marcandre.lureau@redhat.com> Signed-off-by: Gerd Hoffmann --- include/ui/console.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'include/ui') diff --git a/include/ui/console.h b/include/ui/console.h index ac989fdf70..0595aa9953 100644 --- a/include/ui/console.h +++ b/include/ui/console.h @@ -368,7 +368,16 @@ static inline void console_write_ch(console_ch_t *dest, uint32_t ch) *dest = ch; } +enum { + GRAPHIC_FLAGS_NONE = 0, + /* require a console/display with GL callbacks */ + GRAPHIC_FLAGS_GL = 1 << 0, + /* require a console/display with DMABUF import */ + GRAPHIC_FLAGS_DMABUF = 1 << 1, +}; + typedef struct GraphicHwOps { + int (*get_flags)(void *opaque); /* optional, default 0 */ void (*invalidate)(void *opaque); void (*gfx_update)(void *opaque); bool gfx_update_async; /* if true, calls graphic_hw_update_done() */ -- cgit v1.2.3