waycrate / waysip

Wayland native area selector for compositors implementing zwlr_layer_shell.
MIT License
12 stars 2 forks source link

Glitchy selection box in dimension mode #5

Open CheerfulPianissimo opened 5 months ago

CheerfulPianissimo commented 5 months ago

Here's a recording. Compositor is sway and it's running on an AMD radeon iGPU.

waysip_bug.webm

Shinyzenith commented 5 months ago

CC: @Decodetalkers

shivkr6 commented 5 months ago

For me it's flickering, Compositor is river and it's running on an AMD Radeon iGPU.

Decodetalkers commented 5 months ago

I cannot find out what's wrong, I do not know much about Cairo...so I need help

Shinyzenith commented 5 months ago

Can we get some WAYLAND_DEBUG=1 logs?

Shinyzenith commented 5 months ago

Sway 1.9, GLES2 renderer, things seem to be working just fine on my intel card. Awaiting further logs/steps to reproduce.

CheerfulPianissimo commented 5 months ago

Here's some logs logs.txt

CheerfulPianissimo commented 5 months ago

Can no longer replicate this. Seems like something in the recent commits solved this?

Decodetalkers commented 5 months ago

Can no longer replicate this. Seems like something in the recent commits solved this?

it sometimes happens. when I have a second screen it maybe will flash I do not know what is wrong

CheerfulPianissimo commented 5 months ago

Alright, it seems to be back or maybe it never left in the first place.

Looking at the flamegraph and playing around a bit it seems that the problem lies in cairo::paint and cairo::fill being very slow for some reason. I commented out the text rendering and changed the paint command to a fill of a smaller area and the situation is a bit improved. There's some artifacting but none of the flicker. It's still doesn't feel smooth though.

waysip_patch.webm

The part I'm confused by is the reason for the flickering in the first place: it happens whenever fill or paint takes too long but shouldn't the double buffering via surface.commit prevent incomplete frames from being rendered?