+static bool
+egl_is_compatible_dcl(DisplayGLCtx *dgc,
+ DisplayChangeListener *dcl)
+{
+ if (!dcl->ops->dpy_gl_update) {
+ /*
+ * egl-headless is compatible with all 2d listeners, as it blits the GL
+ * updates on the 2d console surface.
+ */
+ return true;
+ }
+
+ return dcl->ops == &egl_ops;
+}
+
+static const DisplayGLCtxOps eglctx_ops = {
+ .dpy_gl_ctx_is_compatible_dcl = egl_is_compatible_dcl,
+ .dpy_gl_ctx_create = egl_create_context,
+ .dpy_gl_ctx_destroy = qemu_egl_destroy_context,
+ .dpy_gl_ctx_make_current = qemu_egl_make_context_current,
+};
+