Merge branch 'master' into devs/hermet/lottie

This commit is contained in:
Hermet Park 2019-11-26 15:26:50 +09:00
commit afa15b2ad1
5 changed files with 44 additions and 35 deletions

View File

@ -1003,30 +1003,6 @@ _edje_recalc_table_parts(Edje *ed
#endif
}
// Defined in edje_textblock.c
Eina_Bool
_edje_part_textblock_style_text_set(Edje *ed,
Edje_Real_Part *ep,
Edje_Part_Description_Text *chosen_desc);
void
_edje_recalc_textblock_style_text_set(Edje *ed)
{
unsigned short i;
Edje_Real_Part *ep;
for (i = 0; i < ed->table_parts_size; i++)
{
ep = ed->table_parts[i];
if (ep->part->type == EDJE_PART_TYPE_TEXTBLOCK)
{
_edje_part_textblock_style_text_set
(ed, ep, (Edje_Part_Description_Text *)ep->chosen_description);
}
}
}
void
_edje_recalc_do(Edje *ed)
{
@ -1037,14 +1013,9 @@ _edje_recalc_do(Edje *ed)
#endif
//Do nothing if the edje has no size, Regardless of the edje part size calc,
//the text and style has to be set.
//Do nothing if the edje has no size,
if ((EINA_UNLIKELY(!ed->has_size)) && (!ed->calc_only) && (ed->w == 0) && (ed->h == 0))
{
_edje_recalc_textblock_style_text_set(ed);
return;
}
return;
ed->has_size = EINA_TRUE;
need_calc = evas_object_smart_need_recalculate_get(ed->obj);

View File

@ -4,6 +4,20 @@
#include "../evas/canvas/evas_line_eo.h"
#include "../evas/canvas/evas_text_eo.h"
//In implementations that gets properties for user-created edje,
//edje calculation should be performed regardless of the size of edje.
#define EDJE_RECALC_DO(ed) \
do { \
Eina_Bool calc_flag = EINA_FALSE; \
if (!ed->has_size) \
{ \
ed->has_size = EINA_TRUE; \
calc_flag = EINA_TRUE; \
} \
_edje_recalc_do(ed); \
if (calc_flag) ed->has_size = EINA_FALSE; \
} while (0)
typedef struct _Edje_Box_Layout Edje_Box_Layout;
struct _Edje_Box_Layout
{
@ -1945,7 +1959,7 @@ edje_object_part_object_get(const Eo *obj, const char *part)
if ((!ed) || (!part)) return NULL;
/* Need to recalc before providing the object. */
if (!ed->freeze) _edje_recalc_do(ed);
if (!ed->freeze) EDJE_RECALC_DO(ed);
rp = _edje_real_part_recursive_get(&ed, part);
if (!rp) return NULL;
@ -2187,7 +2201,7 @@ _edje_efl_text_text_get(const Eo *obj EINA_UNUSED, Edje *ed, const char *part,
#else
if (ed->dirty)
#endif
_edje_recalc_do(ed);
EDJE_RECALC_DO(ed);
entry = evas_object_textblock_text_markup_get(rp->object);
}
}
@ -2200,7 +2214,7 @@ _edje_efl_text_text_get(const Eo *obj EINA_UNUSED, Edje *ed, const char *part,
#else
if (ed->dirty)
#endif
_edje_recalc_do(ed);
EDJE_RECALC_DO(ed);
entry = efl_text_markup_get(rp->object);
}
else
@ -3580,7 +3594,7 @@ _efl_canvas_layout_efl_layout_group_group_size_max_get(const Eo *obj EINA_UNUSED
return EINA_SIZE2D(0, 0);
/* Need to recalc before providing the object. */
if (!ed->freeze) _edje_recalc_do(ed);
if (!ed->freeze) EDJE_RECALC_DO(ed);
sz = ed->collection->prop.max;

View File

@ -517,6 +517,28 @@ _efl_canvas_image_efl_gfx_frame_controller_frame_duration_get(const Eo *eo_obj,
return _evas_image_animated_frame_duration_get(eo_obj, start_frame, frame_num);
}
Eina_Bool _efl_canvas_image_efl_gfx_frame_controller_sector_set(Eo *obj EINA_UNUSED,
void *_pd EINA_UNUSED,
const char *name EINA_UNUSED,
int startframe EINA_UNUSED,
int endframe EINA_UNUSED)
{
// TODO: We need to implement the feature to section playback of image animation.
ERR("efl_gfx_frame_controller_sector_set not implemented for efl_canvas_image yet.");
return EINA_FALSE;
}
Eina_Bool _efl_canvas_image_efl_gfx_frame_controller_sector_get(const Eo *obj EINA_UNUSED,
void *_pd EINA_UNUSED,
const char *name EINA_UNUSED,
int *startframe EINA_UNUSED,
int *endframe EINA_UNUSED)
{
// TODO: We need to implement the feature to section playback of image animation.
ERR("efl_gfx_frame_controller_sector_get not implemented for efl_canvas_image yet.");
return EINA_FALSE;
}
Eina_Bool
_evas_image_animated_frame_set(Eo *eo_obj, int frame_index)
{

View File

@ -24,6 +24,7 @@ class @beta Efl.Canvas.Image extends Efl.Canvas.Image_Internal implements
Efl.Gfx.Frame_Controller.loop_type { get; }
Efl.Gfx.Frame_Controller.loop_count { get; }
Efl.Gfx.Frame_Controller.frame_duration { get; }
Efl.Gfx.Frame_Controller.sector { set; get; }
Efl.Gfx.Image_Load_Controller.load_async_start;
Efl.Gfx.Image_Load_Controller.load_async_cancel;
Efl.Gfx.Image_Load_Controller.load_dpi { get; set; }

View File

@ -365,6 +365,7 @@ _reset_vg_tree(Efl_VG *node)
Eina_Iterator *itr = efl_canvas_vg_container_children_get(node);
EINA_ITERATOR_FOREACH(itr, child)
_reset_vg_tree(child);
if (itr) eina_iterator_free(itr);
}
efl_gfx_entity_visible_set(node, EINA_FALSE);
}