Lines Matching refs:dcl

76 static bool displaychangelistener_has_dmabuf(DisplayChangeListener *dcl);
78 DisplayChangeListener *dcl, Error **errp);
87 DisplayChangeListener *dcl; in gui_update() local
93 QLIST_FOREACH(dcl, &ds->listeners, next) { in gui_update()
94 dcl_interval = dcl->update_interval ? in gui_update()
95 dcl->update_interval : GUI_REFRESH_INTERVAL_DEFAULT; in gui_update()
110 DisplayChangeListener *dcl; in gui_setup_refresh() local
113 QLIST_FOREACH(dcl, &ds->listeners, next) { in gui_setup_refresh()
114 if (dcl->ops->dpy_refresh != NULL) { in gui_setup_refresh()
224 static void displaychangelistener_gfx_switch(DisplayChangeListener *dcl, in displaychangelistener_gfx_switch() argument
228 if (dcl->ops->dpy_gfx_switch) { in displaychangelistener_gfx_switch()
229 dcl->ops->dpy_gfx_switch(dcl, new_surface); in displaychangelistener_gfx_switch()
232 if (update && dcl->ops->dpy_gfx_update) { in displaychangelistener_gfx_switch()
233 dcl->ops->dpy_gfx_update(dcl, 0, 0, in displaychangelistener_gfx_switch()
261 static void displaychangelistener_display_console(DisplayChangeListener *dcl, in displaychangelistener_display_console() argument
267 QemuConsole *con = dcl->con; in displaychangelistener_display_console()
269 if (!con || !console_compatible_with(con, dcl, errp)) { in displaychangelistener_display_console()
276 displaychangelistener_gfx_switch(dcl, dummy, TRUE); in displaychangelistener_display_console()
281 displaychangelistener_gfx_switch(dcl, con->surface, in displaychangelistener_display_console()
285 displaychangelistener_has_dmabuf(dcl)) { in displaychangelistener_display_console()
286 dcl->ops->dpy_gl_scanout_dmabuf(dcl, con->scanout.dmabuf); in displaychangelistener_display_console()
288 dcl->ops->dpy_gl_scanout_texture) { in displaychangelistener_display_console()
289 dcl->ops->dpy_gl_scanout_texture(dcl, in displaychangelistener_display_console()
557 static bool displaychangelistener_has_dmabuf(DisplayChangeListener *dcl) in displaychangelistener_has_dmabuf() argument
559 if (dcl->ops->dpy_has_dmabuf) { in displaychangelistener_has_dmabuf()
560 return dcl->ops->dpy_has_dmabuf(dcl); in displaychangelistener_has_dmabuf()
563 if (dcl->ops->dpy_gl_scanout_dmabuf) { in displaychangelistener_has_dmabuf()
571 DisplayChangeListener *dcl, Error **errp) in console_compatible_with() argument
578 !con->gl->ops->dpy_gl_ctx_is_compatible_dcl(con->gl, dcl)) { in console_compatible_with()
580 dcl->ops->dpy_name); in console_compatible_with()
592 !displaychangelistener_has_dmabuf(dcl)) { in console_compatible_with()
677 dcl_set_graphic_cursor(DisplayChangeListener *dcl, QemuGraphicConsole *con) in dcl_set_graphic_cursor() argument
679 if (con && con->cursor && dcl->ops->dpy_cursor_define) { in dcl_set_graphic_cursor()
680 dcl->ops->dpy_cursor_define(dcl, con->cursor); in dcl_set_graphic_cursor()
682 if (con && dcl->ops->dpy_mouse_set) { in dcl_set_graphic_cursor()
683 dcl->ops->dpy_mouse_set(dcl, con->cursor_x, con->cursor_y, con->cursor_on); in dcl_set_graphic_cursor()
687 void register_displaychangelistener(DisplayChangeListener *dcl) in register_displaychangelistener() argument
689 assert(!dcl->ds); in register_displaychangelistener()
691 trace_displaychangelistener_register(dcl, dcl->ops->dpy_name); in register_displaychangelistener()
692 dcl->ds = get_alloc_displaystate(); in register_displaychangelistener()
693 QLIST_INSERT_HEAD(&dcl->ds->listeners, dcl, next); in register_displaychangelistener()
694 gui_setup_refresh(dcl->ds); in register_displaychangelistener()
695 if (dcl->con) { in register_displaychangelistener()
696 dcl->con->dcls++; in register_displaychangelistener()
698 displaychangelistener_display_console(dcl, &error_fatal); in register_displaychangelistener()
699 if (QEMU_IS_GRAPHIC_CONSOLE(dcl->con)) { in register_displaychangelistener()
700 dcl_set_graphic_cursor(dcl, QEMU_GRAPHIC_CONSOLE(dcl->con)); in register_displaychangelistener()
701 } else if (QEMU_IS_TEXT_CONSOLE(dcl->con)) { in register_displaychangelistener()
702 qemu_text_console_update_size(QEMU_TEXT_CONSOLE(dcl->con)); in register_displaychangelistener()
707 void update_displaychangelistener(DisplayChangeListener *dcl, in update_displaychangelistener() argument
710 DisplayState *ds = dcl->ds; in update_displaychangelistener()
712 dcl->update_interval = interval; in update_displaychangelistener()
718 void unregister_displaychangelistener(DisplayChangeListener *dcl) in unregister_displaychangelistener() argument
720 DisplayState *ds = dcl->ds; in unregister_displaychangelistener()
721 trace_displaychangelistener_unregister(dcl, dcl->ops->dpy_name); in unregister_displaychangelistener()
722 if (dcl->con) { in unregister_displaychangelistener()
723 dcl->con->dcls--; in unregister_displaychangelistener()
725 QLIST_REMOVE(dcl, next); in unregister_displaychangelistener()
726 dcl->ds = NULL; in unregister_displaychangelistener()
778 DisplayChangeListener *dcl; in dpy_gfx_update() local
793 QLIST_FOREACH(dcl, &s->listeners, next) { in dpy_gfx_update()
794 if (con != dcl->con) { in dpy_gfx_update()
797 if (dcl->ops->dpy_gfx_update) { in dpy_gfx_update()
798 dcl->ops->dpy_gfx_update(dcl, x, y, w, h); in dpy_gfx_update()
818 DisplayChangeListener *dcl; in dpy_gfx_replace_surface() local
839 QLIST_FOREACH(dcl, &s->listeners, next) { in dpy_gfx_replace_surface()
840 if (con != dcl->con) { in dpy_gfx_replace_surface()
843 displaychangelistener_gfx_switch(dcl, new_surface, surface ? FALSE : TRUE); in dpy_gfx_replace_surface()
852 DisplayChangeListener *dcl; in dpy_gfx_check_format() local
855 QLIST_FOREACH(dcl, &s->listeners, next) { in dpy_gfx_check_format()
856 if (dcl->con && dcl->con != con) { in dpy_gfx_check_format()
860 if (dcl->ops->dpy_gfx_check_format) { in dpy_gfx_check_format()
861 if (!dcl->ops->dpy_gfx_check_format(dcl, format)) { in dpy_gfx_check_format()
876 DisplayChangeListener *dcl; in dpy_refresh() local
878 QLIST_FOREACH(dcl, &s->listeners, next) { in dpy_refresh()
879 if (dcl->ops->dpy_refresh) { in dpy_refresh()
880 dcl->ops->dpy_refresh(dcl); in dpy_refresh()
888 DisplayChangeListener *dcl; in dpy_text_cursor() local
893 QLIST_FOREACH(dcl, &s->listeners, next) { in dpy_text_cursor()
894 if (con != dcl->con) { in dpy_text_cursor()
897 if (dcl->ops->dpy_text_cursor) { in dpy_text_cursor()
898 dcl->ops->dpy_text_cursor(dcl, x, y); in dpy_text_cursor()
906 DisplayChangeListener *dcl; in dpy_text_update() local
911 QLIST_FOREACH(dcl, &s->listeners, next) { in dpy_text_update()
912 if (con != dcl->con) { in dpy_text_update()
915 if (dcl->ops->dpy_text_update) { in dpy_text_update()
916 dcl->ops->dpy_text_update(dcl, x, y, w, h); in dpy_text_update()
924 DisplayChangeListener *dcl; in dpy_text_resize() local
929 QLIST_FOREACH(dcl, &s->listeners, next) { in dpy_text_resize()
930 if (con != dcl->con) { in dpy_text_resize()
933 if (dcl->ops->dpy_text_resize) { in dpy_text_resize()
934 dcl->ops->dpy_text_resize(dcl, w, h); in dpy_text_resize()
943 DisplayChangeListener *dcl; in dpy_mouse_set() local
951 QLIST_FOREACH(dcl, &s->listeners, next) { in dpy_mouse_set()
952 if (c != dcl->con) { in dpy_mouse_set()
955 if (dcl->ops->dpy_mouse_set) { in dpy_mouse_set()
956 dcl->ops->dpy_mouse_set(dcl, x, y, on); in dpy_mouse_set()
965 DisplayChangeListener *dcl; in dpy_cursor_define() local
972 QLIST_FOREACH(dcl, &s->listeners, next) { in dpy_cursor_define()
973 if (c != dcl->con) { in dpy_cursor_define()
976 if (dcl->ops->dpy_cursor_define) { in dpy_cursor_define()
977 dcl->ops->dpy_cursor_define(dcl, cursor); in dpy_cursor_define()
1004 DisplayChangeListener *dcl; in dpy_gl_scanout_disable() local
1009 QLIST_FOREACH(dcl, &s->listeners, next) { in dpy_gl_scanout_disable()
1010 if (con != dcl->con) { in dpy_gl_scanout_disable()
1013 if (dcl->ops->dpy_gl_scanout_disable) { in dpy_gl_scanout_disable()
1014 dcl->ops->dpy_gl_scanout_disable(dcl); in dpy_gl_scanout_disable()
1029 DisplayChangeListener *dcl; in dpy_gl_scanout_texture() local
1036 QLIST_FOREACH(dcl, &s->listeners, next) { in dpy_gl_scanout_texture()
1037 if (con != dcl->con) { in dpy_gl_scanout_texture()
1040 if (dcl->ops->dpy_gl_scanout_texture) { in dpy_gl_scanout_texture()
1041 dcl->ops->dpy_gl_scanout_texture(dcl, backing_id, in dpy_gl_scanout_texture()
1054 DisplayChangeListener *dcl; in dpy_gl_scanout_dmabuf() local
1058 QLIST_FOREACH(dcl, &s->listeners, next) { in dpy_gl_scanout_dmabuf()
1059 if (con != dcl->con) { in dpy_gl_scanout_dmabuf()
1062 if (dcl->ops->dpy_gl_scanout_dmabuf) { in dpy_gl_scanout_dmabuf()
1063 dcl->ops->dpy_gl_scanout_dmabuf(dcl, dmabuf); in dpy_gl_scanout_dmabuf()
1072 DisplayChangeListener *dcl; in dpy_gl_cursor_dmabuf() local
1074 QLIST_FOREACH(dcl, &s->listeners, next) { in dpy_gl_cursor_dmabuf()
1075 if (con != dcl->con) { in dpy_gl_cursor_dmabuf()
1078 if (dcl->ops->dpy_gl_cursor_dmabuf) { in dpy_gl_cursor_dmabuf()
1079 dcl->ops->dpy_gl_cursor_dmabuf(dcl, dmabuf, in dpy_gl_cursor_dmabuf()
1089 DisplayChangeListener *dcl; in dpy_gl_cursor_position() local
1091 QLIST_FOREACH(dcl, &s->listeners, next) { in dpy_gl_cursor_position()
1092 if (con != dcl->con) { in dpy_gl_cursor_position()
1095 if (dcl->ops->dpy_gl_cursor_position) { in dpy_gl_cursor_position()
1096 dcl->ops->dpy_gl_cursor_position(dcl, pos_x, pos_y); in dpy_gl_cursor_position()
1105 DisplayChangeListener *dcl; in dpy_gl_release_dmabuf() local
1107 QLIST_FOREACH(dcl, &s->listeners, next) { in dpy_gl_release_dmabuf()
1108 if (con != dcl->con) { in dpy_gl_release_dmabuf()
1111 if (dcl->ops->dpy_gl_release_dmabuf) { in dpy_gl_release_dmabuf()
1112 dcl->ops->dpy_gl_release_dmabuf(dcl, dmabuf); in dpy_gl_release_dmabuf()
1121 DisplayChangeListener *dcl; in dpy_gl_update() local
1126 QLIST_FOREACH(dcl, &s->listeners, next) { in dpy_gl_update()
1127 if (con != dcl->con) { in dpy_gl_update()
1130 if (dcl->ops->dpy_gl_update) { in dpy_gl_update()
1131 dcl->ops->dpy_gl_update(dcl, x, y, w, h); in dpy_gl_update()