evas: fix a missing eglMakeCurrent in image_cache_flush/image_cache_set in the GL...
authorWonsik Jung <sidein@samsung.com>
Wed, 13 Nov 2013 07:58:01 +0000 (16:58 +0900)
committerCedric Bail <cedric.bail@samsung.com>
Fri, 15 Nov 2013 05:08:40 +0000 (14:08 +0900)
[Problem] When glTextureDelete is called in image_cache_flush(), it sometimes doesn't work.
[Cause] glTextureDelete is called with the wrong eglContext.
[Solution] Call eng_window_use() in image_cache_flush() and image_cache_set() to use the correct eglContext.

Change-Id: Id7ab1aaeb456be6dbc5f09cb2731ace5399a5dce
Signed-off-by: Cedric Bail <cedric.bail@samsung.com>
src/modules/evas/engines/gl_x11/evas_engine.c

index 3ca2452..b40dcbb 100644 (file)
@@ -3080,6 +3080,8 @@ eng_image_cache_flush(void *data)
 
    re = (Render_Engine *)data;
 
+   if (re) eng_window_use(re->win);
+
    tmp_size = evas_common_image_get_cache();
    evas_common_image_set_cache(0);
    evas_common_rgba_image_scalecache_flush();
@@ -3093,6 +3095,9 @@ eng_image_cache_set(void *data, int bytes)
    Render_Engine *re;
 
    re = (Render_Engine *)data;
+
+   if (re) eng_window_use(re->win);
+
    evas_common_image_set_cache(bytes);
    evas_common_rgba_image_scalecache_size_set(bytes);
    evas_gl_common_image_cache_flush(re->win->gl_context);