summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorHermet Park <hermetpark@gmail.com>2019-04-08 13:15:45 +0900
committerHermet Park <hermetpark@gmail.com>2019-04-08 13:15:45 +0900
commit6b4953b468d463119b175bc2331adeb1adf9bd55 (patch)
tree86c44172e7ba55836c2363613bbb8bca2cea6f51 /src/lib
parent2178258105d73c81f02ccb136da867b7ced565bd (diff)
canvas vg: code refactoring.
Summary: Remove unnecessary argument of an internal function. Reviewers: #committers, jsuya, cedric Reviewed By: #committers, cedric Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D8530
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/evas/canvas/efl_canvas_vg_object.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/lib/evas/canvas/efl_canvas_vg_object.c b/src/lib/evas/canvas/efl_canvas_vg_object.c
index 5beb303..de21469 100644
--- a/src/lib/evas/canvas/efl_canvas_vg_object.c
+++ b/src/lib/evas/canvas/efl_canvas_vg_object.c
@@ -414,8 +414,8 @@ _evas_vg_render(Evas_Object_Protected_Data *obj, Efl_Canvas_Vg_Object_Data *pd,
414//renders a vg_tree to an offscreen buffer and push it to the cache. 414//renders a vg_tree to an offscreen buffer and push it to the cache.
415static void * 415static void *
416_render_to_buffer(Evas_Object_Protected_Data *obj, Efl_Canvas_Vg_Object_Data *pd, 416_render_to_buffer(Evas_Object_Protected_Data *obj, Efl_Canvas_Vg_Object_Data *pd,
417 void *engine, Efl_VG *root, int w, int h, void *key, 417 void *engine, Efl_VG *root, int w, int h, void *buffer,
418 void *buffer, Eina_Bool do_async) 418 Eina_Bool do_async)
419{ 419{
420 Ector_Surface *ector; 420 Ector_Surface *ector;
421 RGBA_Draw_Context *context; 421 RGBA_Draw_Context *context;
@@ -458,7 +458,10 @@ _render_to_buffer(Evas_Object_Protected_Data *obj, Efl_Canvas_Vg_Object_Data *pd
458 evas_common_draw_context_free(context); 458 evas_common_draw_context_free(context);
459 459
460 if (buffer_created) 460 if (buffer_created)
461 ENFN->ector_surface_cache_set(engine, key, buffer); 461 {
462 //Use root as a cache key.
463 ENFN->ector_surface_cache_set(engine, root, buffer);
464 }
462 465
463 return buffer; 466 return buffer;
464} 467}
@@ -510,8 +513,7 @@ _cache_vg_entry_render(Evas_Object_Protected_Data *obj,
510 void *buffer = ENFN->ector_surface_cache_get(engine, root); 513 void *buffer = ENFN->ector_surface_cache_get(engine, root);
511 514
512 if (!buffer) 515 if (!buffer)
513 buffer = _render_to_buffer(obj, pd, engine, root, w, h, root, NULL, 516 buffer = _render_to_buffer(obj, pd, engine, root, w, h, NULL, do_async);
514 do_async);
515 else 517 else
516 //cache reference was increased when we get the cache. 518 //cache reference was increased when we get the cache.
517 ENFN->ector_surface_cache_drop(engine, root); 519 ENFN->ector_surface_cache_drop(engine, root);
@@ -547,8 +549,7 @@ _user_vg_entry_render(Evas_Object_Protected_Data *obj,
547 { 549 {
548 // render to the buffer 550 // render to the buffer
549 buffer = _render_to_buffer(obj, pd, engine, user_entry->root, 551 buffer = _render_to_buffer(obj, pd, engine, user_entry->root,
550 w, h, user_entry->root, buffer, 552 w, h, buffer, do_async);
551 do_async);
552 } 553 }
553 else 554 else
554 { 555 {
@@ -557,7 +558,6 @@ _user_vg_entry_render(Evas_Object_Protected_Data *obj,
557 buffer = _render_to_buffer(obj, pd, engine, 558 buffer = _render_to_buffer(obj, pd, engine,
558 user_entry->root, 559 user_entry->root,
559 w, h, 560 w, h,
560 user_entry->root,
561 buffer, 561 buffer,
562 do_async); 562 do_async);
563 //cache reference was increased when we get the cache. 563 //cache reference was increased when we get the cache.