return ECORE_CALLBACK_CANCEL;
}
+// TODO: This request will be deprecated.
static void
_e_comp_wl_tizen_hwc_cb_commit_feedback(struct wl_client *client,
struct wl_resource *tizen_hwc_resource,
ELOGF("TIZEN-HWC", "Request Tizen HWC Commit Feedback by Client.(%p, %p)", hwc_commit_feedback->ec, hwc_commit_feedback, hwc_commit_feedback->resource);
}
+static void
+_e_comp_wl_tizen_hwc_cb_create_commit_feedback(struct wl_client *client,
+ struct wl_resource *tizen_hwc_resource,
+ struct wl_resource *surface_resource,
+ uint32_t id,
+ uint32_t serial)
+{
+ E_Client *ec;
+ E_Comp_Wl_Tizen_Hwc *tizen_hwc;
+ E_Comp_Wl_Tizen_Hwc_Commit_Feedback* hwc_commit_feedback;
+
+ tizen_hwc = wl_resource_get_user_data(tizen_hwc_resource);
+ EINA_SAFETY_ON_NULL_RETURN(tizen_hwc);
+
+ ec = wl_resource_get_user_data(surface_resource);
+ EINA_SAFETY_ON_NULL_RETURN(ec);
+ if (e_object_is_del(E_OBJECT(ec))) return;
+
+ hwc_commit_feedback = E_NEW(E_Comp_Wl_Tizen_Hwc_Commit_Feedback, 1);
+ if (!hwc_commit_feedback)
+ {
+ wl_client_post_no_memory(client);
+ return;
+ }
+
+ hwc_commit_feedback->resource = wl_resource_create(client,
+ &tizen_hwc_commit_feedback_interface,
+ 1, id);
+ if (!hwc_commit_feedback->resource)
+ {
+ wl_client_post_no_memory(client);
+ E_FREE(hwc_commit_feedback);
+ return;
+ }
+
+ hwc_commit_feedback->ec = ec;
+ hwc_commit_feedback->tizen_hwc = tizen_hwc;
+ hwc_commit_feedback->serial = serial;
+ hwc_commit_feedback->timer = ecore_timer_add(E_COMP_WL_TIZEN_HWC_TIMEOUT,
+ _e_comp_wl_tizen_hwc_commit_feedback_cb_timeout,
+ hwc_commit_feedback);
+
+ wl_resource_set_implementation(hwc_commit_feedback->resource, NULL, hwc_commit_feedback,
+ _tizen_hwc_commit_feedback_cb_resource_destroy);
+
+ tizen_hwc->hwc_commit_feeback_list = eina_list_append(tizen_hwc->hwc_commit_feeback_list, hwc_commit_feedback);
+
+ ELOGF("TIZEN-HWC", "Request Tizen HWC Commit Feedback by Client.(%p, %p)", hwc_commit_feedback->ec, hwc_commit_feedback, hwc_commit_feedback->resource);
+}
+
static const struct tizen_hwc_interface _e_comp_wl_tizen_hwc_implementation = {
.destroy = _e_comp_wl_tizen_hwc_cb_destroy,
- .commit_feedback = _e_comp_wl_tizen_hwc_cb_commit_feedback
+ .commit_feedback = _e_comp_wl_tizen_hwc_cb_commit_feedback, // TODO: DEPRECATED: this will be deprecated.
+ .create_commit_feedback = _e_comp_wl_tizen_hwc_cb_create_commit_feedback
};
static void