I noticed that kwin_wayland uses a lot of cpu for video playback. I’m playing a 960x540 @ 30 fps in a window as follows:
$ mpv --no-config --vo=dmabuf-wayland --gpu-context=wayland --hwdec=vaapi test.mp4
● Video --vid=1 (h264 960x540 29.97 fps) [default]
● Audio --aid=1 (aac 2ch 48000 Hz 128 kbps) [default]
Using hardware decoding (vaapi).
AO: [pipewire] 48000Hz stereo 2ch floatp
VO: [dmabuf-wayland] 960x540 vaapi[nv12]
AV: 00:00:34 / 02:10:01 (0%) A-V: 0.000
Exiting... (Quit)
It causes kwin_wayland to occupy about 10 % of a core running at 1.8 GHz. So the overhead is about 180 / 30 ~ 6 million cycles per rendered frame. Why is it so high? The overlead is less than half that in hyprland.