e_explicit_sync: set explit_sync of e_client to be false at detroying explicit_sync 88/294988/1
authorSooChan Lim <sc1.lim@samsung.com>
Tue, 13 Jun 2023 11:46:24 +0000 (20:46 +0900)
committerTizen Window System <tizen.windowsystem@gmail.com>
Thu, 29 Jun 2023 08:31:02 +0000 (17:31 +0900)
and clear the acquire_fence_fd.
If e_client is already deleted at _e_explicit_sync_surface_cb_resource_destroy(),
it just clear the acquire_fence_fd of explit_sync_surface.

Change-Id: I9e135fd1d2acab7d4bfb680b037ba05fc3f4911e

src/bin/e_explicit_sync.c

index 2dcc59f..95f396e 100644 (file)
@@ -331,15 +331,21 @@ _e_explicit_sync_surface_cb_resource_destroy(struct wl_resource *resource)
    if (explicit_sync_surface->pending_acquire_fence_fd != -1)
      _e_explicit_sync_fd_clear(&explicit_sync_surface->pending_acquire_fence_fd);
 
-   if (explicit_sync_surface->acquire_fence_fd != -1)
-     _e_explicit_sync_ec_acquire_fd_clear(explicit_sync_surface->ec, &explicit_sync_surface->acquire_fence_fd);
-
    if (explicit_sync_surface->ec)
      {
+        if (explicit_sync_surface->acquire_fence_fd != -1)
+          _e_explicit_sync_ec_acquire_fd_clear(explicit_sync_surface->ec, &explicit_sync_surface->acquire_fence_fd);
+
+        e_client_explicit_sync_set(explicit_sync_surface->ec, EINA_FALSE);
         e_object_delfn_del(E_OBJECT(explicit_sync_surface->ec), explicit_sync_surface->ec_delfn);
         explicit_sync_surface->ec_delfn = NULL;
         explicit_sync_surface->ec = NULL;
      }
+   else
+     {
+        if (explicit_sync_surface->acquire_fence_fd != -1)
+          _e_explicit_sync_fd_clear(&explicit_sync_surface->acquire_fence_fd);
+     }
 
    E_FREE(explicit_sync_surface);
 }