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
This commit is contained in:
Cedric BAIL 2014-09-06 15:08:17 +02:00
parent d7433b2bfe
commit 563bf84388
2 changed files with 6 additions and 6 deletions

View File

@ -1761,6 +1761,8 @@ class Evas.Canvas (Eo.Base, Evas.Common_Interface)
implements {
Eo.Base.constructor;
Eo.Base.destructor;
Eo.Base.event_thaw;
Eo.Base.event_freeze;
Evas.Common_Interface.evas.get;
}

View File

@ -944,16 +944,15 @@ evas_event_thaw(Evas *eo_e)
eo_do(eo_e, eo_event_thaw());
}
void
_canvas_event_freeze(Eo *eo_e, void *_pd, va_list *list EINA_UNUSED)
EOLIAN void
_evas_canvas_eo_base_event_freeze(Eo *eo_e, Evas_Public_Data *e)
{
eo_do_super(eo_e, EVAS_CANVAS_CLASS, eo_event_freeze());
Evas_Public_Data *e = _pd;
e->is_frozen = EINA_TRUE;
}
void
_canvas_event_thaw(Eo *eo_e, void *_pd, va_list *list EINA_UNUSED)
EOLIAN void
_evas_canvas_eo_base_event_thaw(Eo *eo_e, Evas_Public_Data *e)
{
int fcount = -1;
eo_do_super(eo_e, EVAS_CANVAS_CLASS,
@ -962,7 +961,6 @@ _canvas_event_thaw(Eo *eo_e, void *_pd, va_list *list EINA_UNUSED)
fcount = eo_event_freeze_count_get());
if (0 == fcount)
{
Evas_Public_Data *e = _pd;
Evas_Layer *lay;
e->is_frozen = EINA_FALSE;