Commit Graph

3650 Commits

Author SHA1 Message Date
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
Carsten Haitzler e0f0165220 evas - png loader - fix leake in error case of pixels
fix CID 1403027

@fix
2019-08-11 12:47:37 +01:00
Carsten Haitzler 9149767184 getenv - reduce continually calling getenv for the same vars do once
do it once and remember the result from the first one. drops overhead
for sure by a chunk i actually could see in perf reports like about 1-2%
of cpu...
2019-08-08 23:57:02 +01:00
Boris Faure cdb920ab08 get rid of shadow variables
Summary: gl: add some EINA_FALLTHROUGH

Reviewers: #reviewers, zmike

Reviewed By: zmike

Subscribers: zmike, cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9525
2019-08-08 17:18:46 -04:00
Carsten Haitzler b6bc80d2da ecore evas drm - fix code that forgets to del an fd handler
also.. note the badness of the code design mixing a global singleton
with a "per struct" set of data like fd handlers for the same devices
initted only once but... anyway. it's messy.
2019-08-07 18:14:06 +01:00
Carsten Haitzler 064b46b7a3 evas egl - esnure we always destroy surfaces because creating new ones
be sure we dont leak them.
2019-08-07 16:59:43 +01:00
Carsten Haitzler 8e67e9d18e evas - gl_drm - delete old surfaces before creating new ones
we shouldnt go have multiple drm window surfaces per drm surface...
this is bad.

@fix
2019-08-07 16:39:10 +01:00
Christopher Michael b273bf7f9a ecore_wl2: Move ecore_wl2_window_rotation_change functions to be
internal

These functions are not used in efl wayland clients nor are they used
in Enlightenment. As such, there is no reason that they need to be
public API so this commit moves them to be Internal and updates
Ecore_Evas engine code to include the internal header.

ref T8013
2019-08-06 08:40:41 -04:00
Mike Blumenkrantz 88910d6a65 efl_ui/clock: remove module interface
this was overly complex and never actually used

ref T7868

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D9499
2019-08-06 09:26:34 +02:00
Carsten Haitzler 21efff6d3e evas image - eina file - be paranoud about double closes
tracking some seemingly not so good asan hits on the eina file where
we're accessing an eina file already closed... so be extra paranoid
about it and set things to null after free/close...
2019-08-05 18:59:33 +01:00
Carsten Haitzler c56791180d gif loader - dup eina file as we keep our own copy of it in the loader
we didnt dup the eina file handle since  we kee our own handle. we
need ot do that. asan found this.
2019-08-05 18:59:33 +01:00
Carsten Haitzler 9ea4bb8fc7 ecore evas drm - fix multi-dlopening of lib into symbol space
only load libglapi once... not multiple times by storing static ptr to
lib handle.

fix CID 1402692
2019-08-05 13:55:38 +01:00
Carsten Haitzler d9dbd2fbea ecore evas x and e sync rendering - disable as it's unused
this has been optional and unused by e for a very long time ot try
sync front-buffered software rendering with the wm/compositor. we may
as well remove the bloat that is here that is unused... it's been
inactive for many years anyway.
2019-08-02 16:41:12 +01:00
Daekwang Ryu cf818a84be evas_gl: implement EvasGL ES 3.2
add a wrapper function for glFramebufferTexture.
some bugs were fixed.
I tested on Ubuntu 14.04(x64) and nVidia 375 driver with VK-GL-CTS

Reviewed-by: Cedric BAIL <cedric.bail@free.fr>
Differential Revision: https://phab.enlightenment.org/D4831
2019-08-01 10:42:55 -07:00
Marcel Hollerbach c0082b1c71 efl_ui_range_display: move events from spin
we concluded min,reached and max,reached should be on every widget that
implements range_display. This here is the start of that work, the
events are moved, next commit fixes all widgets, the last commits
enables tests in the spec unit test.

ref T7897
ref T7895

