summaryrefslogtreecommitdiff
path: root/src/lib/evas/common/evas_draw_main.c
diff options
context:
space:
mode:
authorCedric BAIL <cedric@osg.samsung.com>2015-02-20 15:10:12 +0100
committerCedric BAIL <cedric@osg.samsung.com>2015-02-20 15:10:12 +0100
commit216397bea635d93266aca73f9e724979375f2e3b (patch)
treeff6e365f91f28e9bd734aa96ef289e2c6535c553 /src/lib/evas/common/evas_draw_main.c
parent552a38cde553ee8e311ac0681c5f6ccbb9fc4935 (diff)
evas: refcounting initialisation and protect things.
Diffstat (limited to 'src/lib/evas/common/evas_draw_main.c')
-rw-r--r--src/lib/evas/common/evas_draw_main.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/lib/evas/common/evas_draw_main.c b/src/lib/evas/common/evas_draw_main.c
index 570220b..5d1e415 100644
--- a/src/lib/evas/common/evas_draw_main.c
+++ b/src/lib/evas/common/evas_draw_main.c
@@ -32,9 +32,13 @@ evas_common_draw_context_cutouts_del(Cutout_Rects* rects, int idx)
32 } 32 }
33} 33}
34 34
35static int _init_count = 0;
36
35EAPI void 37EAPI void
36evas_common_init(void) 38evas_common_init(void)
37{ 39{
40 if (_init_count++) return ;
41
38 evas_common_cpu_init(); 42 evas_common_cpu_init();
39 43
40 evas_common_blend_init(); 44 evas_common_blend_init();
@@ -52,6 +56,8 @@ evas_common_init(void)
52EAPI void 56EAPI void
53evas_common_shutdown(void) 57evas_common_shutdown(void)
54{ 58{
59 if (--_init_count) return ;
60
55 evas_font_dir_cache_free(); 61 evas_font_dir_cache_free();
56 evas_common_image_cache_free(); 62 evas_common_image_cache_free();
57} 63}