From 57fc7b387680e68c9d2a08a6103e8e3405da6822 Mon Sep 17 00:00:00 2001 From: Hermet Park Date: Thu, 3 Jun 2021 11:55:20 +0900 Subject: [PATCH] efl canvas: code refactoring keep it neat & clean code. Change-Id: I1f76c2c674db380d7a363c37cb7d0fd3590d4e07 --- src/lib/evas/canvas/efl_canvas_vg_object.c | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/src/lib/evas/canvas/efl_canvas_vg_object.c b/src/lib/evas/canvas/efl_canvas_vg_object.c index 1340ca8..4393499 100644 --- a/src/lib/evas/canvas/efl_canvas_vg_object.c +++ b/src/lib/evas/canvas/efl_canvas_vg_object.c @@ -425,8 +425,6 @@ _render_to_tvg_buffer(Evas_Object_Protected_Data *obj, Efl_Canvas_Vg_Object_Data if (nd) nd->render_pre(obj, root, nd, NULL, pd->tvg_canvas, NULL); } - tvg_canvas_update(pd->tvg_canvas); - if (tvg_canvas_draw(pd->tvg_canvas) == TVG_RESULT_SUCCESS) tvg_canvas_sync(pd->tvg_canvas); } @@ -470,7 +468,7 @@ _efl_canvas_vg_object_render(Evas_Object *eo_obj EINA_UNUSED, int x, int y, Eina_Bool do_async) { Efl_Canvas_Vg_Object_Data *pd = type_private_data; - Eina_Bool updated = EINA_FALSE; + Eina_Bool updated = pd->changed; ENFN->context_color_set(engine, context, 255, 255, 255, 255); ENFN->context_multiplier_set(engine, context, @@ -499,8 +497,6 @@ _efl_canvas_vg_object_render(Evas_Object *eo_obj EINA_UNUSED, updated = EINA_TRUE; } - if (pd->changed) updated = EINA_TRUE; - Vg_Cache_Entry *vg_entry = pd->vg_entry; if (vg_entry) { @@ -512,18 +508,16 @@ _efl_canvas_vg_object_render(Evas_Object *eo_obj EINA_UNUSED, vg_entry = evas_cache_vg_entry_resize(vg_entry, size.w, size.h); evas_cache_vg_entry_del(pd->vg_entry); pd->vg_entry = vg_entry; - pd->changed = EINA_TRUE; + updated = EINA_TRUE; } Efl_VG *root = evas_cache_vg_tree_get(pd->vg_entry, pd->frame_idx); if (!root) return; - if (updated) - _render_to_tvg_buffer(obj, pd, root); + if (updated) _render_to_tvg_buffer(obj, pd, root); } - if (pd->user_entry && updated) - _render_to_tvg_buffer(obj, pd, pd->user_entry->root); + if (pd->user_entry && updated) _render_to_tvg_buffer(obj, pd, pd->user_entry->root); _render_tvg_buffer_to_screen(obj, pd, engine, output, context, surface, obj->cur->geometry.x + x, -- 2.7.4