wayshot icon indicating copy to clipboard operation
wayshot copied to clipboard

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

Open Decodetalkers opened this issue 1 year ago • 5 comments

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 avatar Mar 28 '24 08:03 Decodetalkers

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

Decodetalkers avatar Mar 28 '24 08:03 Decodetalkers

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

Decodetalkers avatar Mar 28 '24 08:03 Decodetalkers

~~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.

Shinyzenith avatar Mar 28 '24 08:03 Shinyzenith

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?

Decodetalkers avatar Mar 28 '24 08:03 Decodetalkers

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.

Shinyzenith avatar Mar 28 '24 08:03 Shinyzenith