Add accelerated cursor composition to ui/cocoa. This does not only improve performance for display devices that exposes the capability to the guest according to dpy_cursor_define_supported(), but fixes the cursor display for devices that unconditionally expects the availability of the capability (e.g., virtio-gpu).
The common pattern to implement accelerated cursor composition is to replace the cursor and warp it so that the replaced cursor is shown at the correct position on the guest display. Unfortunately, ui/cocoa cannot do the same because warping the cursor position interfers with the mouse input so it uses CALayer instead; although it is not specialized for cursor composition, it still can compose images with hardware acceleration. ui/cocoa was the only non-headless graphical display lacking cursor composition so dpy_cursor_define_supported() is no longer needed and removed. Signed-off-by: Akihiko Odaki <akihiko.od...@daynix.com> --- Akihiko Odaki (2): ui/cocoa: Add cursor composition ui/console: Remove dpy_cursor_define_supported() meson.build | 3 +- include/ui/console.h | 1 - hw/display/qxl-render.c | 4 -- hw/display/vmware_vga.c | 6 +-- ui/console.c | 13 ------- ui/cocoa.m | 97 +++++++++++++++++++++++++++++++++++++++++++++++++ 6 files changed, 101 insertions(+), 23 deletions(-) --- base-commit: ba49d760eb04630e7b15f423ebecf6c871b8f77b change-id: 20240318-cursor-3491b1806582 Best regards, -- Akihiko Odaki <akihiko.od...@daynix.com>