path: root/src/lib/edje/edje_calc.c (follow)
AgeCommit message (Collapse)Author
2020-09-03edje - calc - handle swallow disappearing mid-calc due to callabcksCarsten Haitzler (Rasterman)
callbacks attached to move/resize etc. can change a swallow and .. well.. i hit a crash where it happens. so handle this case. @fix
2020-08-13edje - calce - really respect max image size for img setsCarsten Haitzler (Rasterman)
when you have an image set for an image it wouldnt actually respect image max size and not select something bigger than it.. now it will @fix
2020-06-03Efl.Canvas.Vg.Object: Optimize Ector Surface SizeJunsuChoi
Summary: The ector surface size was determined by the size of the vg object. vg object is usually sized by the size of the container. So, the ector surface is set unnecessarily large. This patch sets the ector surface size to the path boundary. And the path boundary refers to the stroke width and miterlimit. Test Plan: vector sample {F3887634} {F3887632} [grey area is ector surface size] {F3887633} Reviewers: Hermet, kimcinoo, smohanty, herb Reviewed By: Hermet Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision:
2020-05-27edje: fix memory leak in edje part recalculation.Myoungwoon Roy, Kim
Allocated part_array is only freed when _circular_dependency_find() is successful. It is not freed in other cases. Reviewed-by: Stefan Schmidt <> Reviewed-by: woochan lee <> Differential Revision:
2020-05-26canvas vg: fix dangling vector containers.Hermet Park
These duplicated containers are not going removed since its refernece is always more than 0. We need to unref explicity when they have to @fix
2020-05-13edje_calc: Add unload file for already loaded vector lottie file.JunsuChoi
Summary: Users can use multiple jsons per description in one part in edc. At that time, multiple files are loaded, if a file is already loaded, it must be unloaded. Test Plan: edje_cc -beta -id ./ json_edc.edc make ./test Push Change button -> shutdown application {F3882716} Reviewers: Hermet, herb, kimcinoo Reviewed By: Hermet Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision:
2020-04-13edje_calc: add null check after eet_readWooHyun Jung
2020-03-19canvas 3d: remove canvas3d edjeHermet Park
Summary: Remove functional stuff, leave as deprecated for compatibility. Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision:
2020-03-10edje: Rename Json to Lottie in edj supportingJunsuChoi
Summary: The json file used by edje is for lottie output. json can be used in many ways. So the purpose is clear. Test Plan: N/A Reviewers: Hermet, kimcinoo, herb Reviewed By: Hermet Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision:
2020-02-19edje: modify to respect user set fixed propertyWonki Kim
Summary: this patch is related with @D11365. rather than undoing optimization edje calc, this patch introduces a user_set property which enables edje_calc to respect user set property. Reviewers: bu5hm4n, eagleeye, YOhoho, Hermet, zmike Reviewed By: zmike Subscribers: zmike, cedric, #reviewers, #committers, woohyun, eagleeye, bu5hm4n Tags: #efl Differential Revision:
2020-02-17edje: Disable the json vector animation feature with a flag.JunsuChoi
Summary: Json vector animation requires the json loader to be loaded. Therefore, if the loader does not load, it prints an appropriate error message and disables the feature. Depends on D11228 Test Plan: N/A Reviewers: Hermet, Jaehyun_Cho, id213sin Reviewed By: Hermet Subscribers: raster, cedric, #reviewers, #committers Tags: #efl Differential Revision:
2020-02-17edje: add json file support featureYoungBok Shin
Summary: It also starts to support following new edc properties. This is backported patch from Tizen 5.0 1. frame desc { "default" vector { frame: 0.5; // 0.0 ~ 1.0 } } 2. actions program { "vector_animation"; // VG_ANIM_PLAY, VG_ANIM_PLAY_BACK, VG_ANIM_LOOP, // VG_ANIM_STOP, VG_ANIM_PAUSE, VG_ANIM_RESUME action: VG_ANIM_PLAY; target: "your_vector_part"; } @feature Co-authored-by: Jaehyun Cho <> - Fix to remove Efl.Canvas.Animation_Player on edje Test Plan: {F3840540} {F3840542} {F3840543} make and test attached file edje_cc -beta -id ./ json_edc.edc json.edj gcc -o test test_edc.c -g `pkg-config --cflags --libs evas elementary rlottie` ./test Reviewers: Hermet, Jaehyun_Cho, id213sin Reviewed By: Hermet Subscribers: segfaultxavi, raster, cedric, #reviewers, #committers Tags: #efl Differential Revision:
2020-02-14edje_calc: add null checking and remove unreachable codeWooHyun Jung
2020-01-22edje - store original size in edje struct and dont exceed max sizeCarsten Haitzler (Rasterman)
evas can tell us max texture size. in edje when we have image sets (multiple images that make up mipmaps effectively for a logical image), we now can avoid choosing an image that exceeds max texture size. this actually fixes bugs i have seen on the rpi3 which has a max texture size of 2048 which makes it easy to exceed it with wallpapers or even terminology's default theme. so combo of new feature and fix... but requires a rebuild of the edj files... @feat + @fix
2019-12-01edje - min calc - ix more regressions due to optimizationsCarsten Haitzler (Rasterman)
again 37b55172b0d46d71f772af8fba17e1fb1b7c6c2c broke min size calc. this time it was for mouse cursors. the entry cursor was 0 sized after commit 37b55172b0d46d71f772af8fba17e1fb1b7c6c2c. this disables the "don't cacle if its 0 sized) which isnt a valid thing to skip - you caqn min size calc a 0x0 edje ... and it should then return a valid min size given that design/layout.
2019-11-28edje - fix min size calc after being broken by previous commitCarsten Haitzler (Rasterman)
37b55172b0d46d71f772af8fba17e1fb1b7c6c2c breaks min size calc. elm toolbar was being squashed. e toolbars also were becoming 0 sized. Just because a swallow does not have content does not mean it does not affect the minimum size. there still could be a min size set on it anyway etc. ...
2019-11-26edje_calc: Creation macro that perform edje calc, regardless of the edje size.Woochanlee
Summary: edje_recalc_do() needs to be executed regardless of the size of edje in order to deliver edje properties for the API that the user calls. Reviewers: cedric, Hermet, Jaehyun_Cho, smohanty Reviewed By: Hermet Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision:
2019-11-16edje - box - calc min size correctly at start ...Carsten Haitzler (Rasterman)
this fixes a logic hole where no chosen desc has been applied yet to a box and thus it has no start layout thus no way to calc a min size. this breaks min size calcs you do when setting up and object. this fixes that by forcing the chosen desk on a min size calc so there is one. @fix
2019-11-14edje: Remove warningsLauro Moura
Missing declaration from another file and removing unused variable. After D10605 Reviewed-by: Cedric BAIL <> Differential Revision:
2019-11-14edje_calc: Exception handling if no calculation is required.Woochanlee
If there is no object swllowed, do not run part_calc on it. This swallow will be calculated if there is an associated part, otherwise it will not need to be calculated. When the app is launched, a lot of edje calculation logic is executed. Most of the edje size is missing, so the calculation result is meaningless. Added code to prevent this. Reviewed-by: Cedric BAIL <> Differential Revision:
2019-11-06edje_calc: UNLIKELY changed to LIKELY.Woochanlee
It should takes true almost all times when it checks. Reviewed-by: Cedric BAIL <> Differential Revision:
2019-10-30edje_calc: Remove unused flag.Woochanlee
Summary: This has marked remove me. Reviewers: raster, Hermet, zmike, devilhorns Reviewed By: devilhorns Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision:
2019-10-29edje_calc: Delete duplicated conditional statement.Woochanlee
Summary: this is identical to the conditional above and can be merged to improve code clarity Reviewers: raster, Hermet, zmike Reviewed By: zmike Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision:
2019-10-14edje: block "recalc" event emission if it isn't being subscribed toMike Blumenkrantz
Summary: this gets called a ton ref T8321 Depends on D10356 Reviewers: bu5hm4n, cedric Reviewed By: bu5hm4n, cedric Subscribers: cedric, #reviewers, #committers Tags: #efl Maniphest Tasks: T8321 Differential Revision:
2019-08-21edje calc - merge 2 switch statements that are doing 2 phasesCarsten Haitzler (Rasterman)
we have nigh identical switch logic, so merge these to avoid multiple switches and type matches. it localises per-type logic too which is nicer.
2019-08-21edje recalc - move rare recalc code out of hot pathCarsten Haitzler (Rasterman)
we rarely use tables in edje, so move it out of the hot path for intruction prefetch/cache. also for calc single - move things to sub funcs so things like mesh, light and so on code is always out of the hot path as much as possible. we probably can merge our 2 switch statements as well. this really just restructures the code to move stuff into sub functions which also does make the calc funcs look simpler and easier to read.
2019-07-31Revert "edje/calc: clamp part calc size to 0"Carsten Haitzler (Rasterman)
This reverts commit 895ffd93cc5d9e183420bbedb86ec92f5c7e5369. This commit broke E's widget toolbars that only had text - so many config dialogs broke. too simple to fix - it's a wrong premise to begin with it would seem.
2019-07-29edje/calc: clamp part calc size to 0Mike Blumenkrantz
this could previously have been negative @fix Reviewed-by: Cedric BAIL <> Differential Revision:
2019-07-12edje: Add support for map zoom to use other part center.Subodh Kumar
Summary: Current: In edc, zoom is supposed to happen from object center, there is no way to change the center of the zoom. Changes: Adding support to change the center of zooming just like map rotation by using other part's center. @feature Reviewers: cedric, zmike Reviewed By: zmike Subscribers: zmike, cedric, #reviewers, #committers Tags: #efl Differential Revision:
2019-05-29edje/calc: correctly handle swallow/group objects as clippers for state clipsMike Blumenkrantz
Summary: in the case where the clipper being set was an indirect object, it's necessary to resolve the lookup for that part and use the actual part object to avoid setting a placeholder rect as the clipper @fix Depends on D8850 Reviewers: cedric Reviewed By: cedric Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision:
2019-04-26edje_calc: replace eina_stringshare_ref with eina_stringshare_addYeongjong Lee
Summary: When there is circular dependency in edc, a bunch of CRI log is printed. This patch fixes it. ``` ERR<10159>:edje lib/edje/edje_calc.c:3919 _edje_part_recalc() Circular dependency in the group 'test' : longpartname -> longpartname -> longpartname2 ERR<10159>:edje lib/edje/edje_calc.c:3896 _edje_part_recalc() Circular dependency when calculating part "longpartname". Already calculating XY [03] axes. Need to calculate Y [02] axes CRI<10159>: lib/eina/eina_share_common.c:559 _eina_share_common_node_from_str() *** Eina Magic Check Failed at 0x7fb7c93ebf60 !!! Input handle is wrong type. Expected: 98761254 - Eina Stringshare Node Supplied: 2f736e6f - (unknown) CRI<10159>: lib/eina/eina_share_common.c:559 _eina_share_common_node_from_str() *** Eina Magic Check Failed at 0x7fb7c93ec5d1 !!! Input handle is wrong type. Expected: 98761254 - Eina Stringshare Node Supplied: 5f747261 - (unknown) ``` If string is already stored, `eina_stringshare_add` increase its reference count. Test Plan: test.c ``` //edje_cc test.edc && gcc -o test test.c `pkg-config --libs --cflags elementary` #include <Elementary.h> int main(int argc, char **argv) { elm_init(argc, argv); Evas_Object *win = elm_win_util_standard_add("test", "test"); Evas_Object *layout = elm_layout_add(win); elm_layout_file_set(layout, "./test.edj", "test"); elm_win_resize_object_add(win, layout); evas_object_show(layout); evas_object_resize(win, 200, 200); evas_object_show(win); elm_run(); elm_shutdown(); return 0; } ``` test.edc ``` collections { group { name: "test"; parts { rect { name: "longpartname"; desc { "default"; "longpartname2"; } } rect { name: "longpartname2"; type: RECT; desc { "default"; "longpartname"; } } } } } ``` Reviewers: SanghyeonLee, zmike Reviewed By: SanghyeonLee Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision:
2019-04-19Revert "edje_calc: make INTP use TO_INT_ROUND"Shinwoo Kim
Summary: This reverts commit be00af9bc3d534ede3965693618684fe38fd8786 which has incorrect calculation. For more information please refer to: Reviewers: Hermet Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision:
2019-03-08edje_calc: make INTP use TO_INT_ROUNDShinwoo Kim
Summary: The edje_part_recalc calculates next postion(p3). Please refer to following line. p3->final.y = INTP(p1->final.y, p2->final.y, pos); If the condition is as blow, then p3->final.y becomes -50 only if pos is 1.0. Because INP uses TO_INT not TO_INT_ROUND. p1->final.y == -32 p2->final.y == -50 So we had nonsmooth ending of transition. Test Plan: Sample application to check this issue. Please look carefully when the rect moves from bottom to top. {F3627740} {F3627739} Reviewers: cedric, Hermet, jypark Reviewed By: Hermet Subscribers: zmike, akanad, #reviewers, #committers Tags: #efl Differential Revision:
2019-03-06edje_calc: add ERR message to find out incorrect size problemShinwoo Kim
When I amended I removed line to handle negative value size of params final in _edje_part_pixel_adjust. Because It was not related to the what the commit wants to fix, and I could not find the case making param final size value negative , although I got the negative value when I tested on a specific case. Now it seems that the negative value is telling me "Witness Me!". So I would like to add this change, and never let me forget the issue. Reviewed-by: Cedric BAIL <> Differential Revision:
2019-03-06evas: remove all legacy usage from eo filesMike Blumenkrantz
this takes the current generated output from eolian for legacy code in evas and adds it to the tree, then removes legacy references from the corresponding eo files. in the case where the entire eo file was for a legacy object, that eo file has been removed from the tree ref T7724 Reviewed-by: Marcel Hollerbach <> Differential Revision:
2019-03-04efl.layout.calc: remove list<> usage in FIXME for eventMike Blumenkrantz
Summary: make this an array since there is no need to use a list here anyway ref T7581 Reviewers: cedric Reviewed By: cedric Subscribers: cedric, #reviewers, #committers Tags: #efl_api Maniphest Tasks: T7581 Differential Revision:
2019-02-27efl.file: improve api a bitMike Blumenkrantz
Summary: the previous implementation/api had a number of issues: * "file" property contained both "file" and "key" values - also performed file loading operation * "load_error" property which was specific to image objects * no methods for controlling file loading/unloading this patch attempts the following changes: * split "file" property into "file" and "key" properties - also remove "key" from existing "mmap" property * remove "load_error" * directly return error codes from operations * add "load" and "unload" methods for directly controlling load state * add implicit file loading if file/mmap is set during construction * rewrite all efl.file implementations to move file loading into load() method * rewrite all usage of efl.file api based on these changes * add C extension functions to mimic previous behavior ref T7577 Reviewers: segfaultxavi, bu5hm4n, cedric Reviewed By: segfaultxavi Subscribers: vitor.sousa, #reviewers, #committers Tags: #efl_api Maniphest Tasks: T7577 Differential Revision:
2019-02-21api: efl.gfx.size_hints -> efl.gfx.hintsMike Blumenkrantz
Summary: these hints are not strictly size-related, so renaming them is more consistent with their actual function ref T7563 Depends on D7968 Reviewers: segfaultxavi, cedric, bu5hm4n Subscribers: segfaultxavi, cedric, #reviewers, #committers Tags: #efl Maniphest Tasks: T7563 Differential Revision:
2019-02-13Remove individual class BETA guardsXavi Artigas
Summary: Eolian adds a per-class BETA guard (like EFL_UI_WIN_BETA) to any method tagged as @beta. This means that any app (and the EFL code) wanting to use BETA features has to enable them class by class, which is cumbersome. This commit replaces the individual guards with the global EFL_BETA_API_SUPPORT guard, so apps only need to define one symbol to access BETA features. Any usage of the per-class guards has been removed from the EFL code and examples. When building EFL the global guard is defined by configure, so all EFL methods already have access to BETA API. Efl_Core.h and Efl_Ui.h no longer define EFL_BETA_API_SUPPORT. Apps wanting to use BETA API have to define this symbol before including any EFL header (It has been added to the examples requiring it). Test Plan: make && make check && make examples still work, but there's a lot less #defines in the code Reviewers: zmike, bu5hm4n, q66 Reviewed By: q66 Subscribers: cedric, #reviewers, #committers Tags: #efl Maniphest Tasks: T6788 Differential Revision:
2019-02-11edje: apply maps to textblock cursors and backgroundsMike Blumenkrantz
when a map is applied to an edje part, it is expected that all components of the part respect the map attributes. this requires that, in the case of textblock parts, all the sub-parts which are internal to the textblock (entry) object also go through the map populate and apply codepaths fix T4977 @fix Reviewed-by: Cedric BAIL <> Differential Revision:
2018-12-18silence most left over compiler warningsJérémy Zurcher
Summary: silence -Wshadow -Wunused-variable -Wunused-parameter Reviewers: segfaultxavi Reviewed By: segfaultxavi Subscribers: segfaultxavi, cedric, #reviewers, #committers Tags: #efl Differential Revision:
2018-11-14edje: fix an overflow issue for state valuesYoungbok Shin
Summary: Whenever _edje_recalc_do() is called, a state value of Edje structure is increased. This increased value will be stored in Edje_Real_Part and Edje_Real_Part_State for calculation optimazation. But, once the state value is overflowed, it ruins calculation logic. @fix Test Plan: Run an Edje file which has infinite animation for over an hour. I'll attach an example to phab. Reviewers: raster, cedric, woohyun, Hermet Reviewed By: Hermet Subscribers: #reviewers, #committers Tags: #efl Differential Revision:
2018-11-09edje calc - wanr - move fallthrough tag to just before next caseCarsten Haitzler (Rasterman)
fixes warning for it not being there... no bug here though
2018-11-09edje calc - warn - fix warn about initting all fields of calc paramsCarsten Haitzler (Rasterman)
2018-09-17edje: Remove hack codeSubodhKumar
Summary: special calculation for textblock is for fit calculation. This is obvious from code that fit is being calculated before text is actually been set to textblock. I am not sure whether this is intentional or mistake but it make sense to calculate fit after text is being set so that formatted and native calculation can be proper. @fix Test Plan: NA Reviewers: cedric, zmike, herdsman, devilhorns Subscribers: stefan_schmidt, #reviewers, #committers, shilpasingh Tags: #efl Differential Revision:
2018-09-10Revert "evas vg: changed "vg object" to "vg""Hermet Park
This reverts commit ec69abed9d63e7876238dffc4b0d3398d1cd1be1. Ooops, I didn't intended this patch. @#!@#!@#!@#
2018-09-10evas vg: changed "vg object" to "vg"Hermet Park
Summary: Following our naming rule, rename to like other primitives. i.e. efl_canvas_rect, efl_canvas_image, efl_canvas_vg ... Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision:
2018-09-04edje_calc: remove unused variableYeongjong Lee
Summary: those variables should be removed at 05e3e450e5ecb67f80c1be3df8ab7a08e8d33da2 Reviewers: eagleeye Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision:
2018-08-31efl: vector is no more beta version.Hermet Park
2018-04-24Efl.Gfx.Image* (From Efl.Image*)Xavi Artigas
Ref Reviewed-by: Cedric Bail <>