Differential Revision: https://phab.enlightenment.org/D9371
2019-07-31 10:18:20 +02:00
Hermet Park e092878d11 vg json: --log level
Vector needs to try load a lottie file in a brutal force way,
If the input source is not identified.
2019-07-31 15:12:19 +09:00
WooHyun Jung 77e268e6ab efl_input_clickable: rename efl_ui_clickable to efl_input_clickable
Summary:
Renamed all efl_ui_clickable_XXX to efl_input_clickable_XXX based on
the discussion in T7847

ref T7847 T7976

Reviewers: zmike, bu5hm4n, segfaultxavi

Reviewed By: segfaultxavi

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Maniphest Tasks: T7976, T7847

Differential Revision: https://phab.enlightenment.org/D9427
2019-07-29 11:43:01 +02:00
SubhransuSekhar Mohanty dd484a54dc efl_canvas_vg svg: free the svg tree returned by eet_data_read()
The eet_data_read() api creates the structure by referencing the wwt data structure
and reading from eet file. So the structure should be deleted by the user of the function.
As eet_data_read() api documentation dosen't specify about the ownership I guess
we need to free this structure to avoid memory leak.
2019-07-25 15:19:41 +09:00
junsu choi 2e4c928d81 evas_vg_load_svg: Support multiple gradient without <defs> part
Summary:
Multiple gradients can be declared.
There is a problem of keeping only one gradient information
when it is declared outside defs or when defs is not declared.
It supports the use of multiple gradients even if no defs are declared.

Test Plan:
(with D9312 patch)
cd src/example/edje
edje_cc -beta svg.edc && gcc -o svg-test svg-test.c `pkg-config --libs --cflags evas ecore ecore-evas edje`
./svg-test

Reviewers: Hermet, kimcinoo, smohanty

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9315
2019-07-15 21:23:38 +09:00
junsu choi 84fcc5d073 evas_vg_load_svg: Prevent duplicate operations on radial gradient variables
Summary:
This solves the problem of radial gradient being displayed
abnormally when the radial gradient variables are 0 to 1.

Test Plan:
Sample SVG
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100">
  <defs
     id="defs11">
    <linearGradient id="linearGradient1" x1="0" y1="0" x2="0.2" y2="0.2" spreadMethod="reflect">
      <stop style="stop-color:#ff0000;stop-opacity:1;" offset="0"/>
      <stop style="stop-color:#0000ff;stop-opacity:1;" offset="1"/>
    </linearGradient>
    <radialGradient id="radialGradient222" r="0.2" cx="0.3" cy="0.3" spreadMethod="reflect">
      <stop style="stop-color:#ffFF00;stop-opacity:1;" offset="0"/>
      <stop style="stop-color:#00FFff;stop-opacity:1;" offset="1"/>
    </radialGradient>
  </defs>
  <rect x="0" y="0" width="100" height="100" fill="url(#linearGradient1)"/>
  <rect x="50" y="50" width="50" height="50" fill="url(#radialGradient222)"/>
</svg>

Reviewers: Hermet, kimcinoo, smohanty

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9312
2019-07-15 21:22:49 +09:00
Jihoon Kim f5ee2e3bb8 ecore_imf: remove code to use deprecated API in wayland immodule
Signed-off-by: Jihoon Kim <jihoon48.kim@samsung.com>
2019-07-15 11:37:53 +09:00
Cedric BAIL 382c580182 evas: add support for .9.png file to PNG loader.
This support Android 9 patch file format. Only black is a recognized color for both
the stretch area and the content area. All other color are associated with being
"white".

Reviewed-by: Hermet Park <hermetpark@gmail.com>
Differential Revision: https://phab.enlightenment.org/D9103
2019-07-12 09:54:18 -07:00
Cedric BAIL 6a93e2ef3d evas: add infrastructure to feed 9 patch information from file loader to image object.
This is just the plumbing that feed data provided along android 9 patch image for example
into Evas object image new stretch and content region infrastructure for rendering them
properly.

