Make EDJE_PROGRAM_CACHE configurable with autotools (with small fix for make it run again).

SVN revision: 35942
This commit is contained in:
Cedric BAIL 2008-09-11 11:14:39 +00:00
parent aaa724d23c
commit 060f30aa6e
4 changed files with 20 additions and 9 deletions

View File

@ -90,6 +90,20 @@ PKG_CHECK_MODULES(ECORE_EVAS, [
ecore-evas >= 0.9.9
])
dnl Optional EDJE_PROGRAM_CACHE (use much more ram, but increase speed in some case)
want_edje_program_cache="no"
AC_ARG_ENABLE(edje-program-cache,
AC_HELP_STRING(
[--enable-edje-program-cache],
[enable EDJE_PROGRAM_CACHE support. [[default=disabled]]]
),
[ want_edje_program_cache=$enableval ]
)
AM_CONDITIONAL(EDJE_PROGRAM_CACHE, test "x$want_edje_program_cache" = "xyes")
if test "x$want_edje_program_cache" = "xyes"; then
AC_DEFINE(EDJE_PROGRAM_CACHE, 1, [Cache result of program glob matches - this uses up extra ram with the gain of faster program matching])
fi
AC_MSG_CHECKING([for location of Vim data files])
install_vim="yes";
AC_ARG_WITH(vim,
@ -161,6 +175,8 @@ echo "------------------------------------------------------------------------"
echo
echo "Configuration Options Summary:"
echo
echo " EDJE_PROGRAM_CACHE...: $want_edje_program_cache"
echo
echo " Build binaries.......: $have_edje_cc"
echo
echo " Compilation..........: make"

View File

@ -7,7 +7,7 @@
void _edje_collection_free_part_description_free(Edje_Part_Description *desc, unsigned int free_strings);
static Evas_Bool _edje_file_collection_hash_foreach(const Evas_Hash *hash, const char *key, void *data, void *fdata);
#ifdef EDJE_PROGRAM_CACHE
static int _edje_collection_free_prog_cache_matches_free_cb(Evas_Hash *hash, const char *key, void *data, void *fdata);
static Evas_Bool _edje_collection_free_prog_cache_matches_free_cb(const Evas_Hash *hash, const char *key, void *data, void *fdata);
#endif
static int _edje_object_file_set_internal(Evas_Object *obj, const char *file, const char *group, Evas_List *group_path);
static void _cb_signal_repeat(void *data, Evas_Object *obj, const char *signal, const char *source);
@ -1000,7 +1000,7 @@ _edje_file_collection_hash_foreach(const Evas_Hash *hash, const char *key, void
}
#ifdef EDJE_PROGRAM_CACHE
static int
static Evas_Bool
_edje_collection_free_prog_cache_matches_free_cb(const Evas_Hash *hash, const char *key, void *data, void *fdata)
{
evas_list_free((Evas_List *)data);

View File

@ -92,12 +92,6 @@ void *alloca (size_t);
* ? all unsafe calls that may result in callbacks must be marked and dealt with
*/
/* Cache result of program glob matches - this uses up extra ram with the gain
* of faster program matching if a part has LOTS of programs.
#define EDJE_PROGRAM_CACHE
*/
struct _Edje_Position_Scale
{
double x, y;

View File

@ -916,6 +916,7 @@ _edje_emit_handle(Edje *ed, const char *sig, const char *src)
#ifdef EDJE_PROGRAM_CACHE
{
Evas_List *matches;
Evas_List *l;
if (evas_hash_find(ec->prog_cache.no_matches, tmps))
{
@ -964,7 +965,7 @@ _edje_emit_handle(Edje *ed, const char *sig, const char *src)
#ifdef EDJE_PROGRAM_CACHE
if (tmps)
{
if (matched == 0)
if (data.matched == 0)
ec->prog_cache.no_matches =
evas_hash_add(ec->prog_cache.no_matches, tmps, ed);
else