evas: simplify code at the same time.
authorcedric <cedric@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Wed, 19 Oct 2011 09:04:18 +0000 (09:04 +0000)
committercedric <cedric@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Wed, 19 Oct 2011 09:04:18 +0000 (09:04 +0000)
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

index d468adc..094d8c3 100644 (file)
@@ -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)
      {