Reviewed-by: Hermet Park <hermetpark@gmail.com>
Differential Revision: https://phab.enlightenment.org/D9102
2019-07-12 09:54:16 -07:00
Cedric BAIL ce076d1323 evas: break Image_Loader API to allow for getting property from the data field of an image.
Reviewed-by: Hermet Park <hermetpark@gmail.com>
Differential Revision: https://phab.enlightenment.org/D9101
2019-07-12 09:54:14 -07:00
Cedric BAIL 9f35c74d9d evas: break Evas_Loader API and introduce a version numbering for Image_Loader.
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Hermet Park <hermetpark@gmail.com>
Differential Revision: https://phab.enlightenment.org/D9099
2019-07-12 09:54:11 -07:00
Jihoon Kim daa35a1893 ecore_imf: deprecate ambigous or unused APIs
ecore_imf_context_show
ecore_imf_context_hide
ecore_imf_context_control_panel_show
ecore_imf_context_control_panel_hide
ecore_imf_context_preedit_start_event_add
ecore_imf_context_preedit_end_event_add
ecore_imf_context_preedit_changed_event_add
ecore_imf_context_commit_event_add
ecore_imf_context_delete_surrounding_event_add

Signed-off-by: Jihoon Kim <jihoon48.kim@samsung.com>
2019-07-10 20:03:14 +09:00
Jongmin Lee 3edf75c319 meson: add some config definitions
Some config definitions used in source code could not be defined during build config process.
  - HAVE_XATTR
  - HAVE_CIPHER
  - HAVE_SIGNATURE
  - BUILD_ECORE_EVAS_EWS

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Reviewed-by: Vincent Torri <vincent.torri@gmail.com>
Differential Revision: https://phab.enlightenment.org/D9192
2019-06-27 15:51:25 +02:00
Hermet Park 7fcf887b63 evas svg: fix missing node opacity attribute.
Any svg node could have its opacity value, we missed implementing it.

If a node have a opacity, it's opacity could be multiply with fill and stroke colors.

@fix
2019-06-27 13:18:28 +09:00
Hermet Park 35a5ed1494 evas svg: remove unnecessary initialization. 2019-06-27 13:18:28 +09:00
Marcel Hollerbach 8103b56874 meson: fix building of svg / eet / json loader if its disabled
the problem was that the savers are defining the same defines as the
loaders. Because of me beeing paranoid, i would like to keep the double
define, as later on, someone will likely forget it, and it does not do
any harm here.

this fixes ci.

Reviewed-by: Stefan Schmidt <stefan@datenfreihafen.org>
Differential Revision: https://phab.enlightenment.org/D9174
2019-06-25 17:19:08 +02:00
Hermet Park 23af6ec640 evas vector: support json loader for rlottie integration.
Summary:
Introduce a new evas json loader to support lottie animation.
This json loader uses rlottie library which is a new github open project.

These days most ui frameworks (windowpws, skia, qt, xamarin, react, nativescript) supports lottie,
the rlottie was designed to support lottie as a standalone library and compatible with efl as well.

To enable this,please install rlottie library then remove json disabler in meson_options.txt

For more information, See lottie/rlottie project and its a introdcution article:

https://airbnb.io/lottie/#/
https://github.com/samsung/rlottie
https://hermet.pe.kr/143

Co-authored-by: JunsuChoi <jsuya.choi@samsung.com>

{D8941}
{D8944}

Reviewers: #committers, jsuya, bu5hm4n

Subscribers: bu5hm4n, cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8940
2019-06-21 17:35:48 +09:00
Marcel Hollerbach 89102ecbd3 efl_ui_radio: cleanup API
This is a bit of a giant commit. However, the problem here is that
cleaning up the API went hand in hand with rewriting most of the usages.
In the process of renewing and removing old API the following was done:
- Legacy API testcases have been ported back to smart callbacks
- EO-API testcases have been ported to efl_add syntax
- weird event #defines have been removed
- Wrong constructor usage has been removed
- Ported to the new box object introduced before
- removed legacy API from efl_ui_radio
  -> no more ptr(int) q66 will do jumps of happiness
  -> no more ununderstandable group_add methods
  -> Seperated code in blocks only for legacy, and blocks only for
