You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The MemoryRenderBuffer was designed to work like the wayland surface element.
The size of the MemoryRenderBuffer is not in physical space, it uses buffer space. The scale you provide defines
the buffer scale. So to get the logical size of the element you would divide the buffer size by the buffer scale.
For the transform from logical space to physical space during rendering the output scale is used.
A wayland surface with buffer and scale would result in a protocol error as the size is not a multiple of the scale.
That is also one of the reason why the relatively new fractional scale protocol is doing things a bit differently.
It will always provide a buffer scale of 1 and use viewporter to set a specific logical size of the surface. But note
that this will still result in some rounding and some size are just not possible to represent correctly.
We can definitely improve the docs on the element to clarify how the scale correlates to the size.
But imo it's not a bug, more a shortcoming of the element which we should address.
While a wayland surface has this limitation because of the protocol spec, there is no requirement to have the same
limitations for the other render elements. We just have to be careful when lifting this limitation to not cause alignment
issues (e.g. gaps or overlaps) between the elements because of the necessary rounding in the wayland surface element.
This will draw the buffer at 98x98 instead of 99x99, resulting in this:
The text was updated successfully, but these errors were encountered: