summaryrefslogtreecommitdiff
path: root/src/modules/evas/engines/software_generic/evas_engine.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules/evas/engines/software_generic/evas_engine.c')
-rw-r--r--src/modules/evas/engines/software_generic/evas_engine.c42
1 files changed, 37 insertions, 5 deletions
diff --git a/src/modules/evas/engines/software_generic/evas_engine.c b/src/modules/evas/engines/software_generic/evas_engine.c
index b548322..d2f0381 100644
--- a/src/modules/evas/engines/software_generic/evas_engine.c
+++ b/src/modules/evas/engines/software_generic/evas_engine.c
@@ -414,7 +414,6 @@ struct _Evas_Thread_Command_Ector_Surface
414 Ector_Surface *ector; 414 Ector_Surface *ector;
415 void *pixels; 415 void *pixels;
416 int x, y; 416 int x, y;
417 Eina_Bool clear;
418}; 417};
419 418
420// declare here as it is re-used 419// declare here as it is re-used
@@ -1206,6 +1205,33 @@ eng_image_native_get(void *data EINA_UNUSED, void *image)
1206} 1205}
1207 1206
1208static void * 1207static void *
1208eng_image_load(void *data EINA_UNUSED, const char *file, const char *key, int *error, Evas_Image_Load_Opts *lo)
1209{
1210 *error = EVAS_LOAD_ERROR_NONE;
1211#ifdef EVAS_CSERVE2
1212 if (evas_cserve2_use_get())
1213 {
1214 Image_Entry *ie;
1215 ie = evas_cache2_image_open(evas_common_image_cache2_get(),
1216 file, key, lo, error);
1217 if (ie)
1218 {
1219 *error = evas_cache2_image_open_wait(ie);
1220 if ((*error != EVAS_LOAD_ERROR_NONE) && ie->animated.animated)
1221 {
1222 evas_cache2_image_close(ie);
1223 goto use_local_cache;
1224 }
1225 }
1226 return ie;
1227 }
1228use_local_cache:
1229#endif
1230
1231 return evas_common_load_image_from_file(file, key, lo, error);
1232}
1233
1234static void *
1209eng_image_mmap(void *data EINA_UNUSED, Eina_File *f, const char *key, int *error, Evas_Image_Load_Opts *lo) 1235eng_image_mmap(void *data EINA_UNUSED, Eina_File *f, const char *key, int *error, Evas_Image_Load_Opts *lo)
1210{ 1236{
1211 *error = EVAS_LOAD_ERROR_NONE; 1237 *error = EVAS_LOAD_ERROR_NONE;
@@ -4275,8 +4301,10 @@ eng_ector_buffer_wrap(void *data, Evas *e EINA_UNUSED, void *engine_image)
4275{ 4301{
4276 Image_Entry *ie = engine_image; 4302 Image_Entry *ie = engine_image;
4277 Ector_Buffer *buf = NULL; 4303 Ector_Buffer *buf = NULL;
4304 RGBA_Image *im = (RGBA_Image *)ie;
4278 4305
4279 if (!ie) return NULL; 4306 if (!ie) return NULL;
4307 if (!im->image.data) return NULL;
4280 4308
4281 if (!efl_domain_current_push(EFL_ID_DOMAIN_SHARED)) 4309 if (!efl_domain_current_push(EFL_ID_DOMAIN_SHARED))
4282 return NULL; 4310 return NULL;
@@ -4453,7 +4481,7 @@ _draw_thread_ector_surface_set(void *data)
4453 x = ector_surface->x; 4481 x = ector_surface->x;
4454 y = ector_surface->y; 4482 y = ector_surface->y;
4455 // clear the surface before giving to ector 4483 // clear the surface before giving to ector
4456 if (ector_surface->clear) memset(pixels, 0, (w * h * 4)); 4484 memset(pixels, 0, (w * h * 4));
4457 } 4485 }
4458 } 4486 }
4459 4487
@@ -4636,6 +4664,7 @@ static Evas_Func func =
4636 eng_polygon_points_clear, 4664 eng_polygon_points_clear,
4637 eng_polygon_draw, 4665 eng_polygon_draw,
4638 /* image draw funcs */ 4666 /* image draw funcs */
4667 eng_image_load,
4639 eng_image_mmap, 4668 eng_image_mmap,
4640 eng_image_new_from_data, 4669 eng_image_new_from_data,
4641 eng_image_new_from_copied_data, 4670 eng_image_new_from_copied_data,
@@ -5486,7 +5515,9 @@ evgl_glShaderSource(GLuint shader, GLsizei count, const char* const* string, con
5486 int i = 0, len = 0; 5515 int i = 0, len = 0;
5487 5516
5488 char **s = malloc(count * sizeof(char*)); 5517 char **s = malloc(count * sizeof(char*));
5518 if (!s) goto err;
5489 GLint *l = malloc(count * sizeof(GLint)); 5519 GLint *l = malloc(count * sizeof(GLint));
5520 if (!l) goto err;
5490 5521
5491 memset(s, 0, count * sizeof(char*)); 5522 memset(s, 0, count * sizeof(char*));
5492 memset(l, 0, count * sizeof(GLint)); 5523 memset(l, 0, count * sizeof(GLint));
@@ -5511,9 +5542,7 @@ evgl_glShaderSource(GLuint shader, GLsizei count, const char* const* string, con
5511 free(s[--i]); 5542 free(s[--i]);
5512 free(l); 5543 free(l);
5513 free(s); 5544 free(s);
5514 5545 goto err;
5515 DBG("Patching Shader Failed.");
5516 return;
5517 } 5546 }
5518 } 5547 }
5519 else 5548 else
@@ -5529,6 +5558,9 @@ evgl_glShaderSource(GLuint shader, GLsizei count, const char* const* string, con
5529 free(s[--i]); 5558 free(s[--i]);
5530 free(l); 5559 free(l);
5531 free(s); 5560 free(s);
5561
5562err:
5563 ERR("Patching Shader Failed.");
5532} 5564}
5533 5565
5534 5566