From 8666f16ddaea269cdd6e8c6de9685b483e71b665 Mon Sep 17 00:00:00 2001 From: cedric Date: Wed, 19 Oct 2011 09:04:18 +0000 Subject: [PATCH] evas: simplify code at the same time. git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/evas@64169 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- src/modules/engines/gl_x11/evas_engine.c | 30 ++++++++++++++---------------- 1 file changed, 14 insertions(+), 16 deletions(-) diff --git a/src/modules/engines/gl_x11/evas_engine.c b/src/modules/engines/gl_x11/evas_engine.c index d468adc..094d8c3 100644 --- a/src/modules/engines/gl_x11/evas_engine.c +++ b/src/modules/engines/gl_x11/evas_engine.c @@ -2443,26 +2443,24 @@ eng_image_data_put(void *data, void *image, DATA32 *image_data) && (im->tex->pt->dyn.data) && (im->cs.space == EVAS_COLORSPACE_ARGB8888)) { + int w, h; + #if defined (GLES_VARIETY_S3C6410) || defined (GLES_VARIETY_SGX) glsym_eglUnmapImageSEC(re->win->egl_disp, im->tex->pt->dyn.img); #endif if (im->tex->pt->dyn.data == image_data) - return image; - else - { - int w, h; - - w = im->im->cache_entry.w; - h = im->im->cache_entry.h; - im2 = eng_image_new_from_data(data, w, h, image_data, - eng_image_alpha_get(data, image), - eng_image_colorspace_get(data, image)); - if (!im2) return im; - evas_gl_common_image_free(im); - im = im2; - evas_gl_common_image_dirty(im, 0, 0, 0, 0); - return im; - } + return image; + + w = im->im->cache_entry.w; + h = im->im->cache_entry.h; + im2 = eng_image_new_from_data(data, w, h, image_data, + eng_image_alpha_get(data, image), + eng_image_colorspace_get(data, image)); + if (!im2) return im; + evas_gl_common_image_free(im); + im = im2; + evas_gl_common_image_dirty(im, 0, 0, 0, 0); + return im; } switch (im->cs.space) { -- 2.7.4