forked from enlightenment/efl
parent
0f042bcbd4
commit
de7384f549
|
@ -681,21 +681,26 @@ evas_engine_xrender_x11_image_size_set(void *data, void *image, int w, int h)
|
||||||
|
|
||||||
re = (Render_Engine *)data;
|
re = (Render_Engine *)data;
|
||||||
if (!image) return image;
|
if (!image) return image;
|
||||||
|
if ((w <= 0) || (h <= 0))
|
||||||
|
{
|
||||||
|
_xre_image_free((XR_Image *)image);
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
if (((XR_Image *)image)->references > 1)
|
if (((XR_Image *)image)->references > 1)
|
||||||
{
|
{
|
||||||
XR_Image *old_image;
|
XR_Image *old_image;
|
||||||
|
|
||||||
old_image = (XR_Image *)image;
|
old_image = (XR_Image *)image;
|
||||||
image = _xre_image_copy((XR_Image *)old_image);
|
image = _xre_image_copy((XR_Image *)old_image);
|
||||||
_xre_image_free(old_image);
|
if (image)
|
||||||
|
{
|
||||||
|
_xre_image_free(old_image);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
image = old_image;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
_xre_image_dirty((XR_Image *)image);
|
_xre_image_dirty((XR_Image *)image);
|
||||||
if ((w <= 0) || (h <= 0))
|
|
||||||
{
|
|
||||||
_xre_image_free((XR_Image *)image);
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
_xre_image_resize((XR_Image *)image, w, h);
|
_xre_image_resize((XR_Image *)image, w, h);
|
||||||
return image;
|
return image;
|
||||||
}
|
}
|
||||||
|
@ -713,7 +718,12 @@ evas_engine_xrender_x11_image_dirty_region(void *data, void *image, int x, int y
|
||||||
|
|
||||||
old_image = (XR_Image *)image;
|
old_image = (XR_Image *)image;
|
||||||
image = _xre_image_copy((XR_Image *)old_image);
|
image = _xre_image_copy((XR_Image *)old_image);
|
||||||
_xre_image_free(old_image);
|
if (image)
|
||||||
|
{
|
||||||
|
_xre_image_free(old_image);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
image = old_image;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
_xre_image_dirty((XR_Image *)image);
|
_xre_image_dirty((XR_Image *)image);
|
||||||
|
@ -737,7 +747,9 @@ evas_engine_xrender_x11_image_data_get(void *data, void *image, int to_write, DA
|
||||||
old_image = (XR_Image *)image;
|
old_image = (XR_Image *)image;
|
||||||
image = _xre_image_copy((XR_Image *)old_image);
|
image = _xre_image_copy((XR_Image *)old_image);
|
||||||
if (image)
|
if (image)
|
||||||
_xre_image_free(old_image);
|
{
|
||||||
|
_xre_image_free(old_image);
|
||||||
|
}
|
||||||
else
|
else
|
||||||
image = old_image;
|
image = old_image;
|
||||||
}
|
}
|
||||||
|
@ -786,7 +798,13 @@ evas_engine_xrender_x11_image_alpha_set(void *data, void *image, int has_alpha)
|
||||||
|
|
||||||
old_image = (XR_Image *)image;
|
old_image = (XR_Image *)image;
|
||||||
image = _xre_image_copy((XR_Image *)old_image);
|
image = _xre_image_copy((XR_Image *)old_image);
|
||||||
_xre_image_free(old_image);
|
if (image)
|
||||||
|
{
|
||||||
|
((XR_Image *)image)->alpha = old_image->alpha;
|
||||||
|
_xre_image_free(old_image);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
image = old_image;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
_xre_image_dirty((XR_Image *)image);
|
_xre_image_dirty((XR_Image *)image);
|
||||||
|
|
|
@ -48,7 +48,10 @@ _xre_image_load(Ximage_Info *xinf, char *file, char *key)
|
||||||
else
|
else
|
||||||
snprintf(buf, sizeof(buf), "/@%p@%x@/%s", xinf->disp, xinf->root, file);
|
snprintf(buf, sizeof(buf), "/@%p@%x@/%s", xinf->disp, xinf->root, file);
|
||||||
im = __xre_image_find(buf);
|
im = __xre_image_find(buf);
|
||||||
if (im) return im;
|
if (im)
|
||||||
|
{
|
||||||
|
return im;
|
||||||
|
}
|
||||||
|
|
||||||
im = calloc(1, sizeof(XR_Image));
|
im = calloc(1, sizeof(XR_Image));
|
||||||
if (!im) return NULL;
|
if (!im) return NULL;
|
||||||
|
@ -179,7 +182,9 @@ _xre_image_free(XR_Image *im)
|
||||||
_xre_image_cache_set(_xr_image_cache_size);
|
_xre_image_cache_set(_xr_image_cache_size);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
__xre_image_real_free(im);
|
{
|
||||||
|
__xre_image_real_free(im);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
Loading…
Reference in New Issue