SIGN IN SIGN UP

gl-renderer: clip subimage dimensions to its buffer ones

A window freeze can occur in specific use cases like when using a kiosk
shell. It scales surfaces to fit the compositor size and the transformation
to buffer space can, in some cases, round the size one pixel higher than
the texture size, making glTexSubImage2D() refuse the size argument and
generate a GL_INVALID_VALUE without updating the texture.
This commit ensures the GL renderer doesn't exceed the texture size.

Here is how the issue was reproduced:
	$ weston --renderer=gl --backend=wayland --width=1920 --height=1080 --shell=kiosk
	$ gst-launch-1.0 videotestsrc ! video/x-raw,height=590,width=500 ! waylandsink display=wayland-1

Signed-off-by: Théo Maillart <tmaillart@freebox.fr>
T
Théo Maillart committed
2b69bc08112bb66877fdfd90944f8f9c4c794773
Parent: bfb2dfa
Committed by Marius Vlad <marius.vlad0@gmail.com> on 2/21/2025, 7:03:56 AM