about fontconfig, i've remarked that, if FcInit() can be called a lot of
times, FcFini() must be called only once. This is a problem if a program
that uses evas and also fontconfig (for some reason) close also
fontconfig.
I've told the devs of fontconfig about that. Keith Packard agrees that
this should be fixed (using a ref count like we do), but no code has been
commited in fontconfig yet about that problem.
Vincent
On Sun, 19 Apr 2009, Enlightenment SVN wrote:
Log:
cleanup on shutdown better
Author: raster
Date: 2009-04-19 13:40:41 -0700 (Sun, 19 Apr 2009)
New Revision: 40242
Modified:
trunk/evas/src/lib/canvas/evas_font_dir.c
trunk/evas/src/lib/canvas/evas_main.c
trunk/evas/src/lib/engines/common/evas_image_scalecache.c
Modified: trunk/evas/src/lib/canvas/evas_font_dir.c
===================================================================
--- trunk/evas/src/lib/canvas/evas_font_dir.c 2009-04-19 20:40:01 UTC (rev
40241)
+++ trunk/evas/src/lib/canvas/evas_font_dir.c 2009-04-19 20:40:41 UTC (rev
40242)
@@ -48,6 +48,9 @@
void
evas_font_dir_cache_free(void)
{
+#ifdef HAVE_FONTCONFIG
+ FcFini();
+#endif
if (!font_dirs) return;
eina_hash_foreach(font_dirs, font_cache_dir_free, NULL);
@@ -157,6 +160,18 @@
}
}
+static void
+evas_font_init(void)
+{
+ static int done = 0;
+ if (done) return;
+ done = 1;
+#ifdef HAVE_FONTCONFIG
+ FcInit();
+ FcConfigEnableHome(1);
+#endif
+}
+
void *
evas_font_load(Evas *evas, const char *name, const char *source, int size)
{
@@ -167,6 +182,8 @@
if (!name) return NULL;
if (name[0] == 0) return NULL;
+
+ evas_font_init();
EINA_LIST_FOREACH(fonts_cache, l, fd)
{
@@ -409,6 +426,8 @@
FcObjectSet *os;
int i;
+ evas_font_init();
+
p = FcPatternCreate();
os = FcObjectSetBuild(FC_FAMILY, FC_STYLE, NULL);
Modified: trunk/evas/src/lib/canvas/evas_main.c
===================================================================
--- trunk/evas/src/lib/canvas/evas_main.c 2009-04-19 20:40:01 UTC (rev
40241)
+++ trunk/evas/src/lib/canvas/evas_main.c 2009-04-19 20:40:41 UTC (rev
40242)
@@ -42,6 +42,8 @@
evas_font_dir_cache_free();
evas_common_shutdown();
evas_module_shutdown();
+ eina_mempool_delete(_evas_rectangle_mp);
+ _evas_rectangle_mp = NULL;
eina_shutdown();
}
return initcount;
Modified: trunk/evas/src/lib/engines/common/evas_image_scalecache.c
===================================================================
--- trunk/evas/src/lib/engines/common/evas_image_scalecache.c 2009-04-19
20:40:01 UTC (rev 40241)
+++ trunk/evas/src/lib/engines/common/evas_image_scalecache.c 2009-04-19
20:40:41 UTC (rev 40242)
@@ -472,6 +472,8 @@
// pops++;
if (!ct)
{
+ // FIXME: static ct - nver can free on shutdown? not a leak
+ // or real harm - just annoying valgrind bitch
ct = evas_common_draw_context_new();
evas_common_draw_context_set_render_op(ct, _EVAS_RENDER_COPY);
}
@@ -495,6 +497,30 @@
0, 0,
dst_region_w, dst_region_h);
sci->populate_me = 0;
+#if 0 // visual debug of cached images
+ {
+ int xx, yy;
+ DATA32 *pp;
+
+ pp = sci->im->image.data;
+ for (yy = 0; yy < dst_region_h; yy++)
+ {
+
+ for (xx = 0; xx < dst_region_w; xx++)
+ {
+ if (yy & 0x1)
+ {
+ if (xx & 0x1) *pp = 0;
+ }
+ else
+ {
+ if (!(xx & 0x1)) *pp = 0;
+ }
+ pp++;
+ }
+ }
+ }
+#endif
}
cache_size += sci->dst_w * sci->dst_h * 4;
// printf(" + %i @ flop: %i (%ix%i)\n",
------------------------------------------------------------------------------
Stay on top of everything new and different, both inside and
around Java (TM) technology - register by April 22, and save
$200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco.
300 plus technical and hands-on sessions. Register today.
Use priority code J9JMT32. http://p.sf.net/sfu/p
_______________________________________________
enlightenment-svn mailing list
enlightenment-...@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-svn
--
Ce message a été vérifié par MailScanner
pour des virus ou des polluriels et rien de
suspect n'a été trouvé.
Message délivré par le serveur de messagerie de l'Université d'Evry.
------------------------------------------------------------------------------
Stay on top of everything new and different, both inside and
around Java (TM) technology - register by April 22, and save
$200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco.
300 plus technical and hands-on sessions. Register today.
Use priority code J9JMT32. http://p.sf.net/sfu/p
_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel