forked from enlightenment/enlightenment
Revert "e - fix major memory bloat when in gl mode - dont create shm segments"
This reverts commit ae6e09ec11
.
This breaks resizing of windows inside Enlightenment. Evas_Engines
don't bind a pixmap permanently, they just bind during each render, so
on resize this caused a broken pixmap if we don't create a new one for
each size. This patch Would be correct IF engines worked differently
wrt x pixmap binding during render.
This commit is contained in:
parent
ae6e09ec11
commit
ab1c2ed5d1
|
@ -830,7 +830,12 @@ e_pixmap_image_refresh(E_Pixmap *cp)
|
|||
{
|
||||
case E_PIXMAP_TYPE_X:
|
||||
#ifndef HAVE_WAYLAND_ONLY
|
||||
return EINA_TRUE;
|
||||
if (cp->image) return EINA_TRUE;
|
||||
if ((!cp->visual) || (!cp->client->depth)) return EINA_FALSE;
|
||||
cp->image = ecore_x_image_new(cp->w, cp->h, cp->visual, cp->client->depth);
|
||||
if (cp->image)
|
||||
cp->image_argb = ecore_x_image_is_argb32_get(cp->image);
|
||||
return !!cp->image;
|
||||
#endif
|
||||
break;
|
||||
case E_PIXMAP_TYPE_WL:
|
||||
|
@ -899,20 +904,6 @@ e_pixmap_image_is_argb(const E_Pixmap *cp)
|
|||
return EINA_FALSE;
|
||||
}
|
||||
|
||||
static Eina_Bool
|
||||
_e_pixmap_image_alloc(E_Pixmap *cp)
|
||||
{
|
||||
if (cp->image) return EINA_TRUE;
|
||||
if ((!cp->visual) || (!cp->client->depth)) return EINA_FALSE;
|
||||
cp->image = ecore_x_image_new(cp->w, cp->h, cp->visual, cp->client->depth);
|
||||
if (cp->image)
|
||||
{
|
||||
cp->image_argb = ecore_x_image_is_argb32_get(cp->image);
|
||||
return EINA_TRUE;
|
||||
}
|
||||
return EINA_FALSE;
|
||||
}
|
||||
|
||||
E_API void *
|
||||
e_pixmap_image_data_get(E_Pixmap *cp)
|
||||
{
|
||||
|
@ -922,7 +913,7 @@ e_pixmap_image_data_get(E_Pixmap *cp)
|
|||
{
|
||||
case E_PIXMAP_TYPE_X:
|
||||
#ifndef HAVE_WAYLAND_ONLY
|
||||
if (_e_pixmap_image_alloc(cp))
|
||||
if (cp->image)
|
||||
return ecore_x_image_data_get(cp->image, &cp->ibpl, NULL, &cp->ibpp);
|
||||
#endif
|
||||
break;
|
||||
|
@ -973,8 +964,7 @@ e_pixmap_image_draw(E_Pixmap *cp, const Eina_Rectangle *r)
|
|||
{
|
||||
case E_PIXMAP_TYPE_X:
|
||||
#ifndef HAVE_WAYLAND_ONLY
|
||||
if (!cp->pixmap) return EINA_FALSE;
|
||||
if (!_e_pixmap_image_alloc(cp)) return EINA_FALSE;
|
||||
if ((!cp->image) || (!cp->pixmap)) return EINA_FALSE;
|
||||
return ecore_x_image_get(cp->image, cp->pixmap, r->x, r->y, r->x, r->y, r->w, r->h);
|
||||
#endif
|
||||
break;
|
||||
|
|
Loading…
Reference in New Issue