aboutsummaryrefslogtreecommitdiff
path: root/include/ui
diff options
context:
space:
mode:
authorMarc-André Lureau <marcandre.lureau@redhat.com>2021-02-04 14:52:23 +0400
committerGerd Hoffmann <kraxel@redhat.com>2021-02-04 15:58:54 +0100
commita7dfbe289ede8adb253d735daef88a39709053dc (patch)
tree5b4b4cf2783f8a85ae45d05ca12d04a1b2e05d21 /include/ui
parentff64d44fb8f6636ece3064f86babe48e3807533d (diff)
ui: add an optional get_flags callback to GraphicHwOps
Those flags can be used to express different requirements for the display or other needs. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <20210204105232.834642-12-marcandre.lureau@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'include/ui')
-rw-r--r--include/ui/console.h9
1 files changed, 9 insertions, 0 deletions
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() */