summaryrefslogtreecommitdiff
path: root/src/lib/evas/common/evas_image_load.c
diff options
context:
space:
mode:
authorCedric Bail <cedric.bail@samsung.com>2013-06-04 11:17:21 +0900
committerCedric Bail <cedric.bail@samsung.com>2013-06-04 11:22:13 +0900
commitd1bed386bd0457118b58ddddf2f5f37eb065b461 (patch)
treef8922f1d7c57f90131477b003094945f8a2a7b71 /src/lib/evas/common/evas_image_load.c
parentad5d75dfcdda13a1136b8f850dab6235b42c5c0e (diff)
evas: correctly detect if loader support asynchronous preloading.
This is an astonishing bug, I wonder since how long it has been there. It is basically due to the use of void * and a wrong cast. Type checking is clearly useful, let's use it more !
Diffstat (limited to 'src/lib/evas/common/evas_image_load.c')
-rw-r--r--src/lib/evas/common/evas_image_load.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/lib/evas/common/evas_image_load.c b/src/lib/evas/common/evas_image_load.c
index 006a7248a6..7d0d6712f6 100644
--- a/src/lib/evas/common/evas_image_load.c
+++ b/src/lib/evas/common/evas_image_load.c
@@ -345,9 +345,9 @@ evas_common_load_rgba_image_module_from_file(Image_Entry *ie)
345 em->definition->name : "<UNKNOWN>", 345 em->definition->name : "<UNKNOWN>",
346 file); 346 file);
347 347
348 ie->info.module = (void*) em; 348 ie->info.module = em;
349 ie->info.loader = (void*) em ? em->functions : NULL; 349 ie->info.loader = (void*) em ? em->functions : NULL;
350 evas_module_ref((Evas_Module*) ie->info.module); 350 evas_module_ref(ie->info.module);
351 return ret; 351 return ret;
352} 352}
353 353
@@ -388,7 +388,7 @@ evas_common_load_rgba_image_data_from_file(Image_Entry *ie)
388// printf("load data [%p] %s %s\n", ie, ie->file, ie->key); 388// printf("load data [%p] %s %s\n", ie, ie->file, ie->key);
389 389
390 evas_image_load_func = ie->info.loader; 390 evas_image_load_func = ie->info.loader;
391 evas_module_use((Evas_Module*) ie->info.module); 391 evas_module_use(ie->info.module);
392 392
393 if (!ie->f) return EVAS_LOAD_ERROR_DOES_NOT_EXIST; 393 if (!ie->f) return EVAS_LOAD_ERROR_DOES_NOT_EXIST;
394 394
@@ -412,7 +412,7 @@ evas_common_load_rgba_image_data_from_file(Image_Entry *ie)
412 412
413 if (property.premul) 413 if (property.premul)
414 evas_common_image_premul(ie); 414 evas_common_image_premul(ie);
415// evas_module_unref((Evas_Module*) ie->info.module); 415// evas_module_unref(ie->info.module);
416// ie->info.module = NULL; 416// ie->info.module = NULL;
417 417
418 return ret; 418 return ret;
@@ -426,7 +426,7 @@ evas_common_load_rgba_image_frame_duration_from_file(Image_Entry *ie, const int
426 if (!ie->info.module) return -1; 426 if (!ie->info.module) return -1;
427 427
428 evas_image_load_func = ie->info.loader; 428 evas_image_load_func = ie->info.loader;
429 evas_module_use((Evas_Module*) ie->info.module); 429 evas_module_use(ie->info.module);
430 if (evas_image_load_func->frame_duration) 430 if (evas_image_load_func->frame_duration)
431 { 431 {
432 if (!ie->f) return -1; 432 if (!ie->f) return -1;