{
twe_wl_surf_source *surf_source = (twe_wl_surf_source *)source;
- if (surf_source->committed_buffers) {
- TPL_OBJECT_LOCK(&surf_source->obj);
- while (!__tpl_list_is_empty(surf_source->committed_buffers)) {
- tbm_surface_h tbm_surface =
- (tbm_surface_h)__tpl_list_pop_front(
- surf_source->committed_buffers,
- NULL);
- tbm_surface_internal_unref(tbm_surface);
- }
-
- __tpl_list_free(surf_source->committed_buffers, NULL);
- surf_source->committed_buffers = NULL;
- TPL_OBJECT_UNLOCK(&surf_source->obj);
- }
-
__tpl_object_fini(&surf_source->obj);
g_source_remove_unix_fd(source, surf_source->tag);
__tpl_list_free(surf_source->in_use_buffers, NULL);
surf_source->in_use_buffers = NULL;
+ if (surf_source->committed_buffers) {
+ TPL_OBJECT_LOCK(&surf_source->obj);
+ while (!__tpl_list_is_empty(surf_source->committed_buffers)) {
+ tbm_surface_h tbm_surface =
+ (tbm_surface_h)__tpl_list_pop_front(
+ surf_source->committed_buffers,
+ NULL);
+ tbm_surface_internal_unref(tbm_surface);
+ }
+
+ __tpl_list_free(surf_source->committed_buffers, NULL);
+ surf_source->committed_buffers = NULL;
+ TPL_OBJECT_UNLOCK(&surf_source->obj);
+ }
+
_twe_surface_buffer_flusher_fini(surf_source);
if (surf_source->tbm_queue) {