cedric pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=1b91101966f61077da11c2f9547644465d559da8

commit 1b91101966f61077da11c2f9547644465d559da8
Author: Cedric BAIL <ced...@osg.samsung.com>
Date:   Fri Apr 24 17:04:58 2015 +0200

    evas: fix usage of the same ressource in the GL backend with orient.
    
    When we set orient we actually need to return a new image or it will confuse
    evas a lot.
---
 src/modules/evas/engines/gl_generic/evas_engine.c | 16 ++++++++++++++--
 1 file changed, 14 insertions(+), 2 deletions(-)

diff --git a/src/modules/evas/engines/gl_generic/evas_engine.c 
b/src/modules/evas/engines/gl_generic/evas_engine.c
index 6ef0d50..952dee2 100644
--- a/src/modules/evas/engines/gl_generic/evas_engine.c
+++ b/src/modules/evas/engines/gl_generic/evas_engine.c
@@ -899,6 +899,7 @@ eng_image_orient_set(void *data, void *image, 
Evas_Image_Orient orient)
 {
    Render_Engine_GL_Generic *re = data;
    Evas_GL_Image *im;
+   Evas_GL_Image *im_new;
 
    if (!image) return NULL;
    im = image;
@@ -906,8 +907,19 @@ eng_image_orient_set(void *data, void *image, 
Evas_Image_Orient orient)
 
    re->window_use(re->software.ob);
 
-   im->orient = orient;
-   return im;
+   evas_gl_common_image_update(im->gc, im);
+
+   im_new = evas_gl_common_image_new(im->gc, im->w, im->h, im->alpha, 
im->cs.space);
+   if (!im_new) return im;
+
+   *im_new = *im;
+
+   im_new->tex->references++;
+   im_new->tex->pt->references++;
+   im_new->orient = orient;
+
+   evas_gl_common_image_free(im);
+   return im_new;
 }
 
 static Evas_Image_Orient

-- 


Reply via email to