Commit Graph

65811 Commits

Author SHA1 Message Date
WooHyun Jung 8538130ba2 evas_object_textblock: fix to free style properly by edje's style_user_pop
Summary:
When calling style_user_pop in edje, current style was not freed by
style_user_pop in evas properly (since old_ts was not cared at all).

Because of this, memory was leaked by none accessible textblock styles which
should have been freed.

@fix

Test Plan:
1. call edje_object_part_text_style_user_pop
2. call edje_object_part_text_style_user_push with new style-text
3. repeat #1 and #2 several times and check the memory (ps -u)

Reviewers: ali.alzyod, bowonryu, bu5hm4n, zmike

Reviewed By: ali.alzyod

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D11801
2020-05-12 16:46:29 +09:00
junsu choi 9d96583049 evas_vg_node: deprecate evas_vg_node_geometry_set.
Summary:
The geometry info of evas_vg_node is based on Efl.Path_Bounds.
The size of vg_node does not change unless path data is changed.
Therefore, this API does not work normally.

Test Plan: N/A

Reviewers: Hermet, kimcinoo, herb

Reviewed By: Hermet

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D11809
2020-05-12 11:13:27 +09:00
Taehyub Kim a138347c8e efl_canvas_vg_node: fix the implemenation function of the efl_canvas_vg_node(evas_object_above_get, evas_object_below_get)
Summary:
There are wrong implemenation codes in the above and below get objects of efl_canvas_vg_node functin.
and made it working correctly.

Reviewers: Hermet, jsuya

Reviewed By: jsuya

Subscribers: singh.amitesh, cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T8700

Differential Revision: https://phab.enlightenment.org/D11781
2020-05-12 09:12:26 +09:00
Stefan Schmidt cf5df21557 tests: ecore_con another cert update to extend the time its valid to 100 years
Instead of forcing someone to look at this again in a couple of years we
can simply extend it to 100 years and expect this code does no longer
exist. :-)

For more details on the steps I used to generate and the problem in
ecore_con please see the original commit 3b835b57ff
2020-05-11 17:05:44 +02:00
Hermet Park eaafb9e4c5 canvas render: don't apply mask if the objects in the map.
Current mask is shared across the objects hierarchy,
children would try to apply this mask on the rendering
when it's enabled by the parent.

but if the map is enabled from one of parents, children should not apply
the parents mask but leaves it to the parent's job.

@fix
2020-05-10 16:08:03 +09:00
Carsten Haitzler ddcc7ab825 evas + gl - fix callback-to-app-changes-state issue with pixel data
so if we call a callback that has e do something like set new pixel
data in a pixel data provider and we do it from the is pixel inside
call ebcause pixels were marked as dirty - pixels may no longer exist
after that, so re-get to make sure and handle properly.

this was found with tiling + e + shaped windows + moving them around
in tiling. it's a valid efl bug though.

@fix
2020-05-09 14:02:04 +01:00
Mike Blumenkrantz 27630114ef evas/events: fix conditional for emitting source mouse move events
Summary:
this should match all other similar cases when determining whether to
emit the event by checking whether at least one coord has changed, not both
Depends on D11791

Reviewers: devilhorns

Reviewed By: devilhorns

