Commit Graph

3790 Commits

Author SHA1 Message Date
Christopher Michael 9fbe26998b ecore_evas_wayland: Do not pass negative parameter to close function
Coverity reports that 'fd' here is negative, and close() cannot accept
a negative parameter, so add a check to make sure 'fd' is not negative
before passing to close function.

Fixes CID1420318
2020-03-30 14:34:41 -04:00
Christopher Michael dc7283eb14 ecore_evas_wayland: Declare variables at top of function 2020-03-30 14:33:23 -04:00
Vincent Torri e0f5e80f78 fix segfault when there is no text in clipboard
Test Plan: cnp a clipboard content without text

Reviewers: zmike

Reviewed By: zmike

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D11565
2020-03-26 10:47:34 -04:00
Hermet Park 476e2b0521 canvas 3d: remove all canvas3d features across efl.
Reviewers: jsuya, kimcinoo, bu5hm4n, raster

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D11552
2020-03-25 19:14:02 +09:00
Carsten Haitzler e1e7272d89 ecore evas cnp x - fix nul byte extras when text pasting to other apps
i was seeing junk bytes in pastes to chromium... it was an extra nul
byte. this will special-case nuke that.
2020-03-22 18:39:54 +00:00
Carsten Haitzler 60f8495d80 ecore evas x - on argb dont create unused 1 bit pixmap masks
found out we had a wasted 1 bit pixmap mask for argb windows left over
from shaped window support... so don't create it. drop resources a bit.

@fix
2020-03-17 09:50:49 +00:00
Shinwoo Kim a89a2ef1de evas.image: add evas_object_image_animated_frame_get
this adds an api for getting the current frame of an animation

Differential Revision: https://phab.enlightenment.org/D11455
2020-03-10 13:31:19 -04:00
Christopher Michael 8009817d07 ecore-evas-wayland: Check for valid 'fd' before passing to write()
write() cannot be passed a negative value. If
ecore_main_fd_handler_fd_get returns -1, then this is an issue. Check
for valid fd being returned from fd_handler_fd_get and if it is
negative, then cleanup and get out.

Fixes CID1420318
2020-03-10 10:31:46 -04:00
Christopher Michael be87c4a0c2 ecore-evas-wayland: Fix resource leak
If we are going to be exiting this function without setting up the
ecore_main_fd_handler (and thus passing forign_slice), then we should
free forign_slice as it was previously calloc'd above.

Fixes CID1420322
2020-03-10 10:28:01 -04:00
Ali Alzyod 794792aacb evas_gl_font: free data paths if alloca fails
Reviewers: Hermet, woohyun, bu5hm4n, zmike

Reviewed By: Hermet

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D11473
2020-03-10 11:42:31 +09:00
Marcel Hollerbach b97c051e6f ecore_evas_x: fix memory leak when enter drag and drop, without a ee
this is something that can *never* happen otherwise we would have never
got this call. But lets make coverity happy.
2020-03-09 17:10:40 +01:00
Marcel Hollerbach 6524b0a155 ecore_evas_x: correctly handle images in X11
I thought that i explicitly tested this. However, it seems i was wrong,
this way now this is handled correctly, and the image is stored and
coverted to a path.

With this you can now copy images from chromium and firefox to elm apps.

The change in elm_entry reverts parts of the rewrite of the elm
handling, as initially every path came *without* "file://" in front, so
we have to maintain that.

fixes T8625
2020-03-09 17:10:39 +01:00
Carsten Haitzler 075bab83c4 remove vlc, gst-0.10, xine deps, modules as they are broken
they dont work. easier to remove than fix, so... remove :) only gst
1.x supported now.
2020-03-08 12:36:01 +00:00
Marcel Hollerbach 0dcbc26a5a ecore_evas_x: honor forign dnd implementations
enlightenment does not use the elm dnd operation implementations.
Therefore we have to ensure that we only handle these operations here,
when ecore_evas dnd API is used.
2020-03-08 12:29:41 +01:00
Hermet Park b2bd0c548f evas gl: clip rect with proper size.
gc width/height indicates the main output size,
if the target surface(fbo) is larger than this, rect won't be drawn.

We should clip this with current context size.

@fix
2020-03-08 20:20:43 +09:00
Xavi Artigas 7a79e15ea3 ecore_evas: Use EFL naming convention in cnp & dnd methods
Some methods were missing the "Drag" or "Selection" namespaces or the _Cb suffix.
Depends on D11219

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Differential Revision: https://phab.enlightenment.org/D11426
2020-03-08 11:01:24 +01:00
Xavi Artigas 645c3d41eb docs: Strengthen docs for Copy&Paste and Drag&Drop
Including Eina.Content

