#include "fault.h"
#include "util.h"
+#if defined(_ESTIMATE_PERF)
+#define ESTIMATE_START(id) DbgPrint("%s START\n", id);
+#define ESTIMATE_END(id) DbgPrint("%s END\n", id);
+#else
+#define ESTIMATE_START(id)
+#define ESTIMATE_END(id)
+#endif
+
#define IS_LB_SHOWN(itm) (!(itm)->inst->item->has_livebox_script || ((itm)->inst->item->has_livebox_script && (itm)->is_lb_show))
int errno;
append_pending_list(item);
}
+static inline int clear_from_pending_list(struct item *item)
+{
+ Eina_List *l;
+ struct item *tmp;
+
+ EINA_LIST_FOREACH(s_info.pending_list, l, tmp) {
+ if (tmp != item) {
+ continue;
+ }
+
+ s_info.pending_list = eina_list_remove_list(s_info.pending_list, l);
+ if (!s_info.pending_list) {
+ deactivate_pending_consumer();
+ }
+ return LB_STATUS_SUCCESS;
+ }
+
+ return LB_STATUS_ERROR_NOT_EXIST;
+}
+
/*!
* \brief
* This function can call the update callback
item->sleep_at = 0.0f;
if (sleep_time > pending) {
+
+ /*!
+ * Before do updating forcely, clear it from the pending list.
+ * We will consume it from here now.
+ */
+ (void)clear_from_pending_list(item);
+
if (updator_cb(item) == ECORE_CALLBACK_CANCEL) {
/* item is destroyed */
return UPDATE_ITEM_DELETED;
return LB_STATUS_ERROR_NOT_EXIST;
}
-static inline int clear_from_pending_list(struct item *item)
-{
- Eina_List *l;
- struct item *tmp;
-
- EINA_LIST_FOREACH(s_info.pending_list, l, tmp) {
- if (tmp != item) {
- continue;
- }
-
- s_info.pending_list = eina_list_remove_list(s_info.pending_list, l);
- if (!s_info.pending_list) {
- deactivate_pending_consumer();
- }
- return LB_STATUS_SUCCESS;
- }
-
- return LB_STATUS_ERROR_NOT_EXIST;
-}
-
static Eina_Bool update_timeout_cb(void *data)
{
struct item *item;
item = eina_list_data_get(l);
+ ESTIMATE_START(id);
ret = so_resize(inst, w, h);
+ ESTIMATE_END(id);
if (ret < 0) {
return ret;
}
item = eina_list_data_get(l);
+ ESTIMATE_START(id);
ret = so_clicked(inst, event, timestamp, x, y);
+ ESTIMATE_END(id);
if (ret < 0) {
return ret;
}
}
}
+ ESTIMATE_START(id);
ret = so_script_event(inst, emission, source, event_info);
+ ESTIMATE_END(id);
if (ret < 0) {
return ret;
}