waycrate / wayshot

Mirrored at https://git.sr.ht/~shinyzenith/wayshot | screenshot tool for wlroots based compositors implementing zwlr_screencopy_v1
https://crates.io/crates/wayshot
BSD 2-Clause "Simplified" License
108 stars 18 forks source link

fix(layer-shell-scaling): frozen buffers must scale to output scaling. #112

Open Decodetalkers opened 3 months ago

Decodetalkers commented 3 months ago

I have read the portocol of fractional, the protocal just accept a scale value to client and let client to adjust the scale. so finally the way to scale is done by client. So the scale should be done by ourself

Decodetalkers commented 3 months ago

and now in the code , the way to use slurp is a wrong way

Decodetalkers commented 3 months ago

oh.. clippy is merged.. emm, so it is the problem that I have not find my pr

Shinyzenith commented 3 months ago

Do we have to do another buffer allocation for the surface layering? Is it not possible to bilinearly scale up/down the current surface contents?

Scratch that, I think we already have pixel perfect version from the comp in the buffer. We just need to set the scale hint.

Decodetalkers commented 3 months ago

Do we have to do another buffer allocation for the surface layering? Is it not possible to bilinearly scale up/down the current surface contents?

the size which is used to scale the buffer only accept int, so when the scale is int, I will use the origin one.. but when it is fractional one.. I cannot find out a solution. the protocal about fractional just throw a size to let client to resize it, do you have better idea?

Shinyzenith commented 3 months ago

Do we have to do another buffer allocation for the surface layering? Is it not possible to bilinearly scale up/down the current surface contents?

the size which is used to scale the buffer only accept int, so when the scale is int, I will use the origin one.. but when it is fractional one.. I cannot find out a solution. the protocal about fractional just throw a size to let client to resize it, do you have better idea?

I sadly don't. As far as I'm aware, screencopy already returns to us a pixel-perfect version which is scaled appropriately due to Andreas's patches, we just need a way to hint to the compositor that we have the scaled version already. I'm not sure if my understanding is correct. I'll take a look at the code in the evening and maybe ask in sway-irc if needed.