Skip to content

Upload HW cursor sprite on-demand

Jonas Ådahl requested to merge jadahl/mutter:wip/hw-cursor-on-demand into master

These commits work towards the end goal of only uploading HW cursors to the GPU where it'll be displayed. Not doing this causes unnecessary wake-ups on GPU's where a cursor is not shown which in the worst case will cause visible stuttering.

The series contains various related cleanups, and is split in three parts:

  1. Restructure MetaCursorSprite into separate types
  2. Let the cursor renderer be the one realizing MetaCursorSprites no matter the type
  3. Realize MetaCursorSprite only on the GPUs a cursor will be visible on (not including various clean ups that were done as part of the series)

This has some side effects we can't get around:

  1. Wayland buffers will not be released until the next wl_surface.commit
  2. HW cursors are uploaded immediately before being rendered, instead of just after being created/set

Merge request reports