summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@osg.samsung.com>2018-06-07 17:29:46 +0900
committerHermet Park <hermetpark@gmail.com>2018-06-07 17:34:22 +0900
commit334718a0069d9d594b88f9d2d49bd1cc0c15dd4e (patch)
tree984600cfa5a77df6ec0b93d63e91e29ed2fbf661
parent4e386c883aae2b25c50e9da52e4da1cff51a6e66 (diff)
downloadefl-334718a0069d9d594b88f9d2d49bd1cc0c15dd4e.tar.gz
edje_cc: fixup edje_collections_lookup hash ids during collection pruning
Summary: unused groups are pruned during this stage of edje_cc, and it becomes necessary to update the values in this hash in order to maintain the key:value pairing between the Edje_Part_Collection_Directory_Entry and its corresponding Edje_Part_Collection so that lookups return consistent results after pruning has completed @fix Reviewers: cedric, Hermet Reviewed By: Hermet Subscribers: Hermet, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D6041
-rw-r--r--src/bin/edje/edje_cc_out.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/bin/edje/edje_cc_out.c b/src/bin/edje/edje_cc_out.c
index 24118e1a98..345fe79cfb 100644
--- a/src/bin/edje/edje_cc_out.c
+++ b/src/bin/edje/edje_cc_out.c
@@ -3721,6 +3721,7 @@ data_process_lookups(void)
ERR("A collection without a name was detected, that's not allowed.");
exit(-1);
}
+
find = eina_hash_find(edje_file->collection, pc->part);
if (find && find->id == pc->id)
{
@@ -3747,17 +3748,21 @@ data_process_lookups(void)
EINA_LIST_FOREACH(edje_collections, l3, pc)
{
Eina_List *l4;
+ Edje_Part_Collection_Directory_Entry *de;
/* Some group could be removed from the collection, but still be referenced by alias */
- find = eina_hash_find(edje_file->collection, pc->part);
- if (pc->id != find->id) find = NULL;
-
/* Update all matching alias */
EINA_LIST_FOREACH(aliases, l4, alias)
if (pc->id == alias->id)
alias->id = id;
- pc->id = id++;
+ find = eina_hash_find(edje_file->collection, pc->part);
+ if (pc->id != find->id) find = NULL;
+
+ de = eina_hash_find(edje_collections_lookup, &pc->id);
+ eina_hash_set(edje_collections_lookup, &pc->id, NULL);
+ de->id = pc->id = id++;
+ eina_hash_set(edje_collections_lookup, &pc->id, de);
if (find) find->id = pc->id;
}
}