And a typo/bugfix in ecore_evas_x.

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Differential Revision: https://phab.enlightenment.org/D11204
2020-03-08 11:01:18 +01:00
Marcel Hollerbach 7dd92a2d98 port cnp on Windows
Test Plan: Ctrl-c and Ctrl-Vworking

Reviewers: raster, zmike

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D11439
2020-03-08 11:01:15 +01:00
Marcel Hollerbach c731cf56d5 ecore_evas: Introduce cnp support for cocoa
with this commit you can do limited cnp for cocoa. You still cannot copy
and paste pictures or markup arround, only text is supported so far.
However, text on its own works quite stable and good.

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Differential Revision: https://phab.enlightenment.org/D11351
2020-03-08 10:59:46 +01:00
Marcel Hollerbach 5ac02ec9ac ecore_evas: introduce wayland support for cnp & dnd
This adds cnp support, actions are right now only mapped to "ask",
further support can be added there, and synchronization can be added to
register more available actions. However, i did not find *any* wayland
implementation in gtk qt nor chromiumos that even use the action to
indicate anything. This here also has a slightly different behaviour to
X11 in terms of coordinates for motion,leave,enter. They can contain
negative coordinates (which is due to the fact that wl is CSD and X11 is
SSD. However, I did not want to fix this in any regard, as you might
want to use that, and it would be a none trivial amount of code to fix
that.

Reviewed-by: Chris Michael <cp.michael@samsung.com>
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Differential Revision: https://phab.enlightenment.org/D11329
2020-03-08 10:59:37 +01:00
Marcel Hollerbach e0c40abb40 ecore_evas: introduce initial selection & dnd support for x.
Seats are not implemented, if there is a type mismatch promises are
going to be rejected. Most of this code is copied over from
selection_manager.

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Differential Revision: https://phab.enlightenment.org/D11195
2020-03-08 10:59:34 +01:00
Marcel Hollerbach 39f3ce42dc ecore_evas: Introduce cnp / dnd API for ecore evas
The idea of copy and paste here is:
- The user specifies the content he wants to have in the selection
  buffer with a Eina_Content, these content pointer ownerships are
  passed to the called. Internally ecore_evas code will memorieze the
  pointer, and pass on function callbacks to the modules, which then do
  not have to deal with the ownership.

- In case the module does not specify these APIs, the callback
  implementation will be called, which only works for cnp *not* dnd.

- Action and mime types are handled as strings, which allows way better
  custom organisations.

(The docs needs improvement)

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Differential Revision: https://phab.enlightenment.org/D11192
2020-03-08 10:59:25 +01:00
Christopher Michael 0bf6f5bbe4 evas_gl_drm: Fix incorrect define statement.
This actually should be #ifndef so that if it's not defined in the
system, then we can still compile properly.
2020-03-06 11:46:33 -05:00
junsu choi 62039e6199 evas_model_load_ply: Prevent memory leak
Summary:
If use ein_str_split, have to free the first element of the array
and free the array.

Test Plan: N/A

Reviewers: Hermet, YOhoho, bu5hm4n, zmike

Reviewed By: zmike

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D11419
2020-02-27 09:55:37 +09:00
Stefan Schmidt 8ff8aa3076 evas: software_engine: free allocation on error path
When we allocated s but fail to allocate l we need to make sure to free
the first allocation before erroring out.

CID: 1419874

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Differential Revision: https://phab.enlightenment.org/D11409
2020-02-25 16:43:25 +01:00
Mike Blumenkrantz dc14257c96 Revert "evas: remove image_load from the engine."
Summary:
This reverts commit 867d826395.
Depends on D11337

Reviewers: raster

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D11338
2020-02-14 08:33:32 -05:00
Mike Blumenkrantz be3915cc90 Revert "evas: remove unused fonction evas_gl_common_image_load."
Summary:
This reverts commit fc7e244e99.
Depends on D11336

Reviewers: raster

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D11337
2020-02-14 08:33:26 -05:00
Marcel Hollerbach 0c77cee3ab evas_model_loader: fix 8f3bef248b
The commit fixed a mem leak with freeing one element in the array, which
was never going to work, as only the array is a pointer you can
allocate.

This could have been discovered by simply running ninja test.
2020-02-14 09:01:10 +01:00
Hermet Park 8f3bef248b canvas model_loaders: fix memory leak in ply loader.
eina_str_split() newly allocate memory to return,
caller must take over its resource free..
2020-02-14 13:51:46 +09:00
Hermet Park 570a4c94ad image loaders pmaps: decide data size at the compile time. 2020-02-14 13:42:43 +09:00
Hermet Park 63d1b32e62 canvas engine: + null check for safety 2020-02-14 13:39:17 +09:00
Hermet Park e64f45a889 gl image: free the resource properly at the corner case. 2020-02-14 13:27:11 +09:00
junsu choi fcdf523b98 software_evas_engine: Remove unnecessary member for ector_surface_set
Summary:
The clear of the Evas_Thread_Command_Ector_Surface structure is an unmanaged variable.
When ector calls _draw_thread_ector_surface_set and it checks the clear value.
the clear value is garbage value. This can cause the pixels to fail to initialize.
This is why afterimages remain after updating shapes while using ector surfaces.

Test Plan:
./build/src/examples/evas/efl-canvas-vg-simple
1 - Basic Shape test
Scale up 's' or do something

Reviewers: Hermet, smohanty, kimcinoo

Reviewed By: Hermet

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D11278
2020-02-05 10:47:15 +09:00
Shinwoo Kim e0b4ddaeb8 evas filter: fix crash issue
Summary:
If image object geometry is same with image size, then a crash occurs on both
GL and SW engine.

[Test Code]
evas_object_image_size_get(img, &w, &h);
evas_object_resize(img, w, h);

[GL engine]
eng_ector_buffer_wrap should use output instead of engine for calling
evas_ector_buffer_engine_image, because it expects the output not the engine.

[SW engine]
eng_ector_buffer_wrap should check if im->image.data is NULL because
_evas_ector_software_buffer_evas_ector_buffer_engine_image_set returns before
calling evas_cache_iamge_ref if im->image.data is NULL, and it causes
a segmentation fault finally with following backtrace.

(#0) evas_cache_image_drop (im=0x0)
(#1) _evas_ector_software_buffer_efl_object_destructor
(#2) efl_destructor
(#3) _efl_del_internal
(#4) _efl_unref_internal
(#5) _efl_add_internal_end
(#6) _efl_add_end
(#7) eng_ector_buffer_wrap

Test Plan: {F3841366}

Reviewers: Hermet, jsuya

Reviewed By: Hermet

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D11258
2020-01-31 21:35:18 +09:00
Shinwoo Kim 1dc6ccfba0 Efl.Canvas.Group: make mask filter work on GL engine
Summary:
The _gl_filter_mask defines value of gc->dc->clip.mask, and make_color but
those are not used at all, because the evas_gl_common_Filter_blend_push calls
evas_gl_common_context_image_push which doesn't care of those values.

So this patch is using evas_gl_common_image_draw to use mask and mask_color.

Test Plan:
[Filter Program]
efl_gfx_filter_program_set(text,
     "buffer:a(alpha); buffer:fat(alpha); buffer:rgbfat(rgba);
      curve (0:255-255:0, dst = a); blend (a, color = #00ca00ff);
      grow (1, dst = fat); blur (3, src = fat, color=#0000b9ff, ox = -2, oy = -2, dst = rgbfat);
      mask (a, src = rgbfat);padding_set(t=5);",
     "name");

[Before]
{F3835430}

[After]
{F3835431}

Reviewers: Hermet, jsuya

Reviewed By: Hermet

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D11139
2020-01-31 18:31:31 +09:00
Carsten Haitzler de4a698c96 elm win + ecore evas - fix csd stuff like base size and min sizing
this fixes a lot that was broken with csd... but not everything.

@fix
2020-01-18 00:14:58 +00:00
Hermet Park f6f67d60f3 evas ector: ++safety.
add return value by ector_begin() for vector safety.
2020-01-09 15:01:47 +09:00
Carsten Haitzler e18af750f3 gl native surf - create pixmap failes - make them warns
these can be race conditions so really should be warns and not errors.
they just are noise we'll never fix as it's racey anyway...
2020-01-03 18:22:28 +00:00
Boris Faure a2afcfc872 evas: fix compilation with -Dwl=false
Reviewed-by: Chris Michael <cp.michael@samsung.com>
Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D10994
2020-01-02 12:41:16 +01:00
Hermet Park 745eea61b0 evas gl: enable GL_LINE_SMOOTH only at gles 1.x
As the GLES specification,
GL_LINE_SMOOTH is not supported since GLES2.
2019-12-31 16:31:09 +09:00
Stefan Schmidt 0f52bbb00e ecore_evas: add double header include safety
Reported-By: https://lgtm.com/projects/g/Enlightenment/efl
Reviewed-by: Chris Michael <cp.michael@samsung.com>
Differential Revision: https://phab.enlightenment.org/D10887
2019-12-17 09:59:44 +01:00
Stefan Schmidt 5888c7ee00 eeze: remove tizen module support from eeze sensor
This has been disabled since the move to meson and unlikely to have
built before with autotools either. Tizen never adopted this so we can
ease our maintenance burden here.

The Eeze sensor API itself is EAPI sadly and can't be removed. We will
keep the udev backend (temperature only) and the fake backend for
testing for now.

Signed-off-by: Stefan Schmidt <s.schmidt@samsung.com>
Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D10805
2019-12-11 13:46:31 +01:00
Carsten Haitzler 19f6be78c4 imf - make xim+scim the defaults not xim+ibus due to ibus being broken
at leats ibus seems to just not work for me on arch at least  - even
with gtk apps, but scim does, so maybe make scim the main thing again?
also allows glib to be off by default. :)
2019-12-06 20:56:07 +00:00
junsu choi 062782d470 evas vg: remove build warning
Remove parameter already deleted
2019-12-06 15:58:35 +09:00
Hermet Park 19ef155526 vg ector: Call a pair of ector begin/end for ector buffer drawing.
While we render vector drawing on ector,it uses ector buffers for subsequent compositions.
In this sequence, it switches ector buffer with a composition target,
while resuing the global ector context.

Previously, it trickly switched ector buffer, it broke the ector begin/end pair.
Now, it needs to recover global ector buffer once the composition finished.
Thus ector buffer need to return the current pixels information for this.
2019-12-06 15:31:30 +09:00
Stefan Schmidt b8dc80c144 emotion & evas: remove gstreamer 0.10 support
We have Gstreamer 1.x support for a long time already. We used to keep
this around as fallback. By now Linux distributions start to actually no
longer ship the Gstreamer 0.10.x packages and upstream has not seen a
release in in 5 years. Time to remove it on our side as well.

Signed-off-by: Stefan Schmidt <s.schmidt@samsung.com>
Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D10779
2019-12-04 12:21:25 -08:00
Hermet Park ce30a952b2 vector json: checking valid pointer before accessing it. 2019-11-21 17:28:54 +09:00
Hermet Park 618bce8038 evas vg: improve caching methods for better precise behaviors.
Previously, json file data won't be shared between instances.
Now, objects can share the json data if they use the same file resource.
2019-11-18 13:08:29 +09:00
Stefan Schmidt f6b066df2a gl_drm: remove dead return statement
Summary:
This return can never be reached in this function.

CID: 1402607
Depends on D10682

Reviewers: raster, devilhorns

Reviewed By: devilhorns

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D10683
2019-11-15 11:56:56 -05:00
junsu choi f4fa719eae wl_egl : Prevent access to NULL pointer
Summary: The pointer s can be null.

Test Plan: N/A

Reviewers: Jaehyun_Cho, raster

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D10654
2019-11-13 13:42:16 +09:00
junsu choi ddaa5d1e6e vg_loader: Get markers information form json data.
Summary: If json data has marker information, it is stored in vg file data.

Test Plan: N/A

Reviewers: Hermet, smohanty, kimcinoo

Reviewed By: Hermet

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D10504
2019-11-12 14:28:44 +09:00
Shinwoo Kim 97f5894972 evas_filter: remove shader compile error
Summary:
When grayscale fillter works there is a compile error:
implicit cast from "float" to "vec3"

Test Plan:
1. Create filter_example with following .
efl_gfx_filter_program_set(image, "grayscale ()", "grayscale");

2. Run.
ELM_ACCEL=gl ./filter_example

Reviewers: Hermet, jsuya

Reviewed By: Hermet

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D10595
2019-11-12 10:08:39 +09:00
Christopher Michael 2fe6d59321 evas-wayland-common: Move boolean fields to bottom of structure 2019-11-05 09:36:20 -05:00
Christopher Michael 9eb745a3c1 evas-wayland-common: Fix variable type
The 'resizing' variable here does not need to be an 'int' as it's
either true or false, so change to be Eina_Bool.
2019-11-05 09:36:20 -05:00
Christopher Michael ec1ce2b15d evas-wayland-common: Add include for ecore_wl2 internal functions 2019-11-05 09:36:20 -05:00
Christopher Michael b6b7d2d61f ecore-wl2-dmabuf: Add include for internal functions 2019-11-05 09:08:23 -05:00
Shinwoo Kim 51169ac325 evas filter: Implement inverse color filter
Summary: This is the first version of inverse color filter both GL and SW.

Test Plan:
1. Create filter_example with following .
efl_gfx_filter_program_set(image, "inverse_color ()", "inverse color");

2. Run.
./filter_example (Use ELM_ACCEL=gl for GL engine)

Reviewers: Hermet, jsuya

Reviewed By: Hermet

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D10335
2019-11-05 10:45:14 +09:00
Cedric BAIL 313796a4f6 eina: introduce a simple malloc near implementation for Chained Mempool.
This actually seems to significantly and reliably improve speed result with
expedite in a higher way than I expected (~10%) which is neat, I guess.

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Differential Revision: https://phab.enlightenment.org/D10537
2019-10-30 08:14:29 -07:00
Cedric BAIL fb5cf01977 eina: introduce an API for requesting memory near already allocated memory from an Eina_Mempool.
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Differential Revision: https://phab.enlightenment.org/D10535
2019-10-30 08:14:27 -07:00
Cedric BAIL 1f445dd12d eina: change default policy of Chained Mempool to recycle memory right away.
Until now, Chained Mempool would first empty its pool and the started to
recycle memory. Now it does always try to recycle first. This should limit
memory fragmentation to some extend.

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Differential Revision: https://phab.enlightenment.org/D10534
2019-10-30 08:14:26 -07:00
Marcel Hollerbach 28f630ba41 meson: redo evas building
Summary:
before recent times we had to support static and shared building based
on the options of the user, which forced us to complicate our build with
the evas_goal hack. the evas_goal hack more or less was the idea of
"faking" the evas build in the evas directory, finish all the .eo
generation there, then build the modules and make all the static files
ready. Then build everything in evas_goal.

Now, that we just build everything the same always, we can simply build
it in the evas way (removing the evas_goal hack FINALLY), as the same modules
are build statically and shared.
This also gives us the possibility to build the shared image loaders
*again* the the modules directory, which unbreaks peoples build scripts
who packaged loader files seperatly.

Reviewers: zmike, raster, cedric, stefan_schmidt

Reviewed By: zmike

Subscribers: #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D10548
2019-10-29 12:54:56 -04:00
junsu choi cf61adaff1 vg_common_svg: Free node tree for memory leak after eet write.
Summary:
The node tree created from vg_common_svg_create_svg_node is not used after eet_data_write().
Therefore, to prevent memory leaks, free the node tree.

Test Plan: N/A

Reviewers: Hermet, smohanty, kimcinoo

Reviewed By: Hermet

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D10443
2019-10-29 13:17:06 +09:00
Christopher Michael dedeb77b02 ecore-evas-wayland: Minor formatting fixes
NB: No functional changes
2019-10-22 10:59:29 -04:00
Christopher Michael 68b107ff59 ecore_evas_wayland: Fix array step size
Fix bug where eina_array step size was being increased by 10 everytime
a handler was pushed to the array. There is no need to increase array
size by 10 each time we add 1 pointer to handler.

@fix
2019-10-22 10:12:51 -04:00
Christopher Michael f7fdb9c7f6 ecore-evas-wayland: Add handler to array
Small patch to fix bug where last event handler was not being added to
the event_hdls array

@fix
2019-10-22 10:11:24 -04:00
Christopher Michael 520b844f4a ecore-evas-wayland: Minor formatting fix
NB: No functional changes
2019-10-22 10:06:23 -04:00
Christopher Michael ea2b24b182 ecore-evas-wayland: Minor formatting fix
NB: No functional changes
2019-10-22 10:04:01 -04:00
Mike Blumenkrantz 7a122db342 efl/engines: fix null derefs
Summary: CIDs 1402640, 1402709

Reviewers: cedric

Reviewed By: cedric

Subscribers: #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D10448
2019-10-18 13:29:44 -04:00
Mike Blumenkrantz ebcafd4249 evas_vg/svg: fix null deref
Summary: CID 1405672

Reviewers: cedric

Reviewed By: cedric

Subscribers: #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D10446
2019-10-18 13:29:38 -04:00
Carsten Haitzler db7348acf3 wl egl - use platform get display
if possible, use the platform specific egl get display as a wl egl
client. this fixes client side init with ... some drivers that can't
auto-detect the display type passed in.

@fix
2019-10-18 12:51:36 +01:00
Hermet Park fbe554037b vector json: use lottie apis case by case.
We can request loading from data only in case of actual memory map.
The lottie-player would take care of the parsing on utf8/16/32 formats
more precisely so that we don't need to take care of this converting
from the memory.
2019-10-15 15:06:48 +09:00
Carsten Haitzler ca32732373 ecore_evas/wl2 0 fux xdg close cb for window when it's closed remotely
this should fix this:

https://matrix.org/_matrix/media/r0/download/matrix.org/lhFneENlWAjuXDaJfSYuJjjJ

unfortunately this means adding an api and then using it in ecore_evas.

@fix
2019-10-14 22:58:27 +01:00
Shinwoo Kim 431d62d095 evas filter: Implement grayscale filter in SW
Summary: Initial version implementing grayscale filter in SW.

Test Plan:
1. Create filter_example with following.
efl_gfx_filter_program_set(image, "grayscale ()", "grayscale");

1. Run.
./filter_example

Reviewers: Hermet, jsuya

Reviewed By: Hermet

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D10219
2019-10-14 11:13:40 +09:00
Shinwoo Kim ba09a8101b evas_image: fix memory leak
Summary:
On the sw engine, an im could be changed and removed by evas_cache_image_size_set.
In this case, there is no chance to free its resource and ends up in memory leak.

Reviewers: Hermet, raster, jsuya, cedric

Reviewed By: cedric

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D10334
2019-10-14 11:10:18 +09:00
Carsten Haitzler 0f3bbb51f4 build - images loaders and saver modules need to link to evas
if your platform is picky enough it won't want to leave unresolved
symbols (which wshould be resovled at runtime from the host lib) so we
need to link these modules to evas. the problem is due to the
complicated build of some modules being static and some shared, evas
is declared with evas_goal and this has to be declared after static
modules are declared but since i was declaring static and shared at
the same time from a table this breaks. so i have to move all the
static and shared module stuff into evas_goal into 2 phases. one phase
for the static and one for the shared after evas is delcared so evas
as a target exists to link to.
2019-10-05 18:39:38 +01:00
Carsten Haitzler 9371cdfef8 build - bring back loaders and savers as modules and/or static
so the evas modules able to be static or not was a bit pointless as it
could inline all evas modules (or none) not just the most common or
not, but ecore evas modules were still modules, so it really wasn't
being useful.

image loaders ans savers omn the other hand were *ALL* being
statically built in without exception. this was kind of a regression
in the build system in the move to meson. some were static due to
micro optimizations and performance inlining the most common to save a
little extra loading + linking + page fragmentation for loaders you
are likely to need in most cases as well as save the drity pages from
linking in their dependencies (libgif, libtiff, libwebp and all their
dependencies too etc. etc.). this now brings back the ability to
decide which are static and which are shared modules (not exposed to
the user as options for meson - fixed in meson.build files which i
think is good enough given the purpose of this).
2019-10-05 13:21:02 +01:00
Carsten Haitzler 6d8e39a642 build - remove evas-modules option as its rather pointless
evas-modules affects evas engine modules if they are static or shared,
but ecore evas modules are still modules... so all in all this doesnt
help much as it still requires modules to be separate from the shared
libs, thus disallowing for statically linking efl into an app anyway
etc. etc. etc. ... so less options to deal with, less complexity.
better.
2019-10-04 13:33:42 +01:00
Carsten Haitzler 13ecc4898c evas - gl_drm - handle modifiers for drm formats
this was/is breaking e on rpi4 as modifiers are used to pass tiling
info it seems. we had no support thus leaving garbage in buffers. this
fixes that.
2019-09-30 22:07:21 +01:00
Shinwoo Kim 081e318d90 evas filter: Implement grayscale filter in pure GL
Summary:
Initial version implementing grayscale filter in pure GL.
This patch needs a logt of love as 5bce712 did.

Grasyscale formula:
https://www.tutorialspoint.com/dip/grayscale_to_rgb_conversion.htm

Test Plan:
1. Create filter_example with following .
efl_gfx_filter_program_set(image, "grayscale ()", "grayscale");

2. Run.
ELM_ACCEL=gl ./filter_example

Reviewers: Hermet, jsuya

Subscribers: ali.alzyod, cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9858
2019-09-27 15:35:03 +09:00
Mike Blumenkrantz fddc27ed40 ecore-evas/x: detect and track wm existence, apply visibility correctly
Summary:
this attempts to monitor the _NET_SUPPORTING_WM_CHECK atom to verify whether
a wm exists, and bypasses waiting for a configure event from a nonexistent wm
if the screen is not currently managed

fix T7838

Depends on D10014

Reviewers: devilhorns

Reviewed By: devilhorns

Subscribers: devilhorns, thierry1970, cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T7838

Differential Revision: https://phab.enlightenment.org/D9900
2019-09-26 11:22:44 -04:00
Carsten Haitzler 88888a00a6 osx - require full opengl for gl support on osx
the default still is gl-es as documented. you need to explicitly turn
on full opengl to get gl support on osx because thats all the engine
does. document this exception for osx (having gl magically being full
on osx and gle-es elsewhere is another option but then we need
different os specific defaults for this which is kind of bad in other
ways).
2019-09-23 21:22:22 +01:00
Hermet Park eb2c1311ae ector engine: +null checking.
Null pixels is allowed when drawing region is 0,

In that case, the pixel buffer can be destroyed earlier by vg.

@fix
2019-09-23 21:15:28 +09:00
Cedric Bail 9382bfc0bc eina: add eina_mempool_iterator_new to slowly iterate every allocated pointer in a mempool.
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Differential Revision: https://phab.enlightenment.org/D9941
2019-09-19 14:37:41 -07:00
Hermet Park cdfe946358 evas gl: remove unnecessary null check.
If we check reference validation, the rest of other usage
should keep the reference check as well.

Remove it since gl prorgram must be valid always here
to shutdown the static analyzer reporting this suspicous logic.
2019-09-19 13:42:22 +09:00
Cedric Bail 4ab4b59757 eina: fix free support in eina OneBig mempool.
We use an Eina_Trash to store freed pointer, which require the item size
to be at least the size of a pointer. There wasn't any test suite enable
for OneBig mempool and we never used free on a small item size...

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Differential Revision: https://phab.enlightenment.org/D9939
2019-09-17 10:24:05 -07:00
Cedric Bail 2064112684 eina: fix eina_mempool_from to not report pointer that have never been allocated as allocated.
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Differential Revision: https://phab.enlightenment.org/D9938
2019-09-17 10:24:03 -07:00
junsu choi 3932c68382 evas_vg_load_svg: Change strtod to eina_convert_strtod_c for locale issue
Summary:
Crash depending on LOCALE when using strtod.
So change to eina_convert_strtod_c which is made to prevent strtod problem.

Test Plan: N/A

Reviewers: Hermet, smohanty, kimcinoo

Reviewed By: Hermet

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9988
2019-09-17 21:18:47 +09:00
Boris Faure 511faf3cbf meson.build: allow to disable tiff evas loader
Summary:
@fix

eina benchmarks: ssize_t is defined in <sys/types.h>

Reviewers: #reviewers, bu5hm4n, zmike, stefan_schmidt

Reviewed By: zmike

Subscribers: vtorri, cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9927
2019-09-13 11:26:19 -04:00
Marcel Hollerbach 2801b45d8f meson: make sure evas buffer engine is built before edje_cc
Summary:
ensure that the evas buffer engine is available.

fix T8220

Reviewers: zmike

Reviewed By: zmike

Subscribers: zmike, cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T8220

Differential Revision: https://phab.enlightenment.org/D9918
2019-09-12 14:45:47 -04:00
Hermet Park dc0056ca93 ector: removed cairo backend.
For reducing maintainability burden,
We drop supporting cairo backend.

The default backend is to software implementation from now.
It's well maintained so far and works good.x
2019-09-11 13:14:56 +09:00
Carsten Haitzler d1c5e201be fix xpm again - to be threaded not region decode capable 2019-09-06 15:42:47 +01:00
Carsten Haitzler 5e1f2cd68c fix xpm loader to be threadable - fixes so much stuff...
fixes ylee's xpm loading issue... it really is just that xpm's didn't
load if you preload/load from a thread... because it wass the only
loader that claimed it couldnt be threaded... which it can be.

@fix
2019-09-06 14:19:31 +01:00
Carsten Haitzler 44a0a6f7c8 evas -gl engines - buffer age - bring back fix for changing buffer age
so we USED to... if buffer age changed between frames, force a full
redraw and add that to the pipeline... somehow someone removed that.
this brings that back as it's really needed to deal with updating
correctly.

@fix
2019-08-29 17:35:02 +01:00
Vincent Torri 9336e2c51c Ecore : does not build linux-only ecore modules on Windows
while tizen module is disabled and systemd is not build on Windows, upower is built and run

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D9658
2019-08-21 11:18:48 -07:00
junsu choi e850e3e5dc evas_vg_load_svg: Support "display" attribute.
Summary:
If the display attribute is "none", VG object is not show.
The default is "inline" which means visible and "none" means invisible.

Depending on the type of node, additional functionality may be required.
refer to https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/display

Test Plan:
[SVG]
<svg viewBox="0 0 220 100" xmlns="http://www.w3.org/2000/svg">
  <!-- Here the yellow rectangle is displayed -->
  <g display="none">
    <rect x="0" y="0" width="100" height="100" fill="skyblue"></rect>
  </g>
  <rect x="20" y="20" width="60" height="60" fill="yellow"></rect>

  <!-- Here the yellow rectangle is not displayed -->
  <rect x="120" y="0" width="100" height="100" fill="skyblue"></rect>
  <rect x="140" y="20" width="60" height="60" fill="yellow" display="none"></rect>
</svg>

[C CODE]
int main(int argc, char **argv)
{
   setenv("ECTOR_BACKEND", "default", 1);
   elm_init(argc, argv);

   Evas_Object *win = elm_win_util_standard_add(NULL, "test");
   evas_object_smart_callback_add(win, "delete,request", win_del, 0);
   elm_win_autodel_set(win, 1);

   Evas *evas = evas_object_evas_get(win);

   Evas_Object *vg = evas_object_vg_add(evas);
   evas_object_show(vg);
   Evas_Object *container = evas_vg_container_add(vg);
   evas_object_vg_root_node_set(vg, container);

   Evas_Object *svg = efl_add(EFL_CANVAS_VG_OBJECT_CLASS, container);
   efl_file_simple_load(svg, "./test.svg", NULL);
   efl_gfx_entity_size_set(svg, EINA_SIZE2D(600, 600));
   efl_gfx_entity_visible_set(svg, EINA_TRUE);
   evas_object_size_hint_weight_set(svg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
   evas_object_size_hint_align_set(svg, EVAS_HINT_FILL, EVAS_HINT_FILL);

   elm_win_resize_object_add(win, vg);
   evas_object_resize(win, WIDTH, HEIGHT);
   evas_object_show(win);
   elm_run();
   elm_shutdown();
   return 0;
}

Reviewers: Hermet, smohanty, kimcinoo

Reviewed By: Hermet

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9640
2019-08-20 20:32:15 +09:00
Shinwoo Kim 2a0eeba4e5 evas: fix png regression issue
Accidentally commit "382c580 evas: add support for .9.png file to PNG loader."
adding the 9 patch feature with small code refactoring missed a line calling
eina_file_map_all taking EINA_FILE_SEQUENTIAL for data decoding.

You can see the previous change adding the line from the following commit.

   e60baa0 evas: change mapping policy to be less agressive into loading file
           in memory.

This is a response to the request of @cedric on D9580

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D9614
2019-08-19 16:47:22 -07:00
Vincent Torri 01b987df59 make mman.h private
Summary:
integrate mman.h to make Evil private to the EFL, as mman.h does not exist on Windows. After a discussion with raster, i include sys/mman.h only on non Windows platform.

One issue, though, is that src/modules/emotion/generic/Emotion_Generic_Plugin.h has inlined functions using mmap()

Test Plan: compilation on Windows

Reviewers: cedric, raster, zmike

Subscribers: #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9542
2019-08-19 09:55:13 -04:00
Hermet Park ce3d1ec7e7 evas svg: fix svg spec compatibility.
Minus degree value must be transformed to the signed before Radian.

It's easily tested i.e. the rotation degree is -350.

@fix
2019-08-19 21:37:45 +09:00
Shinwoo Kim f5aa672853 evas: fix png regression issue
Summary:
The evas_image_load_file_data_png had called png_set_tRNS_to_alpha
from following commit.

   6988a38 evas: fix png loader to actually produce lower resolution
           content when asked.

You could refer to following information regarding png_set_tRNS_to_alpha
which is available on page http://www.libpng.org/pub/png/libpng-manual.txt

   The following code transforms grayscale images of less than 8 to 8 bits,
   changes paletted images to RGB, and adds a full alpha channel if there is
   transparency information in a tRNS chunk.  This is most useful on
   grayscale images with bit depths of 2 or 4 or if there is a multiple-image
   viewing application that wishes to treat all images in the same way.

       if (color_type == PNG_COLOR_TYPE_PALETTE)
           png_set_palette_to_rgb(png_ptr);

       if (png_get_valid(png_ptr, info_ptr,
           PNG_INFO_tRNS)) png_set_tRNS_to_alpha(png_ptr);

       if (color_type == PNG_COLOR_TYPE_GRAY &&
           bit_depth < 8) png_set_expand_gray_1_2_4_to_8(png_ptr)

Accidentally commit "382c580 evas: add support for .9.png file to PNG loader."
adding a new feature with small code refactoring missed the line calling
png_set_tRNS_to_alpha.

So we got a rendering issue. It made around 75% size white rectangle
using a grayscale and transparent image. I'd like to attach the image
which has following type information for test purpose.

$ identify -verbose ./grayscale_transparent.png | grep type -i
  Mime type: image/png
  Type: Bilevel
    png:IHDR.color-type-orig: 0
    png:IHDR.color_type: 0 (Grayscale)

Test Plan:
This is the sample image file grayscale_transparent.png

{F3748665}

Reviewers: cedric, Hermet, jsuya

Reviewed By: Hermet

Subscribers: #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9580
2019-08-16 16:55:12 +09:00
Marcel Hollerbach f5063b8733 meson: add xkbcommon to the build deps
Summary: fix T8064

Reviewers: cedric, zmike, devilhorns

Reviewed By: devilhorns

Subscribers: #reviewers, #committers

Tags: #efl

Maniphest Tasks: T8064

Differential Revision: https://phab.enlightenment.org/D9573
2019-08-15 15:36:29 -04:00