Subscribers: raster, cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D11792
2020-05-09 09:25:27 +01:00
Mike Blumenkrantz 823b7b05cd elm: resolve float comparison warnings
Summary: Depends on D11790

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D11791
2020-05-09 09:25:21 +01:00
Mike Blumenkrantz c323199f3c bin/elm: resolve float compare warnings
Summary: Depends on D11789

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D11790
2020-05-09 09:25:17 +01:00
Mike Blumenkrantz e0cf299ae5 tests: resolve float comparison warnings
Summary: Depends on D11788

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D11789
2020-05-09 09:25:14 +01:00
Mike Blumenkrantz 477bfd19ea edje_cc: consistently use eina macros for all float comparisons
Summary: Depends on D11787

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D11788
2020-05-09 09:25:11 +01:00
Mike Blumenkrantz 9cd18f3de6 edje_cc: fix comparisons for possible non-float values
Summary:
when defined, BUILD_EDJE_FP causes some of these struct members to not
be floating types and additionally defines special macros to be used
for comparisons to handle this case
Depends on D11786

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D11787
2020-05-09 09:25:08 +01:00
Mike Blumenkrantz e0e1dc5f6f eina: resolve float comparison warnings
Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D11786
2020-05-09 09:25:04 +01:00
Xavi Artigas 19da175f94 doxygen docs: Fix problems in Evas_Canvas
- Put some methods in a group so they are accessible and can be linked to.
- Remove references to Efl_ methods, unavailable in Legacy.
- Incorrect param names and typos
2020-05-08 12:32:09 +02:00
Xavi Artigas 998dd2f616 doxygen docs: Put Eina XAttrs in their own group
To stop polluting the Eina Tools group.
2020-05-08 12:32:09 +02:00
Xavi Artigas 3cc754440e doxygen docs: Complete docs for Eina Thread 2020-05-08 12:32:09 +02:00
Xavi Artigas a80b1dca23 doxygen docs: Fix grouping mess in Eina Simple XML
Seriously, who came up with such convoluted doxygen code?
2020-05-08 12:32:09 +02:00
Xavi Artigas 78aa7a7467 doxygen docs: Complete docs for Eina Module
And fix yet another doxygen grouping mess
2020-05-08 12:32:09 +02:00
Xavi Artigas 2aae4a0c85 doxygen docs: Complete docs for Eina Log 2020-05-08 12:32:09 +02:00
Xavi Artigas 361aa83a17 doxygen docs: Complete docs for Eina CPU functions 2020-05-08 12:32:09 +02:00
Xavi Artigas 88d1c886bd doxygen docs: Complete docs for Eina_Rectangle 2020-05-08 12:32:09 +02:00
Shinwoo Kim 5f159ae624 evas: use SEQUENTIAL for decoding png file
Summary:
There was a mistake caused by "2a0eeba evas: fix png regression issue".

The flag is_for_data was close_file before this commit.
_evas_image_load_file_internal_head_png closes file if it is called only for
header. So the close_file does not mean is_for_data.

This patch is changing is_for_data to is_for_head, and make
_evas_image_load_file_internal_head_png use EINA_FILE_SEQUENTIAL
for data decoding.

Reviewers: Hermet, jsuya, herb, raster

Reviewed By: raster

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D11783
2020-05-08 19:26:46 +09:00
Mike Blumenkrantz 882e4cd50f tests/elm: add callback testing to image memfile test
Summary:
verify that ready is called (preload done) and error is not called

ref D11758

Reviewers: Hermet, jsuya, kimcinoo

Reviewed By: Hermet

Subscribers: stefan_schmidt, cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D11760
2020-05-08 10:45:27 +09:00
Stefan Schmidt 752725ea18 ci: travis: update Debian to 10.3 and Ubuntu to 20.04
Now that the ecore_con tes suite failure are fixed with a renewed ssl
certificate we can update these two distros as well.
2020-05-07 15:38:38 +02:00
Stefan Schmidt 3b835b57ff tests: ecore_con: renew test ssl certificate which expired in 2016
For our unit testing of ecore_con we have a sself-signed certificate for
localhost to do some of the tests. It expired in 2016 and this was not
really a problem so far. Starting from Debian 10 and Ubuntu 20.04 this
resulted in failures thought. Either the newer openssl version is more
strict or the config for Debian and Ubuntu is.

Anyway, time to generate a new one. Its valied until Sep 23 12:33:13
2024 GMT and I used the follwoing commands to generate the cert/key and
the second command to rmeove the key passphrase.

