summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog4
-rw-r--r--NEWS2
-rw-r--r--src/lib/elm_flip.c5
3 files changed, 8 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index ae5cc216e..942f9f6e0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -12,3 +12,7 @@
122012-04-30 Jérôme Pinot 122012-04-30 Jérôme Pinot
13 13
14 * Add missing files in the tarballs. 14 * Add missing files in the tarballs.
15
162012-05-02 Cedric Bail
17
18 * Do less allocation and reuse much more Evas_Map.
diff --git a/NEWS b/NEWS
index 0cf1b6dc8..30d6ace16 100644
--- a/NEWS
+++ b/NEWS
@@ -13,5 +13,7 @@ Fixes:
13 13
14Improvements: 14Improvements:
15 15
16 * Allocate once and reuse Evas_Map.
17
16Removal: 18Removal:
17 19
diff --git a/src/lib/elm_flip.c b/src/lib/elm_flip.c
index d02acdd87..f30c4159a 100644
--- a/src/lib/elm_flip.c
+++ b/src/lib/elm_flip.c
@@ -197,10 +197,10 @@ _slice_apply(Widget_Data *wd, Slice *sl, Evas_Coord x __UNUSED__,
197 Evas_Coord y __UNUSED__, Evas_Coord w, Evas_Coord h __UNUSED__, 197 Evas_Coord y __UNUSED__, Evas_Coord w, Evas_Coord h __UNUSED__,
198 Evas_Coord ox, Evas_Coord oy, Evas_Coord ow, Evas_Coord oh) 198 Evas_Coord ox, Evas_Coord oy, Evas_Coord ow, Evas_Coord oh)
199{ 199{
200 Evas_Map *m; 200 static Evas_Map *m = NULL;
201 int i; 201 int i;
202 202
203 m = evas_map_new(4); 203 if (!m) m = evas_map_new(4);
204 if (!m) return; 204 if (!m) return;
205 evas_map_smooth_set(m, EINA_FALSE); 205 evas_map_smooth_set(m, EINA_FALSE);
206 for (i = 0; i < 4; i++) 206 for (i = 0; i < 4; i++)
@@ -238,7 +238,6 @@ _slice_apply(Widget_Data *wd, Slice *sl, Evas_Coord x __UNUSED__,
238 evas_object_map_enable_set(sl->obj, EINA_TRUE); 238 evas_object_map_enable_set(sl->obj, EINA_TRUE);
239 evas_object_image_fill_set(sl->obj, 0, 0, ow, oh); 239 evas_object_image_fill_set(sl->obj, 0, 0, ow, oh);
240 evas_object_map_set(sl->obj, m); 240 evas_object_map_set(sl->obj, m);
241 evas_map_free(m);
242} 241}
243 242
244static void 243static void