forked from enlightenment/efl
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 !
This commit is contained in:
parent
ad5d75dfcd
commit
d1bed386bd
|
@ -1,3 +1,7 @@
|
||||||
|
2013-06-04 Cedric Bail
|
||||||
|
|
||||||
|
* Evas: correctly detect if loader support asynchronous preloading.
|
||||||
|
|
||||||
2013-06-03 Ederson Desouza
|
2013-06-03 Ederson Desouza
|
||||||
|
|
||||||
* Add -1.0 value to text ellipsis -- for not ellipsizing it at all.
|
* Add -1.0 value to text ellipsis -- for not ellipsizing it at all.
|
||||||
|
|
2
NEWS
2
NEWS
|
@ -317,4 +317,4 @@ Fixes:
|
||||||
* Fix evas gl engine to work in 16bpp nicely.
|
* Fix evas gl engine to work in 16bpp nicely.
|
||||||
* Fix native surface to be more anal about depth matching.
|
* Fix native surface to be more anal about depth matching.
|
||||||
* Fix eeze sensors to not segv on shutdown
|
* Fix eeze sensors to not segv on shutdown
|
||||||
|
* Evas: correctly detect if a loader support asynchronous preloading.
|
||||||
|
|
|
@ -344,7 +344,7 @@ _evas_cache_image_async_heavy(void *data)
|
||||||
cache = current->cache;
|
cache = current->cache;
|
||||||
|
|
||||||
if ((!current->flags.loaded) &&
|
if ((!current->flags.loaded) &&
|
||||||
((Evas_Image_Load_Func*) current->info.module)->threadable)
|
current->info.loader->threadable)
|
||||||
{
|
{
|
||||||
error = cache->func.load(current);
|
error = cache->func.load(current);
|
||||||
if (cache->func.debug) cache->func.debug("load", current);
|
if (cache->func.debug) cache->func.debug("load", current);
|
||||||
|
|
|
@ -345,9 +345,9 @@ evas_common_load_rgba_image_module_from_file(Image_Entry *ie)
|
||||||
em->definition->name : "<UNKNOWN>",
|
em->definition->name : "<UNKNOWN>",
|
||||||
file);
|
file);
|
||||||
|
|
||||||
ie->info.module = (void*) em;
|
ie->info.module = em;
|
||||||
ie->info.loader = (void*) em ? em->functions : NULL;
|
ie->info.loader = (void*) em ? em->functions : NULL;
|
||||||
evas_module_ref((Evas_Module*) ie->info.module);
|
evas_module_ref(ie->info.module);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -388,7 +388,7 @@ evas_common_load_rgba_image_data_from_file(Image_Entry *ie)
|
||||||
// printf("load data [%p] %s %s\n", ie, ie->file, ie->key);
|
// printf("load data [%p] %s %s\n", ie, ie->file, ie->key);
|
||||||
|
|
||||||
evas_image_load_func = ie->info.loader;
|
evas_image_load_func = ie->info.loader;
|
||||||
evas_module_use((Evas_Module*) ie->info.module);
|
evas_module_use(ie->info.module);
|
||||||
|
|
||||||
if (!ie->f) return EVAS_LOAD_ERROR_DOES_NOT_EXIST;
|
if (!ie->f) return EVAS_LOAD_ERROR_DOES_NOT_EXIST;
|
||||||
|
|
||||||
|
@ -412,7 +412,7 @@ evas_common_load_rgba_image_data_from_file(Image_Entry *ie)
|
||||||
|
|
||||||
if (property.premul)
|
if (property.premul)
|
||||||
evas_common_image_premul(ie);
|
evas_common_image_premul(ie);
|
||||||
// evas_module_unref((Evas_Module*) ie->info.module);
|
// evas_module_unref(ie->info.module);
|
||||||
// ie->info.module = NULL;
|
// ie->info.module = NULL;
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
|
@ -426,7 +426,7 @@ evas_common_load_rgba_image_frame_duration_from_file(Image_Entry *ie, const int
|
||||||
if (!ie->info.module) return -1;
|
if (!ie->info.module) return -1;
|
||||||
|
|
||||||
evas_image_load_func = ie->info.loader;
|
evas_image_load_func = ie->info.loader;
|
||||||
evas_module_use((Evas_Module*) ie->info.module);
|
evas_module_use(ie->info.module);
|
||||||
if (evas_image_load_func->frame_duration)
|
if (evas_image_load_func->frame_duration)
|
||||||
{
|
{
|
||||||
if (!ie->f) return -1;
|
if (!ie->f) return -1;
|
||||||
|
|
|
@ -4,9 +4,8 @@
|
||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#include <evas_common.h>
|
#include "evas_common.h"
|
||||||
#include <evas_private.h>
|
#include "evas_private.h"
|
||||||
#include <evas_module.h>
|
|
||||||
|
|
||||||
|
|
||||||
static Eina_Hash *evas_modules[4] = {
|
static Eina_Hash *evas_modules[4] = {
|
||||||
|
|
|
@ -347,6 +347,8 @@ extern EAPI int _evas_log_dom_global;
|
||||||
|
|
||||||
/*****************************************************************************/
|
/*****************************************************************************/
|
||||||
|
|
||||||
|
#include "../file/evas_module.h"
|
||||||
|
|
||||||
typedef unsigned long long DATA64;
|
typedef unsigned long long DATA64;
|
||||||
typedef unsigned int DATA32;
|
typedef unsigned int DATA32;
|
||||||
typedef unsigned short DATA16;
|
typedef unsigned short DATA16;
|
||||||
|
@ -593,8 +595,8 @@ struct _Image_Entry
|
||||||
|
|
||||||
struct
|
struct
|
||||||
{
|
{
|
||||||
void *module;
|
Evas_Module *module;
|
||||||
void *loader;
|
Evas_Image_Load_Func *loader;
|
||||||
} info;
|
} info;
|
||||||
|
|
||||||
LK(lock);
|
LK(lock);
|
||||||
|
|
Loading…
Reference in New Issue