Skip to content

Improved window resize performance

Resize performance was bad, and after GTK4 port it got even worse (probably because we still use Cairo). So this MR moves the update of the page buffer to background thread, and until it's done it just scales the existing buffer (using cairo scale or GTK snapshot's append_texture), therefore on my machine bringing window resize performance from 6-10FPS to 60FPS, the buffer will initially look a little bit more blurry, until background thread actually catches up, but it still looks fine.

This also adds PagePaintable class, that makes use of that, therefore making it possible to insert the page into GTK Image/Picture or any custom widget that we might need in the future.

PS: Keep in mind that diff size is severely inflated by moving of some code out of PageView class

Merge request reports