forked from enlightenment/efl
efl_canvas_image : remove the animated image limitation
Summary: remove FRAME_MAX limitation to play the huge animated image which has more than 1024 frames Test Plan: load gif image which has more than 1024 frames Reviewers: Hermet, kimcinoo Reviewed By: Hermet Subscribers: raster, cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D12303
This commit is contained in:
parent
21f91960f7
commit
3b1eede582
|
@ -599,8 +599,7 @@ _evas_image_animated_frame_set(Eo *eo_obj, int frame_index)
|
||||||
evas_object_async_block(obj);
|
evas_object_async_block(obj);
|
||||||
frame_count = evas_object_image_animated_frame_count_get(eo_obj);
|
frame_count = evas_object_image_animated_frame_count_get(eo_obj);
|
||||||
|
|
||||||
/* limit the size of frame to FRAME_MAX */
|
if ((frame_count < 0) || (frame_index > frame_count))
|
||||||
if ((frame_count > FRAME_MAX) || (frame_count < 0) || (frame_index > frame_count))
|
|
||||||
return EINA_FALSE;
|
return EINA_FALSE;
|
||||||
|
|
||||||
if (!ENFN->image_animated_frame_set) return EINA_FALSE;
|
if (!ENFN->image_animated_frame_set) return EINA_FALSE;
|
||||||
|
|
|
@ -254,6 +254,4 @@ void _evas_image_load(Evas_Object *eo_obj, Evas_Object_Protected_Data *obj, Evas
|
||||||
EINA_COW_IMAGE_STATE_WRITE_END(Obj, cur_write); \
|
EINA_COW_IMAGE_STATE_WRITE_END(Obj, cur_write); \
|
||||||
}
|
}
|
||||||
|
|
||||||
#define FRAME_MAX 1024
|
|
||||||
|
|
||||||
#endif // EVAS_IMAGE_PRIVATE_H
|
#endif // EVAS_IMAGE_PRIVATE_H
|
||||||
|
|
Loading…
Reference in New Issue