From 1b91101966f61077da11c2f9547644465d559da8 Mon Sep 17 00:00:00 2001 From: Cedric BAIL Date: Fri, 24 Apr 2015 17:04:58 +0200 Subject: [PATCH] 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. --- .../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 6ef0d50597..952dee20c6 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 -- 2.34.1