Skip to content

cursor-renderer/native: Skip hw cursor upload if we can't use it

Robert Mader requested to merge rmader/mutter:cursor-scale-boom into master

If the CRTCs the cursor is visible on do not share a common scale and transform, we can't use the cursor hardware plane as we only have one. We therefore fall back to software / gl cursor.

The check for that currently happens after we tried to upload the cursor image to the hardware plane though. This is made worse by the fact that in the scaling step, where we scale the cursor image to the desired size, until now we expected a valid common scale - otherwise scaling the image by an uninitialized float.

Make sure we bail out early during the scale/upload step if we don't have common scales and transforms - to avoid that bug and save some unnecessary work.

Fixes #1105 (closed)

Edited by Robert Mader

Merge request reports