Missing check for buffer size divisible by scale
wl_surface.attach
specification says:
The new size of the surface is calculated based on the buffer size transformed by the inverse buffer_transform and the inverse buffer_scale. This means that the supplied buffer must be an integer multiple of the buffer_scale.
Weston does not check this. Since the specification is worded "must", weston needs to check this and raise a protocol error if the requirement is violated. Note, that if wp_viewport
is used to explicitly set the destination size, then the buffer size requirement is lifted.
The specification does not mention any related error code. That is to be solved in wayland#145 (closed).
Implement the check in libweston, and add a test to ensure the right error is raised but not when viewport destination size is set.