Exactness: Avoid allocating strings when NOT recording
Signed-off-by: Aharon Hillel <a.hillel@partner.samsung.com> SVN revision: 67924
This commit is contained in:
parent
9ab15c434c
commit
2ece837725
|
@ -726,14 +726,17 @@ evas_event_feed_key_down(Evas *e, const char *keyname, const char *key,
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Contruct t duplicate strings, free them when list if freed */
|
|
||||||
key_down_key_up t;
|
if (vr_list && _hook_setting->recording)
|
||||||
t.timestamp = timestamp;
|
{ /* Construct duplicate strings, free them when list if freed */
|
||||||
t.keyname = eina_stringshare_add(keyname);
|
key_down_key_up t;
|
||||||
t.key = eina_stringshare_add(key);
|
t.timestamp = timestamp;
|
||||||
t.string = eina_stringshare_add(string);
|
t.keyname = eina_stringshare_add(keyname);
|
||||||
t.compose = eina_stringshare_add(compose);
|
t.key = eina_stringshare_add(key);
|
||||||
ADD_TO_LIST(evt, key_down_key_up, t);
|
t.string = eina_stringshare_add(string);
|
||||||
|
t.compose = eina_stringshare_add(compose);
|
||||||
|
ADD_TO_LIST(evt, key_down_key_up, t);
|
||||||
|
}
|
||||||
|
|
||||||
orig(e, keyname, key, string, compose, timestamp, data);
|
orig(e, keyname, key, string, compose, timestamp, data);
|
||||||
}
|
}
|
||||||
|
@ -761,14 +764,17 @@ evas_event_feed_key_up(Evas *e, const char *keyname, const char *key,
|
||||||
#ifdef DEBUG_TSUITE
|
#ifdef DEBUG_TSUITE
|
||||||
printf("Calling %s timestamp=<%u>\n", __func__, timestamp);
|
printf("Calling %s timestamp=<%u>\n", __func__, timestamp);
|
||||||
#endif
|
#endif
|
||||||
/* Contruct t duplicate strings, free them when list if freed */
|
|
||||||
key_down_key_up t;
|
if (vr_list && _hook_setting->recording)
|
||||||
t.timestamp = timestamp;
|
{ /* Construct duplicate strings, free them when list if freed */
|
||||||
t.keyname = eina_stringshare_add(keyname);
|
key_down_key_up t;
|
||||||
t.key = eina_stringshare_add(key);
|
t.timestamp = timestamp;
|
||||||
t.string = eina_stringshare_add(string);
|
t.keyname = eina_stringshare_add(keyname);
|
||||||
t.compose = eina_stringshare_add(compose);
|
t.key = eina_stringshare_add(key);
|
||||||
ADD_TO_LIST(evt, key_down_key_up, t);
|
t.string = eina_stringshare_add(string);
|
||||||
|
t.compose = eina_stringshare_add(compose);
|
||||||
|
ADD_TO_LIST(evt, key_down_key_up, t);
|
||||||
|
}
|
||||||
|
|
||||||
orig(e, keyname, key, string, compose, timestamp, data);
|
orig(e, keyname, key, string, compose, timestamp, data);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue