summaryrefslogtreecommitdiff
path: root/src/static_libs
diff options
context:
space:
mode:
authorHermet Park <hermetpark@gmail.com>2019-11-27 17:51:42 +0900
committerHermet Park <hermetpark@gmail.com>2019-11-27 17:54:51 +0900
commit62225a695d46b759bbd52baec8b9420a052e79a1 (patch)
tree0e0f7e33b4d6ff5712c4597aec406d422cb36409 /src/static_libs
parent2f41f867ae992c58690e8fcad60672daa8744708 (diff)
evas json: up-to-date vector-tree logging.
Diffstat (limited to 'src/static_libs')
-rw-r--r--src/static_libs/vg_common/vg_common_json.c35
1 files changed, 26 insertions, 9 deletions
diff --git a/src/static_libs/vg_common/vg_common_json.c b/src/static_libs/vg_common/vg_common_json.c
index abad5f3fc9..7a41527795 100644
--- a/src/static_libs/vg_common/vg_common_json.c
+++ b/src/static_libs/vg_common/vg_common_json.c
@@ -37,8 +37,10 @@ _construct_drawable_nodes(Efl_Canvas_Vg_Container *parent, const LOTLayerNode *l
37 image = efl_add(EFL_CANVAS_VG_IMAGE_CLASS, parent); 37 image = efl_add(EFL_CANVAS_VG_IMAGE_CLASS, parent);
38 efl_key_data_set(parent, key, image); 38 efl_key_data_set(parent, key, image);
39 } 39 }
40 efl_gfx_entity_visible_set(image, EINA_TRUE); 40#if DEBUG
41 41 for (int i = 0; i < depth; i++) printf(" ");
42 printf("%s (%p)\n", efl_class_name_get(efl_class_get(image)), image);
43#endif
42 Eina_Matrix3 m; 44 Eina_Matrix3 m;
43 eina_matrix3_identity(&m); 45 eina_matrix3_identity(&m);
44 eina_matrix3_values_set( &m, 46 eina_matrix3_values_set( &m,
@@ -46,10 +48,9 @@ _construct_drawable_nodes(Efl_Canvas_Vg_Container *parent, const LOTLayerNode *l
46 node->mImageInfo.mMatrix.m21, node->mImageInfo.mMatrix.m22, node->mImageInfo.mMatrix.m23, 48 node->mImageInfo.mMatrix.m21, node->mImageInfo.mMatrix.m22, node->mImageInfo.mMatrix.m23,
47 node->mImageInfo.mMatrix.m31, node->mImageInfo.mMatrix.m32, node->mImageInfo.mMatrix.m33); 49 node->mImageInfo.mMatrix.m31, node->mImageInfo.mMatrix.m32, node->mImageInfo.mMatrix.m33);
48 efl_canvas_vg_node_transformation_set(image, &m); 50 efl_canvas_vg_node_transformation_set(image, &m);
49
50 efl_canvas_vg_image_data_set(image, node->mImageInfo.data, EINA_SIZE2D(node->mImageInfo.width, node->mImageInfo.height)); 51 efl_canvas_vg_image_data_set(image, node->mImageInfo.data, EINA_SIZE2D(node->mImageInfo.width, node->mImageInfo.height));
51
52 efl_gfx_color_set(image, node->mImageInfo.mAlpha, node->mImageInfo.mAlpha, node->mImageInfo.mAlpha, node->mImageInfo.mAlpha); 52 efl_gfx_color_set(image, node->mImageInfo.mAlpha, node->mImageInfo.mAlpha, node->mImageInfo.mAlpha, node->mImageInfo.mAlpha);
53 efl_gfx_entity_visible_set(image, EINA_TRUE);
53 54
54 continue; 55 continue;
55 } 56 }
@@ -258,8 +259,12 @@ _construct_mask_nodes(Efl_Canvas_Vg_Container *parent, LOTMask *mask, int depth
258 else 259 else
259 efl_gfx_path_reset(shape); 260 efl_gfx_path_reset(shape);
260 261
261 efl_gfx_entity_visible_set(shape, EINA_TRUE); 262#if DEBUG
263 for (int i = 0; i < depth; i++) printf(" ");
264 printf("%s (%p)\n", efl_class_name_get(efl_class_get(shape)), shape);
265#endif
262 266
267 efl_gfx_entity_visible_set(shape, EINA_TRUE);
263 efl_gfx_path_reserve(shape, mask->mPath.elmCount, mask->mPath.ptCount); 268 efl_gfx_path_reserve(shape, mask->mPath.elmCount, mask->mPath.ptCount);
264 269
265 for (size_t i = 0; i < mask->mPath.elmCount; i++) 270 for (size_t i = 0; i < mask->mPath.elmCount; i++)
@@ -311,6 +316,12 @@ _construct_masks(Efl_Canvas_Vg_Container *mtarget, LOTMask *masks, unsigned int
311 } 316 }
312 efl_gfx_entity_visible_set(msource, EINA_TRUE); 317 efl_gfx_entity_visible_set(msource, EINA_TRUE);
313 318
319#if DEBUG
320 for (int i = 0; i < depth; i++) printf(" ");
321 printf("%s (%p), mask => %p\n", efl_class_name_get(efl_class_get(msource)), msource, mtarget);
322 depth++;
323#endif
324
314 //FIXME : EFL_GFX_VG_COMPOSITE_METHOD_ALPHA option is temporary 325 //FIXME : EFL_GFX_VG_COMPOSITE_METHOD_ALPHA option is temporary
315 //Currently matte alpha implements is same the mask intersect implement. 326 //Currently matte alpha implements is same the mask intersect implement.
316 //It has been implemented as a multiplication calculation. 327 //It has been implemented as a multiplication calculation.
@@ -331,6 +342,12 @@ _construct_masks(Efl_Canvas_Vg_Container *mtarget, LOTMask *masks, unsigned int
331 efl_key_data_set(mtarget, key, msource); 342 efl_key_data_set(mtarget, key, msource);
332 } 343 }
333 efl_gfx_entity_visible_set(msource, EINA_TRUE); 344 efl_gfx_entity_visible_set(msource, EINA_TRUE);
345
346#if DEBUG
347 for (int i = 0; i < depth; i++) printf(" ");
348 printf("%s (%p), mask:%d => %p\n", efl_class_name_get(efl_class_get(msource)), msource, mask->mMode, mtarget);
349#endif
350
334 _construct_mask_nodes(msource, mask, depth + 1); 351 _construct_mask_nodes(msource, mask, depth + 1);
335 352
336 Efl_Gfx_Vg_Composite_Method mask_mode; 353 Efl_Gfx_Vg_Composite_Method mask_mode;
@@ -525,10 +542,6 @@ vg_common_json_create_vg_node(Vg_File_Data *vfd)
525 const LOTLayerNode *tree = 542 const LOTLayerNode *tree =
526 lottie_animation_render_tree(lot_anim, frame_num, 543 lottie_animation_render_tree(lot_anim, frame_num,
527 vfd->view_box.w, vfd->view_box.h); 544 vfd->view_box.w, vfd->view_box.h);
528#if DEBUG
529 printf("%s (%p)\n", efl_class_name_get(efl_class_get(vfd->root)), vfd->root);
530#endif
531
532 //Root node 545 //Root node
533 Efl_Canvas_Vg_Container *root = vfd->root; 546 Efl_Canvas_Vg_Container *root = vfd->root;
534 if (!root) 547 if (!root)
@@ -541,6 +554,10 @@ vg_common_json_create_vg_node(Vg_File_Data *vfd)
541 } 554 }
542 else _reset_vg_tree(root); 555 else _reset_vg_tree(root);
543 556
557#if DEBUG
558 printf("%s (%p)\n", efl_class_name_get(efl_class_get(vfd->root)), vfd->root);
559#endif
560
544 _update_vg_tree(root, tree, 1); 561 _update_vg_tree(root, tree, 1);
545#else 562#else
546 return EINA_FALSE; 563 return EINA_FALSE;