summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2019-06-14 22:49:25 +0100
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2019-06-15 08:43:33 +0100
commitbda708d38fbea33fc2554d95e661af6e36b79f5b (patch)
tree82de17720898ca0bb6c1ad7fe4d9725f2db9f461
parente667dd8b2c7d6abb3a1bebd29b0a49a92c498043 (diff)
edje messages - track all messages for an edge obj in the edje
this is the basis for some future speedups to avoid full message queue walks - get this right first.
-rw-r--r--src/lib/edje/edje_message_queue.c7
-rw-r--r--src/lib/edje/edje_private.h3
2 files changed, 10 insertions, 0 deletions
diff --git a/src/lib/edje/edje_message_queue.c b/src/lib/edje/edje_message_queue.c
index cb424c3de3..e92cbabfc5 100644
--- a/src/lib/edje/edje_message_queue.c
+++ b/src/lib/edje/edje_message_queue.c
@@ -201,6 +201,7 @@ again:
201 } 201 }
202 if (em->edje != lookup_ed) continue; 202 if (em->edje != lookup_ed) continue;
203 tmp_msgq = eina_inlist_remove(tmp_msgq, &(em->inlist_main)); 203 tmp_msgq = eina_inlist_remove(tmp_msgq, &(em->inlist_main));
204 em->edje->messages = eina_inlist_remove(em->edje->messages, &(em->inlist_edje));
204 if (!lookup_ed->delete_me) 205 if (!lookup_ed->delete_me)
205 { 206 {
206 lookup_ed->processing_messages++; 207 lookup_ed->processing_messages++;
@@ -651,6 +652,7 @@ _edje_message_propagate_send(Edje *ed, Edje_Queue queue, Edje_Message_Type type,
651 652
652 em->msg = msg; 653 em->msg = msg;
653 msgq = eina_inlist_append(msgq, &(em->inlist_main)); 654 msgq = eina_inlist_append(msgq, &(em->inlist_main));
655 em->edje->messages = eina_inlist_append(em->edje->messages, &(em->inlist_edje));
654} 656}
655 657
656void 658void
@@ -898,6 +900,7 @@ _edje_message_queue_process(void)
898 em = INLIST_CONTAINER(Edje_Message, l, inlist_main); 900 em = INLIST_CONTAINER(Edje_Message, l, inlist_main);
899 ed = em->edje; 901 ed = em->edje;
900 tmp_msgq = eina_inlist_remove(tmp_msgq, &(em->inlist_main)); 902 tmp_msgq = eina_inlist_remove(tmp_msgq, &(em->inlist_main));
903 em->edje->messages = eina_inlist_remove(em->edje->messages, &(em->inlist_edje));
901 em->edje->message.num--; 904 em->edje->message.num--;
902 if (!ed->delete_me) 905 if (!ed->delete_me)
903 { 906 {
@@ -951,6 +954,7 @@ _edje_message_queue_clear(void)
951 em = INLIST_CONTAINER(Edje_Message, l, inlist_main); 954 em = INLIST_CONTAINER(Edje_Message, l, inlist_main);
952 msgq = eina_inlist_remove(msgq, &(em->inlist_main)); 955 msgq = eina_inlist_remove(msgq, &(em->inlist_main));
953 em->edje->message.num--; 956 em->edje->message.num--;
957 em->edje->messages = eina_inlist_remove(em->edje->messages, &(em->inlist_edje));
954 _edje_message_free(em); 958 _edje_message_free(em);
955 } 959 }
956 while (tmp_msgq) 960 while (tmp_msgq)
@@ -959,6 +963,7 @@ _edje_message_queue_clear(void)
959 em = INLIST_CONTAINER(Edje_Message, l, inlist_main); 963 em = INLIST_CONTAINER(Edje_Message, l, inlist_main);
960 tmp_msgq = eina_inlist_remove(tmp_msgq, &(em->inlist_main)); 964 tmp_msgq = eina_inlist_remove(tmp_msgq, &(em->inlist_main));
961 em->edje->message.num--; 965 em->edje->message.num--;
966 em->edje->messages = eina_inlist_remove(em->edje->messages, &(em->inlist_edje));
962 _edje_message_free(em); 967 _edje_message_free(em);
963 } 968 }
964} 969}
@@ -979,6 +984,7 @@ _edje_message_del(Edje *ed)
979 { 984 {
980 msgq = eina_inlist_remove(msgq, &(em->inlist_main)); 985 msgq = eina_inlist_remove(msgq, &(em->inlist_main));
981 em->edje->message.num--; 986 em->edje->message.num--;
987 em->edje->messages = eina_inlist_remove(em->edje->messages, &(em->inlist_edje));
982 _edje_message_free(em); 988 _edje_message_free(em);
983 } 989 }
984 if (ed->message.num <= 0) return; 990 if (ed->message.num <= 0) return;
@@ -992,6 +998,7 @@ _edje_message_del(Edje *ed)
992 { 998 {
993 tmp_msgq = eina_inlist_remove(tmp_msgq, &(em->inlist_main)); 999 tmp_msgq = eina_inlist_remove(tmp_msgq, &(em->inlist_main));
994 em->edje->message.num--; 1000 em->edje->message.num--;
1001 em->edje->messages = eina_inlist_remove(em->edje->messages, &(em->inlist_edje));
995 _edje_message_free(em); 1002 _edje_message_free(em);
996 } 1003 }
997 if (ed->message.num <= 0) return; 1004 if (ed->message.num <= 0) return;
diff --git a/src/lib/edje/edje_private.h b/src/lib/edje/edje_private.h
index 59be35a878..1593d8177f 100644
--- a/src/lib/edje/edje_private.h
+++ b/src/lib/edje/edje_private.h
@@ -1742,6 +1742,8 @@ struct _Edje
1742 lua_State *L; 1742 lua_State *L;
1743 Eina_Inlist *lua_objs; 1743 Eina_Inlist *lua_objs;
1744 1744
1745 Eina_Inlist *messages;
1746
1745 int lua_ref; 1747 int lua_ref;
1746 int processing_messages; 1748 int processing_messages;
1747 int references; 1749 int references;
@@ -2220,6 +2222,7 @@ struct _Edje_Message_Signal
2220struct _Edje_Message 2222struct _Edje_Message
2221{ 2223{
2222 Eina_Inlist inlist_main; // msgq or tmp_msgq - mut exclusive 2224 Eina_Inlist inlist_main; // msgq or tmp_msgq - mut exclusive
2225 Eina_Inlist inlist_edje;
2223 Edje *edje; 2226 Edje *edje;
2224 unsigned char *msg; 2227 unsigned char *msg;
2225 int id; 2228 int id;