Subject: Re: bug#65432: 30.0.50; jerky image movements when zoomed

From: Po Lu <[email-masked]>
Date: Tue, 22 Aug 2023 10:59:22 +0800

Eli Zaretskii <[email-masked]> writes:

>> Date: Mon, 21 Aug 2023 16:45:31 +0200
>> From:  Manuel Giraud via "Bug reports for GNU Emacs,
>>  the Swiss army knife of text editors" <[email-masked]>
>> 
>> When opening a rather big image into a quite big Emacs window, movements
>> (C-n, C-p, C-f, C-b) are smooth at original image size but are jerky
>> whenever there is some zooming (in or out) involved.
>> 
>> Recipe:
>>         - emacs -Q
>>         - 'C-x C-f' "a big image.jpg"
>>         - 's o' (image-transform-reset-to-original)
>>         - keep 'C-n' pressed, keep 'C-f' pressed -> movements are smooth
>>         - 'i -' (image-decrease-size)
>>         - keep 'C-n' pressed, keep 'C-f' pressed -> movements are jerky
>
> I cannot reproduce this, on MS-Windows.  I see no difference between
> "jerkyness" of motion commands before and after 'i -'.

This is a known inefficiency with Cairo's implementation of affine
transforms.  AFAICT, Cairo performs the transform on the CPU, which is
aggravated by uploading the complete bitmap to the X server every time
the image is displayed.

Building without Cairo should induce Emacs to utilize XRender transforms
instead, ameliorating this problem.