mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-23 02:01:12 +00:00
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: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1446>
This commit is contained in:
parent
3bbd091bb4
commit
1249362f96
1 changed files with 4 additions and 4 deletions
|
@ -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 */
|
||||
|
|
Loading…
Reference in a new issue