From 9f3a5a9eae9344c7b24df1ac96e6505a27854284 Mon Sep 17 00:00:00 2001 From: Joogab Yun Date: Thu, 24 Aug 2017 18:29:27 +0900 Subject: [PATCH] Revert " [evas_gl] evas : save the orient value when doing image_data_get()" Change-Id: I39bb6cdf082a48de33825be9f9ceb247ad166443 --- .../engines/gl_generic/Evas_Engine_GL_Generic.h | 6 --- src/modules/evas/engines/gl_generic/evas_engine.c | 48 +--------------------- .../Evas_Engine_Software_Generic.h | 5 --- 3 files changed, 1 insertion(+), 58 deletions(-) diff --git a/src/modules/evas/engines/gl_generic/Evas_Engine_GL_Generic.h b/src/modules/evas/engines/gl_generic/Evas_Engine_GL_Generic.h index b8388a25..e5743ee 100644 --- a/src/modules/evas/engines/gl_generic/Evas_Engine_GL_Generic.h +++ b/src/modules/evas/engines/gl_generic/Evas_Engine_GL_Generic.h @@ -8,7 +8,6 @@ typedef struct _Render_Engine_GL_Generic Render_Engine_GL_Generic; typedef struct _Context_3D Context_3D; -typedef struct _Evas_Object_Image_Data_Entry Evas_Object_Image_Data_Entry; typedef void (*Window_Use)(Outbuf *ob); typedef Evas_Engine_GL_Context *(*Window_GL_Context_Get)(Outbuf *ob); @@ -39,11 +38,6 @@ struct _Render_Engine_GL_Generic Eina_Bool evgl_initted : 1; }; -struct _Evas_Object_Image_Data_Entry -{ - Evas_Image_Orient orient; -}; - static inline Eina_Bool evas_render_engine_gl_generic_init(Render_Engine_GL_Generic *re, Outbuf *ob, diff --git a/src/modules/evas/engines/gl_generic/evas_engine.c b/src/modules/evas/engines/gl_generic/evas_engine.c index 03c7bbb..b991700 100644 --- a/src/modules/evas/engines/gl_generic/evas_engine.c +++ b/src/modules/evas/engines/gl_generic/evas_engine.c @@ -688,20 +688,12 @@ _rotate_image_data(Render_Engine_GL_Generic *re, Evas_GL_Image *im1) return im2; } -static void -_image_data_entry_del_cb(void *data) -{ - Evas_Object_Image_Data_Entry *data_entry = data; - if (data_entry) free(data_entry); -} - static void * eng_image_data_get(void *data, void *image, int to_write, DATA32 **image_data, int *err, Eina_Bool *tofree) { Render_Engine_GL_Generic *re = data; Evas_GL_Image *im_new = NULL; Evas_GL_Image *im = image; - Evas_Object_Image_Data_Entry *data_entry = NULL; int error; *image_data = NULL; @@ -720,9 +712,6 @@ eng_image_data_get(void *data, void *image, int to_write, DATA32 **image_data, i if ((tofree != NULL) && im->im && (im->orient != EVAS_IMAGE_ORIENT_NONE)) goto rotate_image; - if (!re->software.image_entry_hash && im->orient != EVAS_IMAGE_ORIENT_NONE) - re->software.image_entry_hash = eina_hash_pointer_new(_image_data_entry_del_cb); - #ifdef GL_GLES re->window_use(re->software.ob); @@ -876,25 +865,12 @@ eng_image_data_get(void *data, void *image, int to_write, DATA32 **image_data, i if (err) *err = EVAS_LOAD_ERROR_RESOURCE_ALLOCATION_FAILED; return NULL; } - im_new->orient = im->orient; evas_gl_common_image_free(im); im = im_new; } else evas_gl_common_image_dirty(im, 0, 0, 0, 0); } - - if (re->software.image_entry_hash) - { - data_entry = calloc(1, sizeof(Evas_Object_Image_Data_Entry)); - if (data_entry) - { - data_entry->orient = im->orient; - Evas_Object_Image_Data_Entry *old_entry = eina_hash_set(re->software.image_entry_hash, im->im->image.data, data_entry); - if (old_entry) free(old_entry); - } - } - *image_data = im->im->image.data; break; case EVAS_COLORSPACE_YCBCR422P601_PL: @@ -985,32 +961,10 @@ eng_image_data_put(void *data, void *image, DATA32 *image_data) case EVAS_COLORSPACE_ARGB8888: if ((!im->im) || (image_data != im->im->image.data)) { - Evas_Object_Image_Data_Entry *data_entry = NULL; - int width, height; - width = im->w; - height = im->h; - if (re->software.image_entry_hash) - { - data_entry = eina_hash_find(re->software.image_entry_hash, image_data); - if (data_entry) - { - if (data_entry->orient == EVAS_IMAGE_ORIENT_90 || - data_entry->orient == EVAS_IMAGE_ORIENT_270 || - data_entry->orient == EVAS_IMAGE_FLIP_TRANSPOSE || - data_entry->orient == EVAS_IMAGE_FLIP_TRANSVERSE) - { - width = im->h; - height = im->w; - } - } - } - - im2 = eng_image_new_from_data(data, width, height, image_data, + im2 = eng_image_new_from_data(data, im->w, im->h, image_data, eng_image_alpha_get(data, image), eng_image_colorspace_get(data, image)); if (!im2) return im; - if (data_entry) - im2->orient = data_entry->orient; evas_gl_common_image_free(im); im = im2; } diff --git a/src/modules/evas/engines/software_generic/Evas_Engine_Software_Generic.h b/src/modules/evas/engines/software_generic/Evas_Engine_Software_Generic.h index 15ce97c..179dae7 100644 --- a/src/modules/evas/engines/software_generic/Evas_Engine_Software_Generic.h +++ b/src/modules/evas/engines/software_generic/Evas_Engine_Software_Generic.h @@ -81,8 +81,6 @@ struct _Render_Engine_Software_Generic unsigned char end : 1; unsigned char lost_back : 1; unsigned char tile_strict : 1; - - Eina_Hash *image_entry_hash; }; static inline Eina_Bool @@ -148,9 +146,6 @@ evas_render_engine_software_generic_clean(Render_Engine_Software_Generic *re) if (re->rects_prev[2]) evas_common_tilebuf_free_render_rects(re->rects_prev[2]); if (re->rects_prev[3]) evas_common_tilebuf_free_render_rects(re->rects_prev[3]); - if (re->image_entry_hash) eina_hash_free(re->image_entry_hash); - - memset(re, 0, sizeof (Render_Engine_Software_Generic)); } -- 2.7.4