summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2016-04-12 17:30:48 +0900
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2016-04-12 17:30:48 +0900
commitfebfa6de9d5b17139e37b2f386f1d44e90fb3a81 (patch)
treede11a897580987218079870aaf7b46dc6e4e2e70
parent53c66c98c2ae13a8c96b4ae1f9d735cda179e89d (diff)
ecas gl: ensure make current/window/outpbut enabled before flushing
this should cover up possible texture leaks from gl engine with a null context on font freeing. @fix
-rw-r--r--src/modules/evas/engines/gl_generic/evas_engine.c35
-rw-r--r--src/modules/evas/engines/gl_x11/evas_engine.c4
2 files changed, 37 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 3ce35a6d1b..ca8d83950b 100644
--- a/src/modules/evas/engines/gl_generic/evas_engine.c
+++ b/src/modules/evas/engines/gl_generic/evas_engine.c
@@ -1400,6 +1400,37 @@ eng_image_cache_get(void *data EINA_UNUSED)
1400} 1400}
1401 1401
1402static void 1402static void
1403eng_font_cache_flush(void *data)
1404{
1405 Render_Engine_GL_Generic *re = data;
1406 int tmp_size;
1407
1408 re->window_use(re->software.ob);
1409 tmp_size = evas_common_font_cache_get();
1410 evas_common_font_cache_set(0);
1411 evas_common_font_flush();
1412 evas_common_font_cache_set(tmp_size);
1413}
1414
1415static void
1416eng_font_cache_set(void *data, int bytes)
1417{
1418 Render_Engine_GL_Generic *re = data;
1419
1420 re->window_use(re->software.ob);
1421 evas_common_font_cache_set(bytes);
1422}
1423
1424static int
1425eng_font_cache_get(void *data)
1426{
1427 Render_Engine_GL_Generic *re = data;
1428
1429 re->window_use(re->software.ob);
1430 return evas_common_font_cache_get();
1431}
1432
1433static void
1403eng_image_stride_get(void *data EINA_UNUSED, void *image, int *stride) 1434eng_image_stride_get(void *data EINA_UNUSED, void *image, int *stride)
1404{ 1435{
1405 Evas_GL_Image *im = image; 1436 Evas_GL_Image *im = image;
@@ -2835,6 +2866,10 @@ module_open(Evas_Module *em)
2835 ORD(image_cache_set); 2866 ORD(image_cache_set);
2836 ORD(image_cache_get); 2867 ORD(image_cache_get);
2837 2868
2869 ORD(font_cache_flush);
2870 ORD(font_cache_set);
2871 ORD(font_cache_get);
2872
2838 ORD(gl_surface_create); 2873 ORD(gl_surface_create);
2839 ORD(gl_pbuffer_surface_create); 2874 ORD(gl_pbuffer_surface_create);
2840 ORD(gl_surface_destroy); 2875 ORD(gl_surface_destroy);
diff --git a/src/modules/evas/engines/gl_x11/evas_engine.c b/src/modules/evas/engines/gl_x11/evas_engine.c
index b09ae633d2..19fa9be2a6 100644
--- a/src/modules/evas/engines/gl_x11/evas_engine.c
+++ b/src/modules/evas/engines/gl_x11/evas_engine.c
@@ -1942,9 +1942,9 @@ eng_canvas_alpha_get(void *data, void *info EINA_UNUSED)
1942static void 1942static void
1943eng_output_dump(void *data) 1943eng_output_dump(void *data)
1944{ 1944{
1945 Render_Engine *re; 1945 Render_Engine *re = data;
1946 1946
1947 re = (Render_Engine *)data; 1947 eng_window_use(eng_get_ob(re));
1948 evas_common_image_image_all_unload(); 1948 evas_common_image_image_all_unload();
1949 evas_common_font_font_all_unload(); 1949 evas_common_font_font_all_unload();
1950 glsym_evas_gl_common_image_all_unload(eng_get_ob(re)->gl_context); 1950 glsym_evas_gl_common_image_all_unload(eng_get_ob(re)->gl_context);