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
This commit is contained in:
Carsten Haitzler 2016-04-12 17:30:48 +09:00
parent 53c66c98c2
commit febfa6de9d
2 changed files with 37 additions and 2 deletions

View File

@ -1399,6 +1399,37 @@ eng_image_cache_get(void *data EINA_UNUSED)
return evas_common_image_get_cache();
}
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)
{
@ -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);

View File

@ -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);