From 49cddb399fd9e7b5c4e6fa3d56c399841c41fda7 Mon Sep 17 00:00:00 2001 From: Jiyoun Park Date: Thu, 14 Mar 2019 08:53:50 +0000 Subject: [PATCH] evas_gl_generic: fix wrong gl context set example: ... im=evas_object_image_add() evas_gl_surface_create ... evas_object_image_native_surface_set(im, xx)-> MAIN CONTEXT evas_gl_make_current -> CONTEXT A ..... evas_object_image_size_set(im, x,x) ->WRONG CONTEXT A evas_object_image_size_set of image have native_surface finally calls eng_image_size_set function of gl_generic. eng_image_size_set cannot get the proper context related with evas_gl_common_image_native_enable. It ruined gl context and texture of main context has gone wrong. Reviewed-by: Cedric BAIL Differential Revision: https://phab.enlightenment.org/D8338 --- src/modules/evas/engines/gl_generic/evas_engine.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/evas/engines/gl_generic/evas_engine.c b/src/modules/evas/engines/gl_generic/evas_engine.c index d6d1580..abfd0f7 100755 --- a/src/modules/evas/engines/gl_generic/evas_engine.c +++ b/src/modules/evas/engines/gl_generic/evas_engine.c @@ -644,6 +644,7 @@ eng_image_size_set(void *engine, void *image, int w, int h) Evas_GL_Image *im_old; if (!im) return NULL; + gl_context = gl_generic_context_find(engine, 1); if (im->native.data) { im->w = w; @@ -651,7 +652,6 @@ eng_image_size_set(void *engine, void *image, int w, int h) evas_gl_common_image_native_enable(im); return image; } - gl_context = gl_generic_context_find(engine, 1); if ((im->tex) && (im->tex->pt->dyn.img)) { evas_gl_common_texture_free(im->tex, EINA_TRUE); -- 2.7.4