e_explicit_sync: use e_cliet_explitcit_sync_get/set 85/294985/1
authorSooChan Lim <sc1.lim@samsung.com>
Tue, 13 Jun 2023 09:45:53 +0000 (18:45 +0900)
committerTizen Window System <tizen.windowsystem@gmail.com>
Thu, 29 Jun 2023 08:31:02 +0000 (17:31 +0900)
e_explicit_sync uses e_client_explitcit_sync_get/set functions for
e_client to activate the explicit_sync instead of checking ec->explicit_sync_surface pointer.

Change-Id: I0f1b83d04dde881e77fe31f9f5ebc76d1d382086

src/bin/e_explicit_sync.c

index ff22dd2..8c3d696 100644 (file)
@@ -354,7 +354,7 @@ static void _e_explicit_sync_cb_get_synchronization(struct wl_client *client,
         goto fail;
      }
 
-   if (ec->explicit_sync_surface)
+   if (e_client_explicit_sync_get(ec))
      {
         wl_resource_post_error(resource,
                                ZWP_LINUX_EXPLICIT_SYNCHRONIZATION_V1_ERROR_SYNCHRONIZATION_EXISTS,
@@ -388,7 +388,6 @@ static void _e_explicit_sync_cb_get_synchronization(struct wl_client *client,
                                   explicit_sync_surface,
                                   _e_explicit_sync_surface_cb_resource_destroy);
 
-   ec->explicit_sync_surface = explicit_sync_surface;
    explicit_sync_surface->ec = ec;
    explicit_sync_surface->ec_delfn = e_object_delfn_add(E_OBJECT(ec),
                                                         _e_explicit_sync_surface_cb_ec_free,
@@ -397,6 +396,8 @@ static void _e_explicit_sync_cb_get_synchronization(struct wl_client *client,
    explicit_sync_surface->before_surface_commit_hook = e_comp_wl_hook_add(E_COMP_WL_HOOK_CLIENT_BEFORE_SURFACE_COMMIT,
                         _e_explicit_sync_surface_cb_before_surface_commit, explicit_sync_surface);
 
+   e_client_explicit_sync_set(ec, EINA_TRUE);
+
    EX_SYNC_TRACE("Explicit_Sync Surface:%p Create", explicit_sync_surface->ec, explicit_sync_surface);
 
    return;