non-legacy

To verify this commit, you can check all the tests that have been
touched here. Additionally, the cxx example has been adjusted

ref T7867

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Differential Revision: https://phab.enlightenment.org/D9060
2019-06-20 16:02:02 +02:00
Stefan Schmidt 47ada4f72c build: emotion: fix lookup of gstreamer 0.10 dependency
The pkg-config file for the 0.10 series of gstreamer is called
gstreamer-0.10.pc and we need to correct name in the dependency check
here to find it. Improving our CI coverage does spot bugs. :-)

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D9114
2019-06-19 13:23:16 +02:00
Stefan Schmidt b0182dd744 build: emotions: gstreamer: add needed ecore_x internal dependency
The 0.10 gstreamer module needs Ecore_X.h during build. Make sure we
actually have this dependency right so the build can succeed.

Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de>
Differential Revision: https://phab.enlightenment.org/D9113
2019-06-19 13:23:14 +02:00
Carsten Haitzler a4bcd15498 ecore_evas wl - make ERR's into WRNS as they really are just that 2019-06-04 15:23:55 +01:00
Mike Blumenkrantz 012ca46377 gl_generic: directly copy existing image when changing orientation
Summary:
in gl engines, orientation is applied during the draw. this is different from
sw engines where the orientation is directly applied to the internal pixel data
which results in a state change of the object internals.

this preserves image cache state and allows the image to be loaded normally instead
of displaying a black rectangle if orientation is set prior to a texture being
created

@fix
Depends on D8916

Reviewers: Hermet, cedric

Reviewed By: Hermet, cedric

Subscribers: Hermet, cedric, #reviewers, #committers

Tags: #efl_rendering

Differential Revision: https://phab.enlightenment.org/D8918
2019-06-03 08:56:11 -04:00
Mike Blumenkrantz 3a88a71a26 ecore-imf/xim: only call ecore_x_shutdown if init was previously called
Summary:
this isn't a perfect fix, but it's probably the best that can be done
given the current ecore-imf module api which calls the exit() module
function unconditionally during module cleanup even if the module was
never initialized

@fix
Depends on D9003

Reviewers: cedric

Reviewed By: cedric

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9005
2019-05-29 12:29:04 -04:00
Mike Blumenkrantz 16e6cb7c7f gl_generic: handle image orientation setting when texture has not been created
Summary:
this occurs when orientation is set during image construction

@fix

Reviewers: segfaultxavi, cedric

Reviewed By: cedric

Subscribers: cedric, #reviewers, #committers

Tags: #efl_rendering

Differential Revision: https://phab.enlightenment.org/D8916
2019-05-29 12:29:03 -04:00
Vincent Torri 7a882ab02c ecore_evas win32: fix warning reported by clang
Test Plan: compilation

Reviewers: zmike, raster, cedric, Hermet

Reviewed By: Hermet

Subscribers: #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D9025
2019-05-27 15:58:51 +09:00
Vincent Torri e851aa6e52 Emotion gst1 module: fix "empty if statement" warning
Summary: the macro GST_DEBUG_BIN_TO_DOT_FILE_WITH_TS can be undefined (see gst core doc), hence the if statement may have no body

Test Plan: compilation

Reviewers: zmike, raster, cedric, Hermet

Reviewed By: Hermet

Subscribers: #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8939
2019-05-23 20:25:27 +09:00
Vincent Torri baaa053659 Emotion gst1 module: remove whitespaces
Reviewers: zmike, cedric, raster, Hermet

Reviewed By: Hermet

Subscribers: #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8938
2019-05-23 20:24:46 +09:00