diff options
author | Gerd Hoffmann <kraxel@redhat.com> | 2018-03-01 11:05:39 +0100 |
---|---|---|
committer | Gerd Hoffmann <kraxel@redhat.com> | 2018-03-05 08:44:11 +0100 |
commit | 16ab0a74e44300add9a7966e6f4f95ed4c0e833e (patch) | |
tree | d892594e4518d7cfe0bf24512918f9939d464710 /ui/egl-headless.c | |
parent | b0766612d16da185a822636cf54214123e8038cf (diff) |
egl-headless: switch over to new display registry
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Message-id: 20180301100547.18962-6-kraxel@redhat.com
Diffstat (limited to 'ui/egl-headless.c')
-rw-r--r-- | ui/egl-headless.c | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/ui/egl-headless.c b/ui/egl-headless.c index b33e0b21fd..7c877122d3 100644 --- a/ui/egl-headless.c +++ b/ui/egl-headless.c @@ -164,7 +164,12 @@ static const DisplayChangeListenerOps egl_ops = { .dpy_gl_update = egl_scanout_flush, }; -void egl_headless_init(DisplayOptions *opts) +static void early_egl_headless_init(DisplayOptions *opts) +{ + display_opengl = 1; +} + +static void egl_headless_init(DisplayState *ds, DisplayOptions *opts) { QemuConsole *con; egl_dpy *edpy; @@ -188,3 +193,16 @@ void egl_headless_init(DisplayOptions *opts) register_displaychangelistener(&edpy->dcl); } } + +static QemuDisplay qemu_display_egl = { + .type = DISPLAY_TYPE_EGL_HEADLESS, + .early_init = early_egl_headless_init, + .init = egl_headless_init, +}; + +static void register_egl(void) +{ + qemu_display_register(&qemu_display_egl); +} + +type_init(register_egl); |