Commit 9d0ba0f2 authored by Haihua Hu's avatar Haihua Hu

wayland/wlbuffer: just return if used_by_compositor is true when attach

When buffer is used by compositor, we don't need attach it and hold one
more reference. Just check used_by_compositor, just return if it is true.
Assert error log is not need, this is normal behavior.
parent ab9d42cc
Pipeline #38167 passed with stages
in 52 minutes and 2 seconds
...@@ -220,7 +220,10 @@ gst_wl_buffer_force_release_and_unref (GstWlBuffer * self) ...@@ -220,7 +220,10 @@ gst_wl_buffer_force_release_and_unref (GstWlBuffer * self)
void void
gst_wl_buffer_attach (GstWlBuffer * self, struct wl_surface *surface) gst_wl_buffer_attach (GstWlBuffer * self, struct wl_surface *surface)
{ {
g_return_if_fail (self->used_by_compositor == FALSE); if (self->used_by_compositor) {
GST_DEBUG_OBJECT (self, "buffer used by compositor %p", self->gstbuffer);
return;
}
wl_surface_attach (surface, self->wlbuffer, 0, 0); wl_surface_attach (surface, self->wlbuffer, 0, 0);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment