From 1249362f96323afabfeb184c77a85364d9009882 Mon Sep 17 00:00:00 2001 From: Robert Mader Date: Mon, 13 Dec 2021 12:21:06 +0100 Subject: [PATCH] waylandsink: Use G_MAXINT32 for surface damage Each time we call `wl_surface_damage()` we want to do full surface damage. Like Mesa, just use `G_MAXINT32` to ensure we always do full damage, reducing the need to track the right dimensions. `window->video_rectangle` is now unused, but we keep it around for now as we may need it again in the future. Part-of: --- subprojects/gst-plugins-bad/ext/wayland/wlwindow.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/subprojects/gst-plugins-bad/ext/wayland/wlwindow.c b/subprojects/gst-plugins-bad/ext/wayland/wlwindow.c index 34b7b17..152b94e 100644 --- a/subprojects/gst-plugins-bad/ext/wayland/wlwindow.c +++ b/subprojects/gst-plugins-bad/ext/wayland/wlwindow.c @@ -412,7 +412,6 @@ gst_wl_window_resize_video_surface (GstWlWindow * window, gboolean commit) if (commit) wl_surface_commit (window->video_surface_wrapper); - /* this is saved for use in wl_surface_damage */ window->video_rectangle = res; } @@ -452,8 +451,8 @@ gst_wl_window_render (GstWlWindow * window, GstWlBuffer * buffer, if (G_LIKELY (buffer)) { gst_wl_buffer_attach (buffer, window->video_surface_wrapper); - wl_surface_damage (window->video_surface_wrapper, 0, 0, - window->video_rectangle.w, window->video_rectangle.h); + wl_surface_damage (window->video_surface_wrapper, 0, 0, G_MAXINT32, + G_MAXINT32); wl_surface_commit (window->video_surface_wrapper); } else { /* clear both video and parent surfaces */ @@ -513,7 +512,8 @@ gst_wl_window_update_borders (GstWlWindow * window) window->display, &info); gwlbuf = gst_buffer_add_wl_buffer (buf, wlbuf, window->display); gst_wl_buffer_attach (gwlbuf, window->area_surface_wrapper); - wl_surface_damage (window->area_surface_wrapper, 0, 0, width, height); + wl_surface_damage (window->area_surface_wrapper, 0, 0, G_MAXINT32, + G_MAXINT32); /* at this point, the GstWlBuffer keeps the buffer * alive and will free it on wl_buffer::release */ -- 2.7.4