}
static void
-gst_wl_window_resize_internal (GstWlWindow * window)
+gst_wl_window_resize_internal (GstWlWindow * window, gboolean commit)
{
GstVideoRectangle src, res;
window->render_rectangle.x + res.x, window->render_rectangle.y + res.y);
wl_viewport_set_destination (window->viewport, res.w, res.h);
- wl_surface_damage (window->surface, 0, 0, res.w, res.h);
- wl_surface_commit (window->surface);
+ if (commit) {
+ wl_surface_damage (window->surface, 0, 0, res.w, res.h);
+ wl_surface_commit (window->surface);
+ }
/* this is saved for use in wl_surface_damage */
window->surface_width = res.w;
window->video_height = info->height;
if (window->render_rectangle.w != 0)
- gst_wl_window_resize_internal (window);
+ gst_wl_window_resize_internal (window, FALSE);
}
void
window->render_rectangle.h = h;
if (window->video_width != 0)
- gst_wl_window_resize_internal (window);
+ gst_wl_window_resize_internal (window, TRUE);
}