openssl req -x509 -newkey rsa:4096 -keyout server.key -out server.pem -days 1600 -subj '/CN=127.0.0.1'
openssl rsa -in server.key -out server2.key

Someone has to do this again in 4 years. if we stillhave this code
around.
2020-05-07 15:38:38 +02:00
Vincent Torri d135957ffa Use __func__ C99 identifier instead of __FUNCTION__ compiler extension
Summary: see http://www.open-std.org/JTC1/SC22/wg14/www/docs/n1124.pdf section 6.4.2.2 page 52

Test Plan: compilation

Reviewers: raster, devilhorns

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D11785
2020-05-07 09:27:07 -04:00
João Paulo Taylor Ienczak Zanette de939ca64b cxx: Initialize _list and _node with nullptr
Fixes CID 1409576 pointing that _node was unitialized.

Reviewed-by: Stefan Schmidt <stefan@datenfreihafen.org>
Reviewed-by: Felipe Magno de Almeida <felipe@expertisesolutions.com.br>
Differential Revision: https://phab.enlightenment.org/D11770
2020-05-07 12:09:35 +02:00
Shinwoo Kim 5801bc07f5 evas: fix png regression issue
Summary:
Accidentally commit "382c580 evas: add support for .9.png file to PNG loader."
adding the 9 patch feature with small code refactoring made use of setjmp
incorrectly.

[Problem]
evas_image_load_file_data_png calls _evas_image_load_file_internal_head_png,
and _evas_image_load_file_internal_head_png calls setjmp and returns without
problem. And png_read_row calls longjmp. This causes jumping into a function
which was exited. Problematic png file will be attached.

[Solution]
Save calling environment i.e. call setjmp, after returning from
_evas_image_load_file_internal_head_png.

Test Plan:
Problematic png file
{F3876983}

And example code.
{F3876986}

Reviewers: Hermet, jsuya, herb

Reviewed By: Hermet

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D11782
2020-05-07 12:15:02 +09:00
Hermet Park 98ff237fc1 canvas map: draw direct image as possible.
Since we moved to floating calculation for msaa, this comparsion
is not working for direct image drawing though it's doable.

To resolve this, we can compare floatings regardless of msaa enable.
2020-05-07 11:29:08 +09:00
Christopher Michael a70b811e8d ecore-evas-drm: Remove useless check for visibility
This is already checked above so having a second check here is just
silliness
2020-05-06 10:06:53 -04:00
Vincent Torri 8db62cb22b remove arguments of LOGFN in ecore_wayland modules as the are always the same
Reviewers: raster, devilhorns

Reviewed By: devilhorns

Subscribers: devilhorns, cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D11777
2020-05-06 09:18:31 -04:00
Stefan Schmidt 93663b6283 ci: travis: switch coverity build back to Fedora 31 image
While it builds there is a problem to pick up the analyzing units for
the scanner. My best guess is that gcc10 is to new and we need to wait
for the next cov-tools release before we can bump this.
2020-05-06 14:53:38 +02:00
Stefan Schmidt e890d3b221 travis: update asan build to Fedora 32
With the updated gcc to version 10 the AddressSanitizer plugin seems to
have switched the OneDefionitionRule to 2, which includes reports for
definitions with the same size.

https://github.com/google/sanitizers/wiki/AddressSanitizerOneDefinitionRuleViolation

In our case that breaks heavily due to our usage in eina_module:

==147526==ERROR: AddressSanitizer: odr-violation (0x7fca71b29300):
  [1] size=8 '__eina_module_shutdown' ../src/modules/ecore_imf/xim/ecore_imf_xim.c:821:1
  [2] size=8 '__eina_module_shutdown' ../src/modules/evas/engines/buffer/evas_engine.c:185:1

Disabeling it for our runs.
2020-05-06 14:53:38 +02:00
Ali Alzyod 287ec50203 edje_textblock: content_fit size_range update
Summary: update size range will skip empty font_sizes

