raster pushed a commit to branch master.

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

commit febfa6de9d5b17139e37b2f386f1d44e90fb3a81
Author: Carsten Haitzler (Rasterman) <ras...@rasterman.com>
Date:   Tue Apr 12 17:30:48 2016 +0900

    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
---
 src/modules/evas/engines/gl_generic/evas_engine.c | 35 +++++++++++++++++++++++
 src/modules/evas/engines/gl_x11/evas_engine.c     |  4 +--
 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 3ce35a6..ca8d839 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)
 }
 
 static void
+eng_font_cache_flush(void *data)
+{
+   Render_Engine_GL_Generic *re = data;
+   int tmp_size;
+
+   re->window_use(re->software.ob);
+   tmp_size = evas_common_font_cache_get();
+   evas_common_font_cache_set(0);
+   evas_common_font_flush();
+   evas_common_font_cache_set(tmp_size);
+}
+
+static void
+eng_font_cache_set(void *data, int bytes)
+{
+   Render_Engine_GL_Generic *re = data;
+
+   re->window_use(re->software.ob);
+   evas_common_font_cache_set(bytes);
+}
+
+static int
+eng_font_cache_get(void *data)
+{
+   Render_Engine_GL_Generic *re = data;
+
+   re->window_use(re->software.ob);
+   return evas_common_font_cache_get();
+}
+
+static void
 eng_image_stride_get(void *data EINA_UNUSED, void *image, int *stride)
 {
    Evas_GL_Image *im = image;
@@ -2835,6 +2866,10 @@ module_open(Evas_Module *em)
    ORD(image_cache_set);
    ORD(image_cache_get);
 
+   ORD(font_cache_flush);
+   ORD(font_cache_set);
+   ORD(font_cache_get);
+
    ORD(gl_surface_create);
    ORD(gl_pbuffer_surface_create);
    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 b09ae63..19fa9be 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)
 static void
 eng_output_dump(void *data)
 {
-   Render_Engine *re;
+   Render_Engine *re = data;
 
-   re = (Render_Engine *)data;
+   eng_window_use(eng_get_ob(re));
    evas_common_image_image_all_unload();
    evas_common_font_font_all_unload();
    glsym_evas_gl_common_image_all_unload(eng_get_ob(re)->gl_context);

-- 


Reply via email to