forked from enlightenment/efl
evas: set mmap data to image data after preload with skip_head enabled
this is a bit ugly, but in the case where skip_head is used it's important to propagate the resulting Eina_File back up to the image object's data for use in other api functions Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de> Differential Revision: https://phab.enlightenment.org/D11422
This commit is contained in:
parent
92a03628c8
commit
576229bf6a
|
@ -386,6 +386,8 @@ _evas_cache_image_preloaded_notify(Image_Entry *ie)
|
||||||
ie->targets = (Evas_Cache_Target *)
|
ie->targets = (Evas_Cache_Target *)
|
||||||
eina_inlist_remove(EINA_INLIST_GET(ie->targets),
|
eina_inlist_remove(EINA_INLIST_GET(ie->targets),
|
||||||
EINA_INLIST_GET(ie->targets));
|
EINA_INLIST_GET(ie->targets));
|
||||||
|
if (ie->load_opts.skip_head && !tmp->delete_me && !tmp->preload_cancel)
|
||||||
|
_evas_image_preload_update((void*)tmp->target, ie->f);
|
||||||
if (!tmp->delete_me && tmp->preloaded_cb)
|
if (!tmp->delete_me && tmp->preloaded_cb)
|
||||||
tmp->preloaded_cb(tmp->preloaded_data);
|
tmp->preloaded_cb(tmp->preloaded_data);
|
||||||
if (!tmp->preload_cancel)
|
if (!tmp->preload_cancel)
|
||||||
|
|
|
@ -19,6 +19,19 @@ _evas_image_file_unload(Eo *eo_obj)
|
||||||
_evas_image_done_set(eo_obj, obj, o);
|
_evas_image_done_set(eo_obj, obj, o);
|
||||||
o->load_error = EFL_GFX_IMAGE_LOAD_ERROR_NONE;
|
o->load_error = EFL_GFX_IMAGE_LOAD_ERROR_NONE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
_evas_image_preload_update(Eo *eo_obj, Eina_File *f)
|
||||||
|
{
|
||||||
|
Evas_Image_Data *o = efl_data_scope_get(eo_obj, EFL_CANVAS_IMAGE_INTERNAL_CLASS);
|
||||||
|
if (o->cur->f) return;
|
||||||
|
EINA_COW_IMAGE_STATE_WRITE_BEGIN(o, cur)
|
||||||
|
{
|
||||||
|
cur->f = eina_file_dup(f);
|
||||||
|
}
|
||||||
|
EINA_COW_IMAGE_STATE_WRITE_END(o, cur)
|
||||||
|
}
|
||||||
|
|
||||||
Eina_Bool
|
Eina_Bool
|
||||||
_evas_image_file_load(Eo *eo_obj, Evas_Image_Data *o)
|
_evas_image_file_load(Eo *eo_obj, Evas_Image_Data *o)
|
||||||
{
|
{
|
||||||
|
|
|
@ -1891,7 +1891,7 @@ EAPI const char *_evas_module_libdir_get(void);
|
||||||
const char *_evas_module_datadir_get(void);
|
const char *_evas_module_datadir_get(void);
|
||||||
EAPI Eina_List *_evas_canvas_image_data_unset(Evas *eo_e);
|
EAPI Eina_List *_evas_canvas_image_data_unset(Evas *eo_e);
|
||||||
EAPI void _evas_canvas_image_data_regenerate(Eina_List *list);
|
EAPI void _evas_canvas_image_data_regenerate(Eina_List *list);
|
||||||
|
void _evas_image_preload_update(Eo *eo_obj, Eina_File *f);
|
||||||
Eina_Bool evas_render_mapped(Evas_Public_Data *e, Evas_Object *obj,
|
Eina_Bool evas_render_mapped(Evas_Public_Data *e, Evas_Object *obj,
|
||||||
Evas_Object_Protected_Data *source_pd,
|
Evas_Object_Protected_Data *source_pd,
|
||||||
void *context, void *output, void *surface,
|
void *context, void *output, void *surface,
|
||||||
|
|
Loading…
Reference in New Issue