discomfitor pushed a commit to branch master.
commit dde99c089afe76fba5b575fa332e12d9b3e7a009
Author: Mike Blumenkrantz <[email protected]>
Date: Tue Apr 16 15:05:11 2013 +0100
flag comp win geometry updates and call only as necessary
---
src/bin/e_comp.c | 13 +++++++++----
src/bin/e_comp.h | 1 +
2 files changed, 10 insertions(+), 4 deletions(-)
diff --git a/src/bin/e_comp.c b/src/bin/e_comp.c
index 031795f..a9010d4 100644
--- a/src/bin/e_comp.c
+++ b/src/bin/e_comp.c
@@ -469,6 +469,11 @@ _e_comp_win_geometry_update(E_Comp_Win *cw)
{
int x, y, w, h;
+ if (cw->update)
+ {
+ cw->geom_update = 1;
+ return;
+ }
if (cw->bd)
x = cw->bd->x, y = cw->bd->y;
else if (cw->visible)
@@ -492,6 +497,7 @@ _e_comp_win_geometry_update(E_Comp_Win *cw)
e_layout_child_move(cw->effect_obj, x, y);
e_layout_child_resize(cw->effect_obj, w, h);
}
+ cw->geom_update = 0;
}
static void
@@ -501,12 +507,14 @@ _e_comp_win_update(E_Comp_Win *cw)
Evas_Object *o;
E_Comp_Render_Update_Rect *r;
int i;
+ int pw, ph;
int pshaped = cw->shaped;
DBG("UPDATE [0x%x] pm = %x", cw->win, cw->pixmap);
if (conf->grab) ecore_x_grab();
cw->update = 0;
+ pw = cw->pw, ph = cw->ph;
if (cw->argb)
{
if (cw->rects)
@@ -574,8 +582,6 @@ _e_comp_win_update(E_Comp_Win *cw)
{
ecore_x_pixmap_geometry_get(cw->pixmap, NULL, NULL,
&(cw->pw), &(cw->ph));
_e_comp_win_ready_timeout_setup(cw);
- if ((cw->pw > 0) && (cw->ph > 0))
- _e_comp_win_geometry_update(cw);
}
else
{
@@ -641,8 +647,6 @@ _e_comp_win_update(E_Comp_Win *cw)
// evas_object_move(cw->effect_obj, cw->x, cw->y);
// was cw->w / cw->h
// evas_object_resize(cw->effect_obj, cw->pw, cw->ph);
- _e_comp_win_geometry_update(cw);
-
if ((cw->c->gl) && (conf->texture_from_pixmap) &&
(!cw->shaped) && (!cw->rects) && (cw->pixmap))
{
@@ -869,6 +873,7 @@ _e_comp_win_update(E_Comp_Win *cw)
}
}
}
+ if (cw->geom_update || (cw->pw != pw) || (cw->ph != ph))
_e_comp_win_geometry_update(cw);
if ((cw->shobj) && (cw->obj))
{
if (pshaped != cw->shaped)
diff --git a/src/bin/e_comp.h b/src/bin/e_comp.h
index 8daab4b..786749f 100644
--- a/src/bin/e_comp.h
+++ b/src/bin/e_comp.h
@@ -184,6 +184,7 @@ struct _E_Comp_Win
Eina_Bool real_hid : 1; // last hide was a real window unmap
Eina_Bool inhash : 1; // is in the windows hash
Eina_Bool show_ready : 1; // is this window ready for its first
show
+ Eina_Bool geom_update : 1; // window needs geometry updated
Eina_Bool show_anim : 1; // ran show animation
--
------------------------------------------------------------------------------
Precog is a next-generation analytics platform capable of advanced
analytics on semi-structured data. The platform includes APIs for building
apps and a phenomenal toolset for data science. Developers can use
our toolset for easy data analysis & visualization. Get a free account!
http://www2.precog.com/precogplatform/slashdotnewsletter