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

Akihiko Odaki posted 2 patches 1 month, 1 week ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20240318-cursor-v1-0-0bbe6c382217@daynix.com
Maintainers: Gerd Hoffmann <kraxel@redhat.com>, Dmitry Fleytman <dmitry.fleytman@gmail.com>, "Marc-André Lureau" <marcandre.lureau@redhat.com>, Paolo Bonzini <pbonzini@redhat.com>, "Daniel P. Berrangé" <berrange@redhat.com>, Thomas Huth <thuth@redhat.com>, "Philippe Mathieu-Daudé" <philmd@linaro.org>, Peter Maydell <peter.maydell@linaro.org>, Akihiko Odaki <akihiko.odaki@daynix.com>
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(-)
[PATCH 0/2] ui/cocoa: Add cursor composition
Posted by Akihiko Odaki 1 month, 1 week ago
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,
-- 
Akihiko Odaki <akihiko.odaki@daynix.com>