summaryrefslogtreecommitdiff
path: root/src/static_libs
diff options
context:
space:
mode:
authorHermet Park <hermetpark@gmail.com>2019-08-20 20:24:27 +0900
committerHermet Park <hermetpark@gmail.com>2019-08-20 20:24:27 +0900
commitb0737c743458818ea79338c15c15d0c3d4819051 (patch)
tree45fcd6f0413e4b6caf3449e0916a0b8c5677f012 /src/static_libs
parentdad166f84a02cfffc2a07bc804e7b7e35ed4a40d (diff)
Revert "ector: code refactoring."
This reverts commit dad166f84a02cfffc2a07bc804e7b7e35ed4a40d. Ector is not public, this breaks enlightenment compilation,
Diffstat (limited to 'src/static_libs')
-rw-r--r--src/static_libs/vg_common/vg_common_json.c39
1 files changed, 27 insertions, 12 deletions
diff --git a/src/static_libs/vg_common/vg_common_json.c b/src/static_libs/vg_common/vg_common_json.c
index b0aac76..47923c9 100644
--- a/src/static_libs/vg_common/vg_common_json.c
+++ b/src/static_libs/vg_common/vg_common_json.c
@@ -9,6 +9,21 @@
9 9
10#include <rlottie_capi.h> 10#include <rlottie_capi.h>
11 11
12//FIXME: This enum add temporarily to help understanding of additional code
13//related to masking in prepare_mask.
14//This needs to be formally declared through the eo class.
15typedef enum _EFL_CANVAS_VG_NODE_BLEND_TYPE
16{
17 EFL_CANVAS_VG_NODE_BLEND_TYPE_NONE = 0,
18 EFL_CANVAS_VG_NODE_BLEND_TYPE_ALPHA,
19 EFL_CANVAS_VG_NODE_BLEND_TYPE_ALPHA_INV,
20 EFL_CANVAS_VG_NODE_BLEND_TYPE_MASK_ADD,
21 EFL_CANVAS_VG_NODE_BLEND_TYPE_MASK_SUBSTRACT,
22 EFL_CANVAS_VG_NODE_BLEND_TYPE_MASK_INTERSECT,
23 EFL_CANVAS_VG_NODE_BLEND_TYPE_MASK_DIFFERENCE
24}EFL_CANVAS_VG_NODE_BLEND_TYPE;
25//
26
12static char* 27static char*
13_get_key_val(void *key) 28_get_key_val(void *key)
14{ 29{
@@ -294,10 +309,10 @@ _construct_masks(Efl_Canvas_Vg_Container *mtarget, LOTMask *masks, unsigned int
294 efl_key_data_set(mtarget, key, msource); 309 efl_key_data_set(mtarget, key, msource);
295 } 310 }
296 311
297 //FIXME : ECTOR_RENDERER_COMPOSITE_METHOD_ALPHA option is temporary 312 //FIXME : EFL_CANVAS_VG_NODE_BLEND_TYPE_ALPHA option is temporary
298 //Currently matte alpha implements is same the mask intersect implement. 313 //Currently matte alpha implemtnes is same the mask intersect impletment.
299 //It has been implemented as a multiplication calculation. 314 //It has been implemented as a multiplication calculation.
300 efl_canvas_vg_node_comp_method_set(mtarget, msource, ECTOR_RENDERER_COMPOSITE_METHOD_MATTE_ALPHA); 315 efl_canvas_vg_node_mask_set(mtarget, msource, EFL_CANVAS_VG_NODE_BLEND_TYPE_ALPHA);
301 316
302 mtarget = msource; 317 mtarget = msource;
303 318
@@ -315,24 +330,24 @@ _construct_masks(Efl_Canvas_Vg_Container *mtarget, LOTMask *masks, unsigned int
315 } 330 }
316 _construct_mask_nodes(msource, mask, depth + 1); 331 _construct_mask_nodes(msource, mask, depth + 1);
317 332
318 Ector_Renderer_Composite_Method mask_mode; 333 EFL_CANVAS_VG_NODE_BLEND_TYPE mask_mode;
319 switch (mask->mMode) 334 switch (mask->mMode)
320 { 335 {
321 case MaskSubstract: 336 case MaskSubstract:
322 mask_mode = ECTOR_RENDERER_COMPOSITE_METHOD_MASK_SUBSTRACT; 337 mask_mode = EFL_CANVAS_VG_NODE_BLEND_TYPE_MASK_SUBSTRACT;
323 break; 338 break;
324 case MaskIntersect: 339 case MaskIntersect:
325 mask_mode = ECTOR_RENDERER_COMPOSITE_METHOD_MASK_INTERSECT; 340 mask_mode = EFL_CANVAS_VG_NODE_BLEND_TYPE_MASK_INTERSECT;
326 break; 341 break;
327 case MaskDifference: 342 case MaskDifference:
328 mask_mode = ECTOR_RENDERER_COMPOSITE_METHOD_MASK_DIFFERENCE; 343 mask_mode = EFL_CANVAS_VG_NODE_BLEND_TYPE_MASK_DIFFERENCE;
329 break; 344 break;
330 case MaskAdd: 345 case MaskAdd:
331 default: 346 default:
332 mask_mode = ECTOR_RENDERER_COMPOSITE_METHOD_MASK_ADD; 347 mask_mode = EFL_CANVAS_VG_NODE_BLEND_TYPE_MASK_ADD;
333 break; 348 break;
334 } 349 }
335 efl_canvas_vg_node_comp_method_set(mtarget, msource, mask_mode); 350 efl_canvas_vg_node_mask_set(mtarget, msource, mask_mode);
336 mtarget = msource; 351 mtarget = msource;
337 } 352 }
338} 353}
@@ -380,7 +395,7 @@ _update_vg_tree(Efl_Canvas_Vg_Container *root, const LOTLayerNode *layer, int de
380 395
381 if (matte_mode != 0) 396 if (matte_mode != 0)
382 { 397 {
383 efl_canvas_vg_node_comp_method_set(ptree, ctree, matte_mode); 398 efl_canvas_vg_node_mask_set(ptree, ctree, matte_mode);
384 mtarget = ctree; 399 mtarget = ctree;
385 } 400 }
386 matte_mode = (int) clayer->mMatte; 401 matte_mode = (int) clayer->mMatte;
@@ -400,10 +415,10 @@ _update_vg_tree(Efl_Canvas_Vg_Container *root, const LOTLayerNode *layer, int de
400 matte_mode = 0; 415 matte_mode = 0;
401 break; 416 break;
402 case MatteAlpha: 417 case MatteAlpha:
403 matte_mode = ECTOR_RENDERER_COMPOSITE_METHOD_MATTE_ALPHA; 418 matte_mode = EFL_CANVAS_VG_NODE_BLEND_TYPE_ALPHA;
404 break; 419 break;
405 case MatteAlphaInv: 420 case MatteAlphaInv:
406 matte_mode = ECTOR_RENDERER_COMPOSITE_METHOD_MATTE_ALPHA_INVERSE; 421 matte_mode = EFL_CANVAS_VG_NODE_BLEND_TYPE_ALPHA_INV;
407 break; 422 break;
408 case MatteLuma: 423 case MatteLuma:
409 matte_mode = 0; 424 matte_mode = 0;