Reviewers: woohyun, bowonryu

Reviewed By: woohyun

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D11507
2020-05-06 20:33:42 +09:00
Ali Alzyod 4447e10b63 edje_textblock: optimize priority handling for content_fit options
Summary: this patch will reduce amount of unnessesary calculations, if user set both font_size_array and size_range for content fit.

Reviewers: woohyun, bowonryu

Reviewed By: woohyun

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D11498
2020-05-06 20:30:15 +09:00
Ali Alzyod 4976097bd4 evas_textblock: clear paragraphs during markup_set
Summary: Clear paragraph during markup set, instead of waiting until next text layout to happen, this will release unused memory right away

Reviewers: woohyun, zmike, bu5hm4n, raster

Subscribers: raster, cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D11773
2020-05-06 10:40:37 +01:00
Stefan Schmidt 0cfbedca07 ci: travis: update more jobs to Fedora32 image
With the edje test suite problems resolved almost all jobs can be moved.
Mingw, exactness and asan need more testing and debugging.
2020-05-05 15:02:29 +02:00
Ali Alzyod d7ed1721b8 tests: edje: Fedora32 system fail resolve
This test seems to fail on Fedora32, we increase font size margin to
prevent it from happening

Reviewed-by: Stefan Schmidt <stefan@datenfreihafen.org>
Differential Revision: https://phab.enlightenment.org/D11776
2020-05-05 14:56:53 +02:00
Stefan Schmidt 10b0f9b433 ci: travis: update first few jobs to Fedora32
The rest stays on 31 right now until we worked out some remaining
problems in test suites, asan, etc.
2020-05-05 13:50:53 +02:00
Stefan Schmidt e1c26157f4 ecore_drm: ensure we have the symbol available at the right place.
Summary:
Linking under Fedora32 toolchain got more picky. Ecore_drm_device.c
needs the symbol so make sure we have it there.

Reviewers: devilhorns, raster

Reviewed By: raster

Subscribers: raster, cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D11772
2020-05-05 11:29:19 +01:00
Marcel Hollerbach 2830d1c6fa exactness_player: do not test for delay_ms
that is a unsigned int, if its 0 the timer is called as fast as
possible. Not doing that breaks exactness.

@fix

Reviewed-by: Stefan Schmidt <stefan@datenfreihafen.org>
Differential Revision: https://phab.enlightenment.org/D11774
2020-05-05 11:08:47 +02:00
Ali Alzyod 3dff471826 evas_textblock: optimize calculate main format once in layout setup stage
Summary:
This change based on discussion on D9533 , where @smohanty example shows that unnecessary calculation happened on textblock related to lay-outing

Where now _layout_setup will not calculate main format using (_format_fill) unless style has been changed.

expedite commit:
https://git.enlightenment.org/tools/expedite.git/commit/?id=dc6c931dc2e6c240d3e240f24578980c689ab7fc
src/bin/textblock_text_fill_format.c

