#include "ui/console.h"
#include "sysemu/sysemu.h"
+#if defined(CONFIG_OPENGL_DMABUF)
+# if SPICE_SERVER_VERSION >= 0x000d01 /* release 0.13.1 */
+# define HAVE_SPICE_GL 1
+# include "ui/egl-helpers.h"
+# include "ui/egl-context.h"
+# endif
+#endif
+
#define NUM_MEMSLOTS 8
#define MEMSLOT_GENERATION_BITS 8
#define MEMSLOT_SLOT_BITS 8
QXL_COOKIE_TYPE_IO,
QXL_COOKIE_TYPE_RENDER_UPDATE_AREA,
QXL_COOKIE_TYPE_POST_LOAD_MONITORS_CONFIG,
+ QXL_COOKIE_TYPE_GL_DRAW_DONE,
};
typedef struct QXLCookie {
QXLRect area;
int redraw;
} render;
+ void *data;
} u;
} QXLCookie;
/* cursor (without qxl): displaychangelistener -> spice server */
SimpleSpiceCursor *ptr_define;
SimpleSpiceCursor *ptr_move;
- uint16_t ptr_x, ptr_y;
+ int16_t ptr_x, ptr_y;
+ int16_t hot_x, hot_y;
/* cursor (with qxl): qxl local renderer -> displaychangelistener */
QEMUCursor *cursor;
int mouse_x, mouse_y;
QEMUBH *cursor_bh;
+
+#ifdef HAVE_SPICE_GL
+ /* opengl rendering */
+ QEMUBH *gl_unblock_bh;
+ QEMUTimer *gl_unblock_timer;
+ ConsoleGLState *gls;
+ int gl_updates;
+ bool have_scanout;
+ bool have_surface;
+#endif
};
struct SimpleSpiceUpdate {
void qemu_spice_create_host_memslot(SimpleSpiceDisplay *ssd);
void qemu_spice_create_host_primary(SimpleSpiceDisplay *ssd);
void qemu_spice_destroy_host_primary(SimpleSpiceDisplay *ssd);
-void qemu_spice_vm_change_state_handler(void *opaque, int running,
- RunState state);
void qemu_spice_display_init_common(SimpleSpiceDisplay *ssd);
void qemu_spice_display_update(SimpleSpiceDisplay *ssd,