optin to use gl for compositing... uses native surface stuff froom evas.
SVN revision: 45384
This commit is contained in:
parent
a9e5912f7f
commit
2c43ebaf2a
|
@ -196,7 +196,55 @@ _e_mod_comp_win_update(E_Comp_Win *cw)
|
|||
}
|
||||
if (!((cw->pw > 0) && (cw->ph > 0))) return;
|
||||
|
||||
if ((cw->pw != cw->w) || (cw->ph != cw->h))
|
||||
{
|
||||
ecore_x_window_geometry_get(cw->win,
|
||||
&(cw->x), &(cw->y),
|
||||
&(cw->w), &(cw->h));
|
||||
evas_object_move(cw->obj, cw->x, cw->y);
|
||||
if (cw->shobj)
|
||||
{
|
||||
evas_object_move(cw->shobj, cw->x, cw->y);
|
||||
}
|
||||
evas_object_resize(cw->obj,
|
||||
cw->w + (cw->border * 2),
|
||||
cw->h + (cw->border * 2));
|
||||
if (cw->shobj)
|
||||
{
|
||||
evas_object_resize(cw->shobj,
|
||||
cw->w + (cw->border * 2),
|
||||
cw->h + (cw->border * 2));
|
||||
}
|
||||
}
|
||||
|
||||
e_mod_comp_update_resize(cw->up, cw->pw, cw->ph);
|
||||
if ((cw->c->gl) && (!cw->shaped) && (!cw->shape_changed))
|
||||
{
|
||||
r = e_mod_comp_update_rects_get(cw->up);
|
||||
if (r)
|
||||
{
|
||||
e_mod_comp_update_clear(cw->up);
|
||||
for (i = 0; r[i].w > 0; i++)
|
||||
{
|
||||
Evas_Native_Surface ns;
|
||||
int x, y, w, h;
|
||||
|
||||
x = r[i].x; y = r[i].y;
|
||||
w = r[i].w; h = r[i].h;
|
||||
DBG("UPDATE [0x%x] %i %i %ix%i\n", cw->win, x, y, w, h);
|
||||
evas_object_image_size_set(cw->obj, cw->pw, cw->ph);
|
||||
ns.data.x11.visual = cw->vis;
|
||||
ns.data.x11.pixmap = cw->pixmap;
|
||||
evas_object_image_native_surface_set(cw->obj, &ns);
|
||||
evas_object_image_data_update_add(cw->obj, x, y, w, h);
|
||||
}
|
||||
free(r);
|
||||
}
|
||||
else
|
||||
cw->update = 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!cw->xim)
|
||||
{
|
||||
if (cw->xim = ecore_x_image_new(cw->pw, cw->ph, cw->vis, cw->depth))
|
||||
|
@ -233,6 +281,7 @@ _e_mod_comp_win_update(E_Comp_Win *cw)
|
|||
}
|
||||
else
|
||||
cw->update = 1;
|
||||
}
|
||||
if (cw->shobj)
|
||||
{
|
||||
if (cw->shaped) evas_object_hide(cw->shobj);
|
||||
|
@ -247,6 +296,8 @@ _e_mod_comp_cb_animator(void *data)
|
|||
Eina_List *new_updates = NULL; // for failed pixmap fetches - get them next frame
|
||||
|
||||
c->render_animator = NULL;
|
||||
// ecore_x_grab();
|
||||
// ecore_x_sync();
|
||||
EINA_LIST_FREE(c->updates, cw)
|
||||
{
|
||||
_e_mod_comp_win_update(cw);
|
||||
|
@ -256,6 +307,7 @@ _e_mod_comp_cb_animator(void *data)
|
|||
ecore_evas_manual_render(c->ee);
|
||||
if (new_updates) _e_mod_comp_render_queue(c);
|
||||
c->updates = new_updates;
|
||||
// ecore_x_ungrab();
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue