summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCedric BAIL <cedric@osg.samsung.com>2014-09-06 15:08:17 +0200
committerCedric BAIL <cedric@osg.samsung.com>2014-09-06 15:15:10 +0200
commit6a373caca071e66ff3258b4932a34bc4cddcd115 (patch)
tree150ef14de3b21d15a6858b2c33ed15972fb05e3f
parent093e48845078a250b6180dcf7bfb8b5df09846dc (diff)
evas: let's freeze the canvas, shall we ?
This is a critical performance issue that was introduced during our move to eo2. This code was still eo1 style so I guess it was just forgotten. The result is that canvas with large numbers of widget were slower after the migration. @fix
-rw-r--r--src/lib/evas/canvas/evas_canvas.eo2
-rw-r--r--src/lib/evas/canvas/evas_events.c10
2 files changed, 6 insertions, 6 deletions
diff --git a/src/lib/evas/canvas/evas_canvas.eo b/src/lib/evas/canvas/evas_canvas.eo
index 2ebf152361..5c45c21c6e 100644
--- a/src/lib/evas/canvas/evas_canvas.eo
+++ b/src/lib/evas/canvas/evas_canvas.eo
@@ -1761,6 +1761,8 @@ class Evas.Canvas (Eo.Base, Evas.Common_Interface)
1761 implements { 1761 implements {
1762 Eo.Base.constructor; 1762 Eo.Base.constructor;
1763 Eo.Base.destructor; 1763 Eo.Base.destructor;
1764 Eo.Base.event_thaw;
1765 Eo.Base.event_freeze;
1764 Evas.Common_Interface.evas.get; 1766 Evas.Common_Interface.evas.get;
1765 } 1767 }
1766 1768
diff --git a/src/lib/evas/canvas/evas_events.c b/src/lib/evas/canvas/evas_events.c
index d18245d5e1..aff9989460 100644
--- a/src/lib/evas/canvas/evas_events.c
+++ b/src/lib/evas/canvas/evas_events.c
@@ -945,16 +945,15 @@ evas_event_thaw(Evas *eo_e)
945 eo_do(eo_e, eo_event_thaw()); 945 eo_do(eo_e, eo_event_thaw());
946} 946}
947 947
948void 948EOLIAN void
949_canvas_event_freeze(Eo *eo_e, void *_pd, va_list *list EINA_UNUSED) 949_evas_canvas_eo_base_event_freeze(Eo *eo_e, Evas_Public_Data *e)
950{ 950{
951 eo_do_super(eo_e, EVAS_CANVAS_CLASS, eo_event_freeze()); 951 eo_do_super(eo_e, EVAS_CANVAS_CLASS, eo_event_freeze());
952 Evas_Public_Data *e = _pd;
953 e->is_frozen = EINA_TRUE; 952 e->is_frozen = EINA_TRUE;
954} 953}
955 954
956void 955EOLIAN void
957_canvas_event_thaw(Eo *eo_e, void *_pd, va_list *list EINA_UNUSED) 956_evas_canvas_eo_base_event_thaw(Eo *eo_e, Evas_Public_Data *e)
958{ 957{
959 int fcount = -1; 958 int fcount = -1;
960 eo_do_super(eo_e, EVAS_CANVAS_CLASS, 959 eo_do_super(eo_e, EVAS_CANVAS_CLASS,
@@ -963,7 +962,6 @@ _canvas_event_thaw(Eo *eo_e, void *_pd, va_list *list EINA_UNUSED)
963 fcount = eo_event_freeze_count_get()); 962 fcount = eo_event_freeze_count_get());
964 if (0 == fcount) 963 if (0 == fcount)
965 { 964 {
966 Evas_Public_Data *e = _pd;
967 Evas_Layer *lay; 965 Evas_Layer *lay;
968 966
969 e->is_frozen = EINA_FALSE; 967 e->is_frozen = EINA_FALSE;