From: Robert Mader Date: Mon, 13 Dec 2021 11:00:10 +0000 (+0100) Subject: waylandsink: Use G_MAXINT32 for opaque regions X-Git-Tag: 1.20.0~113 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1e2bc681712d62081f49e8e74723a596d1578a34;p=platform%2Fupstream%2Fgstreamer.git waylandsink: Use G_MAXINT32 for opaque regions `gst_wl_window_set_opaque` does not get called on window resizes, potentially leaving opaque regions too small. According to the spec opaque regions can be bigger than the surface size - parts that fall outside of the surface will get ignored. Thus we can can simply use `G_MAXINT32` and be sure that the whole surfaces will always be covered. Part-of: --- diff --git a/subprojects/gst-plugins-bad/ext/wayland/wlwindow.c b/subprojects/gst-plugins-bad/ext/wayland/wlwindow.c index 66a05be976..961acd175e 100644 --- a/subprojects/gst-plugins-bad/ext/wayland/wlwindow.c +++ b/subprojects/gst-plugins-bad/ext/wayland/wlwindow.c @@ -433,16 +433,14 @@ gst_wl_window_set_opaque (GstWlWindow * window, const GstVideoInfo * info) /* Set area opaque */ region = wl_compositor_create_region (window->display->compositor); - wl_region_add (region, 0, 0, window->render_rectangle.w, - window->render_rectangle.h); + wl_region_add (region, 0, 0, G_MAXINT32, G_MAXINT32); wl_surface_set_opaque_region (window->area_surface, region); wl_region_destroy (region); if (!GST_VIDEO_INFO_HAS_ALPHA (info)) { /* Set video opaque */ region = wl_compositor_create_region (window->display->compositor); - wl_region_add (region, 0, 0, window->render_rectangle.w, - window->render_rectangle.h); + wl_region_add (region, 0, 0, G_MAXINT32, G_MAXINT32); wl_surface_set_opaque_region (window->video_surface, region); wl_region_destroy (region); }