From: Woo Seungsoo Date: Wed, 19 Oct 2011 12:22:21 +0000 (+0900) Subject: Unnecessary image_dirty_set is removed. X-Git-Tag: accepted/2.0/20130306.225542~211 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=8950722156d3d8e621f57fdeca112892945ca8dc;p=profile%2Fivi%2Fevas.git Unnecessary image_dirty_set is removed. Change-Id: Ib37f81e77d7a84fbe872b11f1dd34836cfc1a521 --- diff --git a/src/modules/engines/gl_x11/evas_engine.c b/src/modules/engines/gl_x11/evas_engine.c index 88a283f..08066d3 100644 --- a/src/modules/engines/gl_x11/evas_engine.c +++ b/src/modules/engines/gl_x11/evas_engine.c @@ -1879,46 +1879,41 @@ 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) - { - evas_gl_common_image_dirty(im, 0, 0, 0, 0); - 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) { case EVAS_COLORSPACE_ARGB8888: - if (image_data != im->im->image.data) - { - 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; - } + if (image_data != im->im->image.data) + { + 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; + } break; case EVAS_COLORSPACE_YCBCR422P601_PL: case EVAS_COLORSPACE_YCBCR422P709_PL: @@ -1926,20 +1921,18 @@ eng_image_data_put(void *data, void *image, DATA32 *image_data) case EVAS_COLORSPACE_YCBCR420NV12601_PL: case EVAS_COLORSPACE_YCBCR420TM12601_PL: if (image_data != im->cs.data) - { - if (im->cs.data) - { - if (!im->cs.no_free) free(im->cs.data); - } - im->cs.data = image_data; - } - break; + { + if (im->cs.data) + { + if (!im->cs.no_free) free(im->cs.data); + } + im->cs.data = image_data; + } + break; default: - abort(); - break; + abort(); + break; } - /* hmmm - but if we wrote... why bother? */ - evas_gl_common_image_dirty(im, 0, 0, 0, 0); return im; }