Test Plan:
```
#define EFL_EO_API_SUPPORT 1
#define EFL_BETA_API_SUPPORT 1
#include <Eina.h>
#include <Efl.h>
#include <Elementary.h>

EAPI_MAIN int
elm_main(int argc, char **argv)
{
   Evas_Object *win, *textblock;

   elm_policy_set(ELM_POLICY_QUIT, ELM_POLICY_QUIT_LAST_WINDOW_CLOSED);

   win = elm_win_util_standard_add("Main", "App");
   elm_win_autodel_set(win, EINA_TRUE);

   int l, r, t, b;
   textblock = evas_object_textblock_add(evas_object_evas_get(win));

   Evas_Textblock_Style *st = evas_textblock_style_new();
   evas_textblock_style_set (st, "DEFAULT='font=Sans font_size=10 color=#000000 wrap=word align=left outline_color=#000 shadow_color=#fff8 shadow_color=#0002 glow2_color=#fe87 glow_color=#f214 underline_color=#00f linesize=40'");
   evas_object_textblock_style_set(textblock, st);
   int sizes[] = {600, 700};
   evas_object_textblock_text_markup_set(textblock, "This test resize text block and keep style (style parsed only once)");
   clock_t start, end;
   start = clock();
   for (int i = 0; i < 10000; i++)
   {
      evas_object_resize(textblock, sizes[i % 2], sizes[i % 2]);
      evas_object_textblock_style_insets_get(textblock, &l, &r, &t, &b);
   }
   end = clock();
   double total_Time1 = ((double)(end - start)) / CLOCKS_PER_SEC;
   printf("total time = %f\n", total_Time1);

   evas_object_size_hint_weight_set(textblock, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
   evas_object_size_hint_align_set(textblock, EVAS_HINT_FILL, EVAS_HINT_FILL);
   evas_object_show(textblock);

   evas_object_move(textblock, 0, 0);
   evas_object_resize(textblock, 640, 800);
   evas_object_resize(win, 640, 800);

   evas_object_show(win);
   elm_run();

   return 0;
}
ELM_MAIN()

```

**Old  Code output : total time = 0.096900
New Code output : total time = 0.045580**

Reviewers: smohanty, woohyun, Hermet, bowonryu, cedric, bu5hm4n, zmike

Reviewed By: zmike

Subscribers: zmike, segfaultxavi, bu5hm4n, smohanty, cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9536
2020-05-04 15:25:07 -04:00
Vincent Torri 3c619b96fc remove arguments of LOGFN in ecre_x and ecore_wayland as the are always the same
Reviewers: raster

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D11769
2020-05-04 15:15:07 +01:00
Stefan Schmidt 0169536444 examples: cxx: remove forced warning on unfinished APIs
Personally I find it quite annoying to have these in every build.
Especially if they have not been attempted to get fixed even after we
started to stabilize some part of the unified API.

Reviewed-by: Felipe Magno de Almeida <felipe@expertisesolutions.com.br>
Differential Revision: https://phab.enlightenment.org/D11763
2020-05-04 14:33:07 +02:00
Carsten Haitzler bf2538897b ecore_evas_x - fix maximize/unmaximize request corner case
state was not managed well.. this will fix that. also a test in
elementary for it to you can test it out.

@fix
2020-05-03 15:36:00 +01:00
Christopher Michael 09df69a3eb ecore-buffer: Fix formatting
NB: No functional changes
2020-05-02 14:51:41 -04:00
Christopher Michael 7c1c09f3ed ecore-drm2: Add support for using page_flip_handler2
In our current Ecore_Drm2_Context structure, we are missing support
for using page_flip_handler2. This patch adds that ability. This could
prove useful when working with ecore_drm2 as it allows
page_flip_handler callbacks to setup a handler for page_flip_handler2,
which when the callback gets received, passes back the crtc_id which
the pageflip occured on.

@feature
2020-05-01 10:29:45 -04:00
Carsten Haitzler b2a2ba39af edje - don't set font sizes less than 1
this makes evas unhappy and results in noise.

@fix
2020-05-01 12:50:53 +01:00
Carsten Haitzler 36dbaa707c build - remove useless header checks for uv.h
we check for uv.h - but never do anything with it. this is configure
noise that just confuses people into thinking we might do something.
we still have dead libuv support but it's enabled with HAVE_LIBUV and
we'd need to link to libuv too... which we don't do and we don't enable
this. removing libuv supporrt entirely is a totally different question
to raise. this here is just removing noise.
2020-05-01 00:07:12 +01:00
Stefan Schmidt ec8cd0fc8b exactness: remove no longer needed _evas_new()
This has been unused since the move to a preloaded lib and now makes
trouble durign compilation on Fedora32.

@fix

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D11767
2020-04-30 17:19:06 +02:00