Enlightenment CVS committal Author : kwo Project : e16 Module : e
Dir : e16/e/src Modified Files: E.h eimage.c eimage.h mod-misc.c Log Message: Enable setting imlib2 image cache size (debug only). =================================================================== RCS file: /cvs/e/e16/e/src/E.h,v retrieving revision 1.582 retrieving revision 1.583 diff -u -3 -r1.582 -r1.583 --- E.h 19 Apr 2007 22:25:25 -0000 1.582 +++ E.h 7 May 2007 23:26:13 -0000 1.583 @@ -429,6 +429,7 @@ char argb_internal_clients; char argb_clients; char argb_clients_inherit_attr; + int image_cache_size; int mask_alpha_threshold; } testing; =================================================================== RCS file: /cvs/e/e16/e/src/eimage.c,v retrieving revision 1.16 retrieving revision 1.17 diff -u -3 -r1.16 -r1.17 --- eimage.c 29 Apr 2007 13:13:03 -0000 1.16 +++ eimage.c 7 May 2007 23:26:13 -0000 1.17 @@ -53,6 +53,17 @@ imlib_context_set_dither(1); } +int +EImageSetCacheSize(int size) +{ + int size_old; + + size_old = imlib_get_cache_size(); + imlib_set_cache_size(size); + + return size_old; +} + static void _EImageFlagsSet(int flags) { =================================================================== RCS file: /cvs/e/e16/e/src/eimage.h,v retrieving revision 1.10 retrieving revision 1.11 diff -u -3 -r1.10 -r1.11 --- eimage.h 29 Apr 2007 13:13:03 -0000 1.10 +++ eimage.h 7 May 2007 23:26:13 -0000 1.11 @@ -39,6 +39,7 @@ #define EIMAGE_HIGH_MASK_THR 0x04 void EImageInit(Display * dpy); +int EImageSetCacheSize(int size); EImage *EImageCreate(int w, int h); EImage *EImageCreateFromData(int w, int h, unsigned int *data); =================================================================== RCS file: /cvs/e/e16/e/src/mod-misc.c,v retrieving revision 1.52 retrieving revision 1.53 diff -u -3 -r1.52 -r1.53 --- mod-misc.c 7 Apr 2007 13:19:30 -0000 1.52 +++ mod-misc.c 7 May 2007 23:26:13 -0000 1.53 @@ -22,6 +22,7 @@ */ #include "E.h" #include "dialog.h" +#include "eimage.h" #include "emodule.h" #include "settings.h" #include "snaps.h" @@ -108,6 +109,19 @@ } #endif +static void +_CfgImageCacheSize(void *item __UNUSED__, const char *value) +{ + int size_old, size_new; + + if (!value || !value[0]) + return; + + size_new = atoi(value); + size_old = EImageSetCacheSize(size_new); + IpcPrintf("Image cache size %u->%u byte\n", size_old, size_new); +} + static const CfgItem MiscCfgItems[] = { CFG_ITEM_INT(Conf, animation.step, 10), @@ -166,6 +180,7 @@ CFG_ITEM_BOOL(Conf, testing.argb_internal_clients, 0), CFG_ITEM_BOOL(Conf, testing.argb_clients, 0), CFG_ITEM_BOOL(Conf, testing.argb_clients_inherit_attr, 0), + CFG_FUNC_INT(Conf, testing.image_cache_size, -1, _CfgImageCacheSize), CFG_ITEM_INT(Conf, testing.mask_alpha_threshold, 8), CFG_ITEM_BOOL(Conf, autosave, 1), ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ enlightenment-cvs mailing list enlightenment-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs