mbox series

[0/2] ui/cocoa: Add cursor composition

Message ID 20240318-cursor-v1-0-0bbe6c382217@daynix.com (mailing list archive)
Headers show
Series ui/cocoa: Add cursor composition | expand

Message

Akihiko Odaki March 18, 2024, 7:58 a.m. UTC
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.odaki@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,