summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorsubhransu mohanty <sub.mohanty@samsung.com>2017-11-09 10:31:12 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2017-11-10 11:20:38 +0900
commitaacf277c3affcc68806020c1f9e7a44829e1bb74 (patch)
tree8c5cadd81b8d96b27db889d5df6a5ab3ff3aa9ca /src
parentd4a2b2025bd1e7396de74c0becb09d4ecbf3b6b9 (diff)
evas/vg: added support for engine surface cache.
Diffstat (limited to 'src')
-rw-r--r--src/lib/evas/include/evas_common_private.h28
-rw-r--r--src/modules/evas/engines/gl_drm/evas_engine.c5
-rw-r--r--src/modules/evas/engines/gl_generic/evas_engine.c5
-rw-r--r--src/modules/evas/engines/gl_sdl/evas_engine.c5
-rw-r--r--src/modules/evas/engines/gl_x11/evas_engine.c4
-rw-r--r--src/modules/evas/engines/software_generic/Evas_Engine_Software_Generic.h2
-rw-r--r--src/modules/evas/engines/software_generic/evas_engine.c122
-rw-r--r--src/modules/evas/engines/wayland_egl/evas_engine.c3
8 files changed, 108 insertions, 66 deletions
diff --git a/src/lib/evas/include/evas_common_private.h b/src/lib/evas/include/evas_common_private.h
index 4f731d4e79..6518b16f93 100644
--- a/src/lib/evas/include/evas_common_private.h
+++ b/src/lib/evas/include/evas_common_private.h
@@ -1174,6 +1174,34 @@ typedef enum _Evas_Render_Mode
1174void evas_common_rgba_image_scalecache_items_ref(Image_Entry *ie, Eina_Array *ret); 1174void evas_common_rgba_image_scalecache_items_ref(Image_Entry *ie, Eina_Array *ret);
1175void evas_common_rgba_image_scalecache_item_unref(Image_Entry *ie); 1175void evas_common_rgba_image_scalecache_item_unref(Image_Entry *ie);
1176 1176
1177// Generic Cache
1178typedef struct _Generic_Cache Generic_Cache;
1179typedef struct _Generic_Cache_Entry Generic_Cache_Entry;
1180
1181struct _Generic_Cache_Entry
1182{
1183 void *key; // pointer
1184 void *data; // engine image
1185 int ref;
1186};
1187
1188typedef void (*Generic_Cache_Free)(void *user_data, void *data);
1189
1190struct _Generic_Cache
1191{
1192 Eina_Hash *hash;
1193 Eina_List *lru_list;
1194 void *user_data;
1195 Generic_Cache_Free free_func;
1196};
1197
1198EAPI Generic_Cache* generic_cache_new(void *user_data, Generic_Cache_Free func);
1199EAPI void generic_cache_destroy(Generic_Cache *cache);
1200EAPI void generic_cache_dump(Generic_Cache *cache);
1201EAPI void generic_cache_data_set(Generic_Cache *cache, void *key, void *data);
1202EAPI void *generic_cache_data_get(Generic_Cache *cache, void *key);
1203EAPI void generic_cache_data_drop(Generic_Cache *cache, void *key);
1204
1177/*****************************************************************************/ 1205/*****************************************************************************/
1178 1206
1179#ifdef __cplusplus 1207#ifdef __cplusplus
diff --git a/src/modules/evas/engines/gl_drm/evas_engine.c b/src/modules/evas/engines/gl_drm/evas_engine.c
index e1a36940cc..fd219bbd9b 100644
--- a/src/modules/evas/engines/gl_drm/evas_engine.c
+++ b/src/modules/evas/engines/gl_drm/evas_engine.c
@@ -1070,13 +1070,14 @@ eng_canvas_alpha_get(void *data)
1070} 1070}
1071 1071
1072static void 1072static void
1073eng_output_dump(void *engine EINA_UNUSED, void *data) 1073eng_output_dump(void *engine, void *data)
1074{ 1074{
1075 Render_Engine *re; 1075 Render_Engine *re;
1076 Render_Engine_GL_Generic *e = engine;
1076 1077
1077 re = (Render_Engine *)data; 1078 re = (Render_Engine *)data;
1078 if (!re) return; 1079 if (!re) return;
1079 1080 generic_cache_dump(e->software.surface_cache);
1080 evas_common_image_image_all_unload(); 1081 evas_common_image_image_all_unload();
1081 evas_common_font_font_all_unload(); 1082 evas_common_font_font_all_unload();
1082 glsym_evas_gl_common_image_all_unload(eng_get_ob(re)->gl_context); 1083 glsym_evas_gl_common_image_all_unload(eng_get_ob(re)->gl_context);
diff --git a/src/modules/evas/engines/gl_generic/evas_engine.c b/src/modules/evas/engines/gl_generic/evas_engine.c
index a6b229a5c6..62f1a38290 100644
--- a/src/modules/evas/engines/gl_generic/evas_engine.c
+++ b/src/modules/evas/engines/gl_generic/evas_engine.c
@@ -152,6 +152,8 @@ egl_display_get(Render_Engine_GL_Generic *engine)
152} 152}
153#endif 153#endif
154 154
155void eng_image_free(void *engine, void *image);
156
155static void * 157static void *
156eng_engine_new(void) 158eng_engine_new(void)
157{ 159{
@@ -159,6 +161,7 @@ eng_engine_new(void)
159 161
160 engine = calloc(1, sizeof (Render_Engine_GL_Generic)); 162 engine = calloc(1, sizeof (Render_Engine_GL_Generic));
161 if (!engine) return NULL; 163 if (!engine) return NULL;
164 engine->software.surface_cache = generic_cache_new(engine, eng_image_free);
162 165
163 return engine; 166 return engine;
164} 167}
@@ -169,6 +172,8 @@ eng_engine_free(void *engine)
169 Render_Engine_GL_Generic *e = engine; 172 Render_Engine_GL_Generic *e = engine;
170 Render_Output_GL_Generic *output; 173 Render_Output_GL_Generic *output;
171 174
175 generic_cache_destroy(e->software.surface_cache);
176
172 EINA_LIST_FREE(e->software.outputs, output) 177 EINA_LIST_FREE(e->software.outputs, output)
173 ERR("Output %p not properly cleaned before engine destruction.", output); 178 ERR("Output %p not properly cleaned before engine destruction.", output);
174 free(e); 179 free(e);
diff --git a/src/modules/evas/engines/gl_sdl/evas_engine.c b/src/modules/evas/engines/gl_sdl/evas_engine.c
index bf6ba6540c..8a00b1196b 100644
--- a/src/modules/evas/engines/gl_sdl/evas_engine.c
+++ b/src/modules/evas/engines/gl_sdl/evas_engine.c
@@ -316,11 +316,13 @@ eng_output_free(void *engine, void *data)
316} 316}
317 317
318static void 318static void
319eng_output_dump(void *engine EINA_UNUSED, void *data) 319eng_output_dump(void *engine, void *data)
320{ 320{
321 Render_Engine *re; 321 Render_Engine *re;
322 Render_Engine_GL_Generic *e = engine;
322 323
323 re = (Render_Engine *)data; 324 re = (Render_Engine *)data;
325 generic_cache_dump(e->software.surface_cache);
324 evas_common_image_image_all_unload(); 326 evas_common_image_image_all_unload();
325 evas_common_font_font_all_unload(); 327 evas_common_font_font_all_unload();
326 glsym_evas_gl_common_image_all_unload(re->generic.software.ob->gl_context); 328 glsym_evas_gl_common_image_all_unload(re->generic.software.ob->gl_context);
@@ -339,7 +341,6 @@ gl_symbols(void)
339 341
340#define LINK2GENERIC(sym) \ 342#define LINK2GENERIC(sym) \
341 glsym_##sym = dlsym(RTLD_DEFAULT, #sym); 343 glsym_##sym = dlsym(RTLD_DEFAULT, #sym);
342
343 LINK2GENERIC(evas_gl_symbols); 344 LINK2GENERIC(evas_gl_symbols);
344 LINK2GENERIC(evas_gl_common_context_new); 345 LINK2GENERIC(evas_gl_common_context_new);
345 LINK2GENERIC(evas_gl_common_context_free); 346 LINK2GENERIC(evas_gl_common_context_free);
diff --git a/src/modules/evas/engines/gl_x11/evas_engine.c b/src/modules/evas/engines/gl_x11/evas_engine.c
index 583e036ba2..eb55c7720a 100644
--- a/src/modules/evas/engines/gl_x11/evas_engine.c
+++ b/src/modules/evas/engines/gl_x11/evas_engine.c
@@ -1846,11 +1846,13 @@ eng_canvas_alpha_get(void *engine)
1846} 1846}
1847 1847
1848static void 1848static void
1849eng_output_dump(void *engine EINA_UNUSED, void *data) 1849eng_output_dump(void *engine, void *data)
1850{ 1850{
1851 Render_Engine *re = data; 1851 Render_Engine *re = data;
1852 Render_Engine_GL_Generic *e = engine;
1852 1853
1853 eng_window_use(eng_get_ob(re)); 1854 eng_window_use(eng_get_ob(re));
1855 generic_cache_dump(e->software.surface_cache);
1854 evas_common_image_image_all_unload(); 1856 evas_common_image_image_all_unload();
1855 evas_common_font_font_all_unload(); 1857 evas_common_font_font_all_unload();
1856 glsym_evas_gl_common_image_all_unload(eng_get_ob(re)->gl_context); 1858 glsym_evas_gl_common_image_all_unload(eng_get_ob(re)->gl_context);
diff --git a/src/modules/evas/engines/software_generic/Evas_Engine_Software_Generic.h b/src/modules/evas/engines/software_generic/Evas_Engine_Software_Generic.h
index 48ab0614d3..52918cce34 100644
--- a/src/modules/evas/engines/software_generic/Evas_Engine_Software_Generic.h
+++ b/src/modules/evas/engines/software_generic/Evas_Engine_Software_Generic.h
@@ -83,7 +83,7 @@ struct _Render_Output_Software_Generic
83struct _Render_Engine_Software_Generic 83struct _Render_Engine_Software_Generic
84{ 84{
85 Eina_List *outputs; 85 Eina_List *outputs;
86 86 Generic_Cache *surface_cache;
87 struct { 87 struct {
88 int w, h; 88 int w, h;
89 Eina_Bool strict; 89 Eina_Bool strict;
diff --git a/src/modules/evas/engines/software_generic/evas_engine.c b/src/modules/evas/engines/software_generic/evas_engine.c
index 356c979328..8dfafc2d7d 100644
--- a/src/modules/evas/engines/software_generic/evas_engine.c
+++ b/src/modules/evas/engines/software_generic/evas_engine.c
@@ -93,7 +93,7 @@ struct _Render_Engine_GL_Surface
93 int depth_bits; 93 int depth_bits;
94 int stencil_bits; 94 int stencil_bits;
95 95
96 // Data 96 // Data
97 void *buffer; 97 void *buffer;
98 98
99 Render_Engine_GL_Context *current_ctx; 99 Render_Engine_GL_Context *current_ctx;
@@ -2896,8 +2896,8 @@ eng_image_map_surface_new(void *data EINA_UNUSED, int w, int h, int alpha)
2896 return surface; 2896 return surface;
2897 } 2897 }
2898#endif 2898#endif
2899 surface = evas_cache_image_copied_data(evas_common_image_cache_get(), 2899 surface = evas_cache_image_copied_data(evas_common_image_cache_get(),
2900 w, h, NULL, alpha, 2900 w, h, NULL, alpha,
2901 EVAS_COLORSPACE_ARGB8888); 2901 EVAS_COLORSPACE_ARGB8888);
2902 if (!surface) return NULL; 2902 if (!surface) return NULL;
2903 evas_cache_image_pixels(surface); 2903 evas_cache_image_pixels(surface);
@@ -3436,7 +3436,7 @@ static int
3436eng_image_load_error_get(void *data EINA_UNUSED, void *image) 3436eng_image_load_error_get(void *data EINA_UNUSED, void *image)
3437{ 3437{
3438 RGBA_Image *im; 3438 RGBA_Image *im;
3439 3439
3440 if (!image) return EVAS_LOAD_ERROR_NONE; 3440 if (!image) return EVAS_LOAD_ERROR_NONE;
3441 im = image; 3441 im = image;
3442 return im->cache_entry.load_error; 3442 return im->cache_entry.load_error;
@@ -3520,7 +3520,7 @@ eng_gl_surface_create(void *data EINA_UNUSED, void *config, int w, int h)
3520 sfc->depth_bits = 0; 3520 sfc->depth_bits = 0;
3521 break; 3521 break;
3522 } 3522 }
3523 3523
3524 // Stencil Bits 3524 // Stencil Bits
3525 switch (cfg->stencil_bits) 3525 switch (cfg->stencil_bits)
3526 { 3526 {
@@ -3722,7 +3722,7 @@ eng_gl_make_current(void *data EINA_UNUSED, void *surface, void *context)
3722 3722
3723 3723
3724 // Call MakeCurrent 3724 // Call MakeCurrent
3725 ret = _sym_OSMesaMakeCurrent(ctx->context, sfc->buffer, GL_UNSIGNED_BYTE, 3725 ret = _sym_OSMesaMakeCurrent(ctx->context, sfc->buffer, GL_UNSIGNED_BYTE,
3726 sfc->w, sfc->h); 3726 sfc->w, sfc->h);
3727 3727
3728 if (ret == GL_FALSE) 3728 if (ret == GL_FALSE)
@@ -3783,7 +3783,7 @@ eng_gl_native_surface_get(void *data EINA_UNUSED, void *surface, void *native_su
3783 ns->type = EVAS_NATIVE_SURFACE_EVASGL; 3783 ns->type = EVAS_NATIVE_SURFACE_EVASGL;
3784 ns->version = EVAS_NATIVE_SURFACE_VERSION; 3784 ns->version = EVAS_NATIVE_SURFACE_VERSION;
3785 ns->data.evasgl.surface = sfc->buffer; 3785 ns->data.evasgl.surface = sfc->buffer;
3786 3786
3787 return 1; 3787 return 1;
3788#else 3788#else
3789 (void) surface; 3789 (void) surface;
@@ -3859,6 +3859,8 @@ eng_engine_new(void)
3859 engine = calloc(1, sizeof (Render_Engine_Software_Generic)); 3859 engine = calloc(1, sizeof (Render_Engine_Software_Generic));
3860 if (!engine) return NULL; 3860 if (!engine) return NULL;
3861 3861
3862 engine->surface_cache = generic_cache_new(engine, eng_image_free);
3863
3862 return engine; 3864 return engine;
3863} 3865}
3864 3866
@@ -3868,6 +3870,8 @@ eng_engine_free(void *engine)
3868 Render_Engine_Software_Generic *e = engine; 3870 Render_Engine_Software_Generic *e = engine;
3869 Render_Output_Software_Generic *output; 3871 Render_Output_Software_Generic *output;
3870 3872
3873 generic_cache_destroy(e->surface_cache);
3874
3871 EINA_LIST_FREE(e->outputs, output) 3875 EINA_LIST_FREE(e->outputs, output)
3872 ERR("Output %p not properly cleaned before engine destruction.", output); 3876 ERR("Output %p not properly cleaned before engine destruction.", output);
3873 3877
@@ -5368,7 +5372,7 @@ gl_sym_init(void)
5368// Wrapped GL APIs to handle desktop compatibility 5372// Wrapped GL APIs to handle desktop compatibility
5369 5373
5370// Stripping precision code from GLES shader for desktop compatibility 5374// Stripping precision code from GLES shader for desktop compatibility
5371// Code adopted from Meego GL code. Temporary Fix. 5375// Code adopted from Meego GL code. Temporary Fix.
5372static const char * 5376static const char *
5373opengl_strtok(const char *s, int *n, char **saveptr, char *prevbuf) 5377opengl_strtok(const char *s, int *n, char **saveptr, char *prevbuf)
5374{ 5378{
@@ -5380,33 +5384,33 @@ opengl_strtok(const char *s, int *n, char **saveptr, char *prevbuf)
5380 5384
5381 if (prevbuf) free(prevbuf); 5385 if (prevbuf) free(prevbuf);
5382 5386
5383 if (s) 5387 if (s)
5384 *saveptr = (char *)s; 5388 *saveptr = (char *)s;
5385 else 5389 else
5386 { 5390 {
5387 if (!(*saveptr) || !(*n)) 5391 if (!(*saveptr) || !(*n))
5388 return NULL; 5392 return NULL;
5389 s = *saveptr; 5393 s = *saveptr;
5390 } 5394 }
5391 5395
5392 for (; *n && strchr(delim, *s); s++, (*n)--) 5396 for (; *n && strchr(delim, *s); s++, (*n)--)
5393 { 5397 {
5394 if (*s == '/' && *n > 1) 5398 if (*s == '/' && *n > 1)
5395 { 5399 {
5396 if (s[1] == '/') 5400 if (s[1] == '/')
5397 { 5401 {
5398 do 5402 do
5399 { 5403 {
5400 s++, (*n)--; 5404 s++, (*n)--;
5401 } 5405 }
5402 while (*n > 1 && s[1] != '\n' && s[1] != '\r'); 5406 while (*n > 1 && s[1] != '\n' && s[1] != '\r');
5403 } 5407 }
5404 else if (s[1] == '*') 5408 else if (s[1] == '*')
5405 { 5409 {
5406 do 5410 do
5407 { 5411 {
5408 s++, (*n)--; 5412 s++, (*n)--;
5409 } 5413 }
5410 while (*n > 2 && (s[1] != '*' || s[2] != '/')); 5414 while (*n > 2 && (s[1] != '*' || s[2] != '/'));
5411 s++, (*n)--; 5415 s++, (*n)--;
5412 } 5416 }
@@ -5423,26 +5427,26 @@ opengl_strtok(const char *s, int *n, char **saveptr, char *prevbuf)
5423 ret = malloc(retlen + 1); 5427 ret = malloc(retlen + 1);
5424 p = ret; 5428 p = ret;
5425 5429
5426 while (retlen > 0) 5430 while (retlen > 0)
5427 { 5431 {
5428 if (*start == '/' && retlen > 1) 5432 if (*start == '/' && retlen > 1)
5429 { 5433 {
5430 if (start[1] == '/') 5434 if (start[1] == '/')
5431 { 5435 {
5432 do 5436 do
5433 { 5437 {
5434 start++, retlen--; 5438 start++, retlen--;
5435 } 5439 }
5436 while (retlen > 1 && start[1] != '\n' && start[1] != '\r'); 5440 while (retlen > 1 && start[1] != '\n' && start[1] != '\r');
5437 start++, retlen--; 5441 start++, retlen--;
5438 continue; 5442 continue;
5439 } 5443 }
5440 else if (start[1] == '*') 5444 else if (start[1] == '*')
5441 { 5445 {
5442 do 5446 do
5443 { 5447 {
5444 start++, retlen--; 5448 start++, retlen--;
5445 } 5449 }
5446 while (retlen > 2 && (start[1] != '*' || start[2] != '/')); 5450 while (retlen > 2 && (start[1] != '*' || start[2] != '/'));
5447 start += 3, retlen -= 3; 5451 start += 3, retlen -= 3;
5448 continue; 5452 continue;
@@ -5453,7 +5457,7 @@ opengl_strtok(const char *s, int *n, char **saveptr, char *prevbuf)
5453 5457
5454 *p = 0; 5458 *p = 0;
5455 return ret; 5459 return ret;
5456} 5460}
5457 5461
5458static char * 5462static char *
5459patch_gles_shader(const char *source, int length, int *patched_len) 5463patch_gles_shader(const char *source, int length, int *patched_len)
@@ -5471,36 +5475,36 @@ patch_gles_shader(const char *source, int length, int *patched_len)
5471 if (!patched) return NULL; 5475 if (!patched) return NULL;
5472 5476
5473 p = (char *)opengl_strtok(source, &length, &saveptr, NULL); 5477 p = (char *)opengl_strtok(source, &length, &saveptr, NULL);
5474 for (; p; p = (char *)opengl_strtok(0, &length, &saveptr, p)) 5478 for (; p; p = (char *)opengl_strtok(0, &length, &saveptr, p))
5475 { 5479 {
5476 if (!strncmp(p, "lowp", 4) || !strncmp(p, "mediump", 7) || !strncmp(p, "highp", 5)) 5480 if (!strncmp(p, "lowp", 4) || !strncmp(p, "mediump", 7) || !strncmp(p, "highp", 5))
5477 { 5481 {
5478 continue; 5482 continue;
5479 } 5483 }
5480 else if (!strncmp(p, "precision", 9)) 5484 else if (!strncmp(p, "precision", 9))
5481 { 5485 {
5482 while ((p = (char *)opengl_strtok(0, &length, &saveptr, p)) && !strchr(p, ';')); 5486 while ((p = (char *)opengl_strtok(0, &length, &saveptr, p)) && !strchr(p, ';'));
5483 } 5487 }
5484 else 5488 else
5485 { 5489 {
5486 if (!strncmp(p, "gl_MaxVertexUniformVectors", 26)) 5490 if (!strncmp(p, "gl_MaxVertexUniformVectors", 26))
5487 { 5491 {
5488 free(p); 5492 free(p);
5489 p = strdup("(gl_MaxVertexUniformComponents / 4)"); 5493 p = strdup("(gl_MaxVertexUniformComponents / 4)");
5490 } 5494 }
5491 else if (!strncmp(p, "gl_MaxFragmentUniformVectors", 28)) 5495 else if (!strncmp(p, "gl_MaxFragmentUniformVectors", 28))
5492 { 5496 {
5493 free(p); 5497 free(p);
5494 p = strdup("(gl_MaxFragmentUniformComponents / 4)"); 5498 p = strdup("(gl_MaxFragmentUniformComponents / 4)");
5495 } 5499 }
5496 else if (!strncmp(p, "gl_MaxVaryingVectors", 20)) 5500 else if (!strncmp(p, "gl_MaxVaryingVectors", 20))
5497 { 5501 {
5498 free(p); 5502 free(p);
5499 p = strdup("(gl_MaxVaryingFloats / 4)"); 5503 p = strdup("(gl_MaxVaryingFloats / 4)");
5500 } 5504 }
5501 5505
5502 int new_len = strlen(p); 5506 int new_len = strlen(p);
5503 if (*patched_len + new_len > patched_size) 5507 if (*patched_len + new_len > patched_size)
5504 { 5508 {
5505 char *tmp; 5509 char *tmp;
5506 5510
@@ -5517,18 +5521,18 @@ patch_gles_shader(const char *source, int length, int *patched_len)
5517 5521
5518 memcpy(patched + *patched_len, p, new_len); 5522 memcpy(patched + *patched_len, p, new_len);
5519 *patched_len += new_len; 5523 *patched_len += new_len;
5520 } 5524 }
5521 } 5525 }
5522 5526
5523 patched[*patched_len] = 0; 5527 patched[*patched_len] = 0;
5524 /* check that we don't leave dummy preprocessor lines */ 5528 /* check that we don't leave dummy preprocessor lines */
5525 for (sp = patched; *sp;) 5529 for (sp = patched; *sp;)
5526 { 5530 {
5527 for (; *sp == ' ' || *sp == '\t'; sp++); 5531 for (; *sp == ' ' || *sp == '\t'; sp++);
5528 if (!strncmp(sp, "#define", 7)) 5532 if (!strncmp(sp, "#define", 7))
5529 { 5533 {
5530 for (p = sp + 7; *p == ' ' || *p == '\t'; p++); 5534 for (p = sp + 7; *p == ' ' || *p == '\t'; p++);
5531 if (*p == '\n' || *p == '\r' || *p == '/') 5535 if (*p == '\n' || *p == '\r' || *p == '/')
5532 { 5536 {
5533 memset(sp, 0x20, 7); 5537 memset(sp, 0x20, 7);
5534 } 5538 }
@@ -5550,21 +5554,21 @@ evgl_glShaderSource(GLuint shader, GLsizei count, const char* const* string, con
5550 memset(s, 0, count * sizeof(char*)); 5554 memset(s, 0, count * sizeof(char*));
5551 memset(l, 0, count * sizeof(GLint)); 5555 memset(l, 0, count * sizeof(GLint));
5552 5556
5553 for (i = 0; i < count; ++i) 5557 for (i = 0; i < count; ++i)
5554 { 5558 {
5555 if (length) 5559 if (length)
5556 { 5560 {
5557 len = length[i]; 5561 len = length[i];
5558 if (len < 0) 5562 if (len < 0)
5559 len = string[i] ? strlen(string[i]) : 0; 5563 len = string[i] ? strlen(string[i]) : 0;
5560 } 5564 }
5561 else 5565 else
5562 len = string[i] ? strlen(string[i]) : 0; 5566 len = string[i] ? strlen(string[i]) : 0;
5563 5567
5564 if (string[i]) 5568 if (string[i])
5565 { 5569 {
5566 s[i] = patch_gles_shader(string[i], len, &l[i]); 5570 s[i] = patch_gles_shader(string[i], len, &l[i]);
5567 if (!s[i]) 5571 if (!s[i])
5568 { 5572 {
5569 while(i) 5573 while(i)
5570 free(s[--i]); 5574 free(s[--i]);
@@ -5574,8 +5578,8 @@ evgl_glShaderSource(GLuint shader, GLsizei count, const char* const* string, con
5574 DBG("Patching Shader Failed."); 5578 DBG("Patching Shader Failed.");
5575 return; 5579 return;
5576 } 5580 }
5577 } 5581 }
5578 else 5582 else
5579 { 5583 {
5580 s[i] = NULL; 5584 s[i] = NULL;
5581 l[i] = 0; 5585 l[i] = 0;
@@ -5694,7 +5698,7 @@ override_gl_apis(Evas_GL_API *api)
5694 ORD(glCheckFramebufferStatus); 5698 ORD(glCheckFramebufferStatus);
5695 ORD(glClear); 5699 ORD(glClear);
5696 ORD(glClearColor); 5700 ORD(glClearColor);
5697 ORD(glClearDepthf); 5701 ORD(glClearDepthf);
5698 ORD(glClearStencil); 5702 ORD(glClearStencil);
5699 ORD(glColorMask); 5703 ORD(glColorMask);
5700 ORD(glCompileShader); 5704 ORD(glCompileShader);
@@ -5713,7 +5717,7 @@ override_gl_apis(Evas_GL_API *api)
5713 ORD(glDeleteTextures); 5717 ORD(glDeleteTextures);
5714 ORD(glDepthFunc); 5718 ORD(glDepthFunc);
5715 ORD(glDepthMask); 5719 ORD(glDepthMask);
5716 ORD(glDepthRangef); 5720 ORD(glDepthRangef);
5717 ORD(glDetachShader); 5721 ORD(glDetachShader);
5718 ORD(glDisable); 5722 ORD(glDisable);
5719 ORD(glDisableVertexAttribArray); 5723 ORD(glDisableVertexAttribArray);
@@ -5746,7 +5750,7 @@ override_gl_apis(Evas_GL_API *api)
5746 ORD(glGetRenderbufferParameteriv); 5750 ORD(glGetRenderbufferParameteriv);
5747 ORD(glGetShaderiv); 5751 ORD(glGetShaderiv);
5748 ORD(glGetShaderInfoLog); 5752 ORD(glGetShaderInfoLog);
5749 ORD(glGetShaderPrecisionFormat); 5753 ORD(glGetShaderPrecisionFormat);
5750 ORD(glGetShaderSource); 5754 ORD(glGetShaderSource);
5751 ORD(glGetTexParameterfv); 5755 ORD(glGetTexParameterfv);
5752 ORD(glGetTexParameteriv); 5756 ORD(glGetTexParameteriv);
@@ -5769,11 +5773,11 @@ override_gl_apis(Evas_GL_API *api)
5769 ORD(glPixelStorei); 5773 ORD(glPixelStorei);
5770 ORD(glPolygonOffset); 5774 ORD(glPolygonOffset);
5771 ORD(glReadPixels); 5775 ORD(glReadPixels);
5772 ORD(glReleaseShaderCompiler); 5776 ORD(glReleaseShaderCompiler);
5773 ORD(glRenderbufferStorage); 5777 ORD(glRenderbufferStorage);
5774 ORD(glSampleCoverage); 5778 ORD(glSampleCoverage);
5775 ORD(glScissor); 5779 ORD(glScissor);
5776 ORD(glShaderBinary); 5780 ORD(glShaderBinary);
5777 ORD(glShaderSource); 5781 ORD(glShaderSource);
5778 ORD(glStencilFunc); 5782 ORD(glStencilFunc);
5779 ORD(glStencilFuncSeparate); 5783 ORD(glStencilFuncSeparate);
@@ -5846,7 +5850,7 @@ gl_lib_init(void)
5846 // Current ctx & sfc stuff 5850 // Current ctx & sfc stuff
5847 if (!_tls_check()) return 0; 5851 if (!_tls_check()) return 0;
5848 5852
5849 // dlopen OSMesa 5853 // dlopen OSMesa
5850 gl_lib_handle = dlopen("libOSMesa.so.9", RTLD_NOW); 5854 gl_lib_handle = dlopen("libOSMesa.so.9", RTLD_NOW);
5851 if (!gl_lib_handle) gl_lib_handle = dlopen("libOSMesa.so.8", RTLD_NOW); 5855 if (!gl_lib_handle) gl_lib_handle = dlopen("libOSMesa.so.8", RTLD_NOW);
5852 if (!gl_lib_handle) gl_lib_handle = dlopen("libOSMesa.so.7", RTLD_NOW); 5856 if (!gl_lib_handle) gl_lib_handle = dlopen("libOSMesa.so.7", RTLD_NOW);
diff --git a/src/modules/evas/engines/wayland_egl/evas_engine.c b/src/modules/evas/engines/wayland_egl/evas_engine.c
index 4db2ad59db..560f54c136 100644
--- a/src/modules/evas/engines/wayland_egl/evas_engine.c
+++ b/src/modules/evas/engines/wayland_egl/evas_engine.c
@@ -748,9 +748,10 @@ eng_output_dump(void *engine EINA_UNUSED, void *data)
748{ 748{
749 Outbuf *ob; 749 Outbuf *ob;
750 Render_Engine *re; 750 Render_Engine *re;
751 Render_Engine_GL_Generic *e = engine;
751 752
752 if (!(re = (Render_Engine *)data)) return; 753 if (!(re = (Render_Engine *)data)) return;
753 754 generic_cache_dump(e->software.surface_cache);
754 evas_common_image_image_all_unload(); 755 evas_common_image_image_all_unload();
755 evas_common_font_font_all_unload(); 756 evas_common_font_font_all_unload();
756 ob = eng_get_ob(re); 757 ob = eng_get_ob(re);