forked from enlightenment/efl
evas/cserve2: Add cache hit count on image data
This commit is contained in:
parent
0d506a7b73
commit
fc73405c40
|
@ -982,7 +982,10 @@ evas_cache2_image_load_data(Image_Entry *ie)
|
||||||
int error = EVAS_LOAD_ERROR_NONE;
|
int error = EVAS_LOAD_ERROR_NONE;
|
||||||
|
|
||||||
if ((ie->flags.loaded) && (!ie->animated.animated))
|
if ((ie->flags.loaded) && (!ie->animated.animated))
|
||||||
return error;
|
{
|
||||||
|
evas_cserve2_image_hit(ie);
|
||||||
|
return EVAS_LOAD_ERROR_NONE;
|
||||||
|
}
|
||||||
|
|
||||||
ie->flags.in_progress = EINA_TRUE;
|
ie->flags.in_progress = EINA_TRUE;
|
||||||
|
|
||||||
|
|
|
@ -20,4 +20,13 @@ evas_cserve2_image_data_get(Image_Entry *ie)
|
||||||
return dentry->shm.data;
|
return dentry->shm.data;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
unsigned int
|
||||||
|
evas_cserve2_image_hit(Image_Entry *ie)
|
||||||
|
{
|
||||||
|
Data_Entry *dentry = ie->data2;
|
||||||
|
|
||||||
|
if (!dentry) return 0;
|
||||||
|
return ++dentry->hit_count;
|
||||||
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -14,6 +14,7 @@ typedef struct _Shared_Buffer Shared_Buffer;
|
||||||
struct _Data_Entry
|
struct _Data_Entry
|
||||||
{
|
{
|
||||||
unsigned int image_id;
|
unsigned int image_id;
|
||||||
|
unsigned int hit_count;
|
||||||
void (*preloaded_cb)(void *, Eina_Bool);
|
void (*preloaded_cb)(void *, Eina_Bool);
|
||||||
struct {
|
struct {
|
||||||
const char *path;
|
const char *path;
|
||||||
|
@ -81,6 +82,7 @@ Eina_Bool evas_cserve2_image_preload(Image_Entry *ie, void (*preloaded_cb)(void
|
||||||
void evas_cserve2_dispatch(void);
|
void evas_cserve2_dispatch(void);
|
||||||
|
|
||||||
void *evas_cserve2_image_data_get(Image_Entry *ie);
|
void *evas_cserve2_image_data_get(Image_Entry *ie);
|
||||||
|
unsigned int evas_cserve2_image_hit(Image_Entry *ie);
|
||||||
|
|
||||||
Font_Entry *evas_cserve2_font_load(const char *source, const char *name, int size, int dpi, Font_Rend_Flags wanted_rend);
|
Font_Entry *evas_cserve2_font_load(const char *source, const char *name, int size, int dpi, Font_Rend_Flags wanted_rend);
|
||||||
EAPI int evas_cserve2_font_load_wait(Font_Entry *fe);
|
EAPI int evas_cserve2_font_load_wait(Font_Entry *fe);
|
||||||
|
|
Loading…
Reference in New Issue