On Thu, 27 Jun 2024 at 13:17, Akihiko Odaki <akihiko.od...@daynix.com>
wrote:

> Co-authored-by: Phil Dennis-Jordan <p...@philjordan.eu>
> Signed-off-by: Akihiko Odaki <akihiko.od...@daynix.com>
>
> +- (void)setCursor:(QEMUCursor *)given_cursor
> +{
> +    […]
> +
> +    provider = CGDataProviderCreateWithData(
> +        NULL,
> +        cursor->data,
> +        cursor->width * cursor->height * 4,
> +        NULL
> +    );
> +
> +    image = CGImageCreate(
> +        cursor->width, //width
> +        cursor->height, //height
> +        8, //bitsPerComponent
> +        32, //bitsPerPixel
> +        cursor->width * 4, //bytesPerRow
> +        colorspace, //colorspace
> +        kCGBitmapByteOrder32Little | kCGImageAlphaFirst, //bitmapInfo
> +        provider, //provider
> +        NULL, //decode
> +        0, //interpolate
> +        kCGRenderingIntentDefault //intent
> +    );
>

I still think this is an awkward amount of boilerplate that could be
outsourced to a helper function - especially as you've now reminded me in
patch 1/4 that drawRect: does essentially the same thing and could probably
share that helper.

I'm still keen on NSCursor support for absolute pointing mode though, so I
can experiment with doing a better job of cleaning it up as part v3 of that
patch series. So:

Reviewed-by: Phil Dennis-Jordan <p...@philjordan.eu>
Signed-off-by: Phil Dennis-Jordan <p...@philjordan.eu>

Reply via email to