Age | Commit message (Collapse) | Author | |
---|---|---|---|
2021-02-06 | Added the heif loader | thierry1970 | |
Summary: that supports images : *.heif, *hiec and *.avif I have disabled *.avif images, there is already a loader. Reviewers: stefan_schmidt, raster Subscribers: raster, vtorri, cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D12135 | |||
2020-12-15 | evas: Rename EAPI macro to EVAS_API in Evas library | Felipe Magno de Almeida | |
Summary: Patch from a series of patches to rename EAPI symbols to specific library DSOs. = The Rationale = This patch is from a series of patches to rename EAPI symbols to specific library DSOs. EAPI was designed to be able to pass `__attribute__ ((visibility ("default")))` for symbols with GCC, which would mean that even if -fvisibility=hidden was used when compiling the library, the needed symbols would get exported. MSVC __almost__ works like GCC (or mingw) in which you can declare everything as export and it will just work (slower, but it will work). But there's a caveat: global variables will not work the same way for MSVC, but works for mingw and GCC. For global variables (as opposed to functions), MSVC requires correct DSO visibility for MSVC: instead of declaring a symbol as export for everything, you need to declare it as import when importing from another DSO and export when defining it locally. With current EAPI definitions, we get the following example working in mingw and MSVC (observe it doesn't define any global variables as exported symbols). Example 1: dll1: ``` EAPI void foo(void); EAPI void bar() { foo(); } ``` dll2: ``` EAPI void foo() { printf ("foo\n"); } ``` This works fine with API defined as __declspec(dllexport) in both cases and for gcc defining as `__atttribute__((visibility("default")))`. However, the following: Example 2: dll1: ``` EAPI extern int foo; EAPI void foobar(void); EAPI void bar() { foo = 5; foobar(); } ``` dll2: ``` EAPI int foo = 0; EAPI void foobar() { printf ("foo %d\n", foo); } ``` This will work on mingw but will not work for MSVC. And that's why LIBAPI is the only solution that works for MSVC. Co-authored-by: João Paulo Taylor Ienczak Zanette <jpaulotiz@gmail.com> Co-authored-by: Lucas Cavalcante de Sousa <lucks.sousa@gmail.com> Co-authored-by: Ricardo Campos <ricardo.campos@expertise.dev> Reviewers: vtorri, woohyun, jptiz, lucas Reviewed By: vtorri, lucas Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D12214 | |||
2020-07-15 | Evas: add avif evas loader and saver | Vincent Torri | |
Summary: Add AV1 image file loader and saver to Evas The loader can be tested with this code : ``` #include <stdlib.h> #include <stdio.h> #include <Eina.h> #include <Ecore.h> #include <Evas.h> #include <Ecore_Evas.h> static int i = 0; static unsigned char _timer(void *data) { Evas_Object *o = (Evas_Object *)data; if (i < evas_object_image_animated_frame_count_get(o)) { evas_object_image_animated_frame_set(o, i); i++; return ECORE_CALLBACK_RENEW; } return ECORE_CALLBACK_DONE; } static void _quit(Ecore_Evas *ee) { ecore_main_loop_quit(); (void)ee; } int main(int argc, char *argv[]) { Ecore_Evas *ee; Evas *evas; Evas_Object *o; int w,h; Evas_Load_Error err; if (argc < 2) { printf("usage : %s file\n", argv[0]); return 1; } ecore_evas_init(); ee = ecore_evas_new(NULL, 0, 0, 1, 1, NULL); if (!ee) { printf("no ee\n"); return 0; } evas = ecore_evas_get(ee); ecore_evas_title_set(ee, "avif test"); ecore_evas_callback_delete_request_set(ee, _quit); o = evas_object_image_add(evas); evas_object_image_file_set(o, argv[1], NULL); err = evas_object_image_load_error_get(o); if (err != EVAS_LOAD_ERROR_NONE) { fprintf(stderr, "could not load image '%s'. error string is \"%s\"\n", argv[1], evas_load_error_str(err)); return 1; } evas_object_image_size_get(o, &w, &h); evas_object_image_fill_set(o, 0, 0, w, h); evas_object_move(o, 0, 0); evas_object_resize(o, w, h); evas_object_show(o); printf("animated : %s\n", evas_object_image_animated_get(o) ? "yes" : "no"); fflush(stdout); if (evas_object_image_animated_get(o)) { Ecore_Timer *timer; printf("frame count : %d\n", evas_object_image_animated_frame_count_get(o)); printf("duration : %f\n", evas_object_image_animated_frame_duration_get(o,1,0)); printf("loop count : %d\n", evas_object_image_animated_loop_count_get(o)); fflush(stdout); timer = ecore_timer_add(evas_object_image_animated_frame_duration_get(o,1,0), _timer, o); } ecore_evas_resize(ee, w, h); ecore_evas_show(ee); ecore_main_loop_begin(); ecore_evas_shutdown(); return 0; } ``` non animated files : https://github.com/AOMediaCodec/libavif/tree/master/tests/data/originals animated files : https://github.com/AOMediaCodec/av1-avif/tree/master/testFiles/Netflix/avifs to test the saver : ``` #include <stdlib.h> #include <stdio.h> #include <math.h> #include <Eina.h> #include <Ecore.h> #include <Evas.h> #include <Ecore_Evas.h> void _quit(Ecore_Evas *ee) { ecore_main_loop_quit(); (void)ee; } static Evas_Object * display_data(int w, int h, const char *title, unsigned int *data) { Ecore_Evas *ee; Evas *evas; Evas_Object *o; unsigned int *d; ee = ecore_evas_new(NULL, 0, 0, w, h, NULL); if (!ee) return NULL; evas = ecore_evas_get(ee); ecore_evas_title_set(ee, title); ecore_evas_callback_delete_request_set(ee, _quit); o = evas_object_image_add(evas); evas_object_image_fill_set(o, 0, 0, w, h); evas_object_image_size_set(o, w, h); d = evas_object_image_data_get(o, 1); for (int i = 0; i < w*h; i++) d[i] = data[i]; evas_object_image_data_set(o, d); evas_object_image_data_update_add(o, 0, 0, w, h); evas_object_move(o, 0, 0); evas_object_resize(o, w, h); evas_object_show(o); ecore_evas_show(ee); return o; } static unsigned int * display_file(const char *title, const char *filename, int *w, int *h) { Ecore_Evas *ee; Evas *evas; Evas_Object *o; Evas_Load_Error err; unsigned int *data; ee = ecore_evas_new(NULL, 0, 0, 1, 1, NULL); if (!ee) return NULL; evas = ecore_evas_get(ee); ecore_evas_title_set(ee, title); ecore_evas_callback_delete_request_set(ee, _quit); o = evas_object_image_add(evas); evas_object_image_file_set(o, filename, NULL); err = evas_object_image_load_error_get(o); if (err != EVAS_LOAD_ERROR_NONE) { fprintf(stderr, "could not load image '%s'. error string is \"%s\"\n", filename, evas_load_error_str(err)); fflush(stderr); return NULL; } evas_object_image_size_get(o, w, h); evas_object_image_fill_set(o, 0, 0, *w, *h); evas_object_image_size_set(o, *w, *h); evas_object_move(o, 0, 0); evas_object_resize(o, *w, *h); evas_object_show(o); ecore_evas_resize(ee, *w, *h); ecore_evas_show(ee); data = evas_object_image_data_get(o, 1); return data; } double psnr(int w, int h, unsigned int *data_orig, unsigned int *data) { unsigned char *iter_orig; unsigned char *iter; double psnr; psnr = 0.0; iter_orig = (unsigned char *)data_orig; iter = (unsigned char *)data; for (int i = 0; i < 4 * w * h; i++, iter_orig++, iter++) psnr += (*iter_orig - *iter) * (*iter_orig - *iter); psnr /= 4 * w * h; psnr = 10 * log10(255.0 * 255.0 / psnr); return psnr; } void compare(int quality, int w, int h, unsigned int *data_orig) { char title[1024]; char filename[1024]; unsigned char *data; unsigned int *data_jpeg; unsigned int *data_avif; unsigned char *iter_orig; unsigned char *iter_jpeg; unsigned char *iter_avif; double psnr_jpeg; double psnr_avif; Eina_File *f_jpeg; Eina_File *f_avif; size_t size_jpeg; size_t size_avif; /* jpeg */ snprintf(title, sizeof(title), "jpeg test quality %d", quality); snprintf(filename, sizeof(filename), "test_%d.jpg", quality); data_jpeg = display_file(title, filename, &w, &h); if (!data_jpeg) return; f_jpeg = eina_file_open(filename, EINA_FALSE); size_jpeg = eina_file_size_get(f_jpeg); eina_file_close(f_jpeg); fprintf(stderr, "size : %u\n", (unsigned int)size_jpeg); fflush(stderr); /* avif */ snprintf(title, sizeof(title), "avif test quality %d", quality); snprintf(filename, sizeof(filename), "test_%d.avif", quality); data_avif = display_file(title, filename, &w, &h); if (!data_avif) return; f_avif = eina_file_open(filename, EINA_FALSE); size_avif = eina_file_size_get(f_avif); eina_file_close(f_avif); fprintf(stderr, "size : %u\n", (unsigned int)size_avif); fflush(stderr); psnr_jpeg = psnr(w, h, data_orig, data_jpeg); fprintf(stderr, "psnr jpeg : %f\n", psnr_jpeg); fflush(stderr); snprintf(title, sizeof(title), "jpeg vs orig (psnr: %.2f, size: %u b)", psnr_jpeg, (unsigned int)size_jpeg); iter_orig = (unsigned char *)data_orig; iter_jpeg = (unsigned char *)data_jpeg; data = malloc(4*w*h); for (int i = 0; i < 4*w*h; i++, iter_orig++, iter_jpeg++) data[i] = abs(*iter_jpeg - *iter_orig); display_data(w, h, title, (unsigned int *)data); psnr_avif = psnr(w, h, data_orig, data_avif); fprintf(stderr, "psnr avif : %f\n", psnr_avif); fflush(stderr); snprintf(title, sizeof(title), "avif vs orig (psnr: %.2f, size: %u b)", psnr_avif, (unsigned int)size_avif); iter_orig = (unsigned char *)data_orig; iter_avif = (unsigned char *)data_avif; data = malloc(4*w*h); for (int i = 0; i < 4*w*h; i++, iter_orig++, iter_avif++) data[i] = abs(*iter_avif - *iter_orig); display_data(w, h, title, (unsigned int *)data); } int main() { Ecore_Evas *ee; Evas *evas; Evas_Object *o; Evas_Load_Error err; unsigned int *data; int w,h; ecore_evas_init(); ee = ecore_evas_new(NULL, 0, 0, 1, 1, NULL); if (!ee) return 1; evas = ecore_evas_get(ee); ecore_evas_title_set(ee, "original"); ecore_evas_callback_delete_request_set(ee, _quit); o = evas_object_image_add(evas); evas_object_image_file_set(o, "x1d-II-sample-02.fff", NULL); err = evas_object_image_load_error_get(o); if (err != EVAS_LOAD_ERROR_NONE) { fprintf(stderr, "could not load image '%s'. error string is \"%s\"\n", "x1d-II-sample-02.fff", evas_load_error_str(err)); fflush(stderr); return 1; } evas_object_image_size_get(o, &w, &h); evas_object_image_fill_set(o, 0, 0, w, h); evas_object_image_size_set(o, w, h); evas_object_move(o, 0, 0); evas_object_resize(o, w, h); evas_object_show(o); data = evas_object_image_data_get(o, 1); ecore_evas_resize(ee, w, h); ecore_evas_show(ee); /* evas_object_image_save(o, "test_100.jpg", NULL, "quality=100"); */ evas_object_image_save(o, "test_90.jpg", NULL, "quality=90"); /* evas_object_image_save(o, "test_70.jpg", NULL, "quality=70"); */ /* evas_object_image_save(o, "test_50.jpg", NULL, "quality=50"); */ /* evas_object_image_save(o, "test_100.avif", NULL, "quality=100"); */ evas_object_image_save(o, "test_90.avif", NULL, "quality=90"); /* evas_object_image_save(o, "test_70.avif", NULL, "quality=70"); */ /* evas_object_image_save(o, "test_50.avif", NULL, "quality=50"); */ compare(90, w, h, data); ecore_main_loop_begin(); ecore_evas_shutdown(); return 0; } ``` the raw file canbe found here : https://www.hasselblad.com/learn/sample-images/ Test Plan: test executable with avif files found in libavif project Reviewers: raster, q66 Reviewed By: q66 Subscribers: q66, cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D12051 | |||
2020-07-14 | Revert "Evas: add avif evas loader" | Carsten Haitzler (Rasterman) | |
This reverts commit dd23a6c84aee249aa5316b48af6956072233bb97. i didn't mean to push this yet... | |||
2020-07-14 | Evas: add avif evas loader | Vincent Torri | |
Summary: Add AV1 image file loader to Evas Test Plan: test executable with avif files found in libavif project Reviewers: raster Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D12051 | |||
2019-10-29 | meson: redo evas building | Marcel Hollerbach | |
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-05 | build - efl run in tree - make exception for image loaders/savers | Carsten Haitzler (Rasterman) | |
due to meson's insistence on naming even moudles libmodule.so, and our complexity of build as in the previous commits ... have a special case for in tree module loading for these. | |||
2019-08-08 | getenv - reduce continually calling getenv for the same vars do once | Carsten Haitzler (Rasterman) | |
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-06-21 | evas vector: support json loader for rlottie integration. | Hermet Park | |
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-05-20 | Evas: remove Evil.h when not needed and use evil_private when needed | Vincent Torri | |
Test Plan: compilation Reviewers: zmike, raster, cedric Reviewed By: zmike Subscribers: #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D8921 | |||
2018-10-02 | here comes meson | Marcel Hollerbach | |
a new shiny buildtool that currently completes in the total of ~ 4 min.. 1 min. conf time 2:30 min. build time Where autotools takes: 1:50 min. conf time 3:40 min. build time. meson was taken because it went quite good for enlightenment, and is a traction gaining system that is also used by other mayor projects. Additionally, the DSL that is defined my meson makes the configuration of the builds a lot easier to read. Further informations can be gathered from the README.meson Right now, bindings & windows support are missing. It is highly recommented to use meson 0.48 due to optimizations in meson that reduced the time the meson call would need. Co-authored-by: Mike Blumenkrantz <zmike@samsung.com> Differential Revision: https://phab.enlightenment.org/D7012 Depends on D7011 | |||
2018-08-30 | evas-file: Remove cserve2 support | Chris Michael | |
Summary: ref T7226 Depends on D6935 Reviewers: raster, cedric, zmike, Hermet Reviewed By: Hermet Subscribers: #reviewers, #committers Tags: #efl Maniphest Tasks: T7226 Differential Revision: https://phab.enlightenment.org/D6937 | |||
2018-08-14 | evas: support wayland static engine loading | Marcel Hollerbach | |
Summary: This fixes static loading of the here changes engines. Reviewers: ManMower, devilhorns Reviewed By: devilhorns Subscribers: cedric, #reviewers, #committers, zmike Tags: #efl Differential Revision: https://phab.enlightenment.org/D6795 | |||
2018-02-17 | evas: use new bs static lib | Marcel Hollerbach | |
2018-01-04 | efl: remove _MSC_VER (Visual Studio macro) usage in source code | Vincent Torri | |
2017-11-07 | vg_savers/svg: empty (for now) module that will save svg in original file | Vitalii Vorobiov | |
Just as a starter to make a working background that, later on, will go through Svg_Node's and build a certain source code to be saved in SVG picture as a file | |||
2017-10-04 | evas: remove duplicated code and rely on Efl.File { get; set; } | Cedric Bail | |
We can almost remove image_load from the engine backend after this patch. One little bit left in Evas_3D. | |||
2017-09-22 | EFL For WIN32: Replace HAVE_EVIL define with _WIN32 | Vincent 'vtorri' Torri | |
2017-08-25 | efl: remove PS3 backend. | Cedric BAIL | |
This backend has received no patch and maintenance from anyone who could actually test it over the last few years. After talking with KaKaRoTo it is best to remove it. If anyone want to take over its maintenance, you are welcome to revert this patch. | |||
2017-08-25 | evas: make the info size a parameter of the function to make it safer to ↵ | Cedric BAIL | |
roll in. | |||
2017-07-23 | evas module load add comments pointing out this is intentional ptr loss | Carsten Haitzler (Rasterman) | |
2017-02-21 | evas: Fix module memleak during evas_shutdown | Jean-Philippe Andre | |
This fixes a minor memory leak during shutdown. Note: This does NOT perform the dlclose (and still leaks the Eina_Module descriptor). Calling dlclose leads to a whole lot of other issues, so we avoid it. | |||
2017-02-03 | ifdef RUN_IN_TREE logic. | Gustavo Sverzut Barbieri | |
This logic is only needed for autotools, cmake will replicate the installation file structure and thus eina_prefix works out of box. | |||
2017-01-25 | Revert "evas: Fix resource leak in evas_module_find_type" | Chris Michael | |
Reverting this as it causes crashes in Terminology and other EFL apps. Needs investigation. This reverts commit 8b2ca30eb5bc112b47155cc3694be1aa39b1345f. | |||
2017-01-25 | evas: Fix resource leak in evas_module_find_type | Chris Michael | |
Coverity reports a resource leak here if we successfully load the evas module as we were never freeing the eina_module here. Previously we would just return the evas module without proper cleanup of the eina_module. This patch fixes the leak by calling eina_module_free if we successfully load the evas module. Fixes CID1367503 @fix Signed-off-by: Chris Michael <cp.michael@samsung.com> | |||
2017-01-25 | evas: Minor formatting fix | Chris Michael | |
NB: No functional changes Signed-off-by: Chris Michael <cp.michael@samsung.com> | |||
2016-12-06 | evas: add infrastructure for Evas_Loader to know if what they are working on ↵ | Cedric BAIL | |
is still useful. | |||
2016-11-29 | evas: make sure that we initialize module correctly in all case. | Cedric Bail | |
2016-11-29 | evas: remove useless code. | Cedric Bail | |
Since we disable the possibility to shutdown evas module, this code has been useless. Let's remove it. | |||
2016-10-14 | evas/module: add a new module in vg_saver for eet | Subhransu Mohanty | |
Reviewers: cedric, jpeg Subscribers: cedric, jpeg Differential Revision: https://phab.enlightenment.org/D4350 | |||
2016-10-13 | evas/module: add a new module in vg_loader for eet | Subhransu Mohanty | |
Reviewers: jpeg Subscribers: cedric, jpeg Differential Revision: https://phab.enlightenment.org/D4347 | |||
2016-10-12 | evas/module: Added a new module vg_loader for svg | Subhransu Mohanty | |
Reviewers: cedric, jpeg Subscribers: cedric, jpeg Differential Revision: https://phab.enlightenment.org/D4346 | |||
2016-07-08 | evas module load - make coverity happy but not a bug | Carsten Haitzler (Rasterman) | |
silence CID 1357364 | |||
2016-07-04 | efl - fix lots of little init/shutdown pairs that are wrong | Carsten Haitzler (Rasterman) | |
i've fixed almost all the eina init/shutdown pairs to do the right thing now... except one (ecore_shutdown) with comment inline where eo_shutdown is not called. if this is called we are in crash land. this needs further inspection. | |||
2016-06-14 | Evas: Support of fnmatch flag FNM_IGNORECASE | Vincent Torri | |
Some systems (solaris in that case) define FNM_IGNORECASE instead of FNM_CASEFOLD. Add this case in evas_path.c | |||
2015-12-12 | evas - fix evas module locks to init/del when movile created/destroyed | Carsten Haitzler (Rasterman) | |
we initted when we load and unload. this led to races with locking/unlocking elsewhere as these expected us to be initted and we were not yet. this fixes that! @fix | |||
2015-06-25 | Evas filters: Implement Lua classes for colors & buffer | Jean-Philippe Andre | |
Reuse previous code for buffer. Keeps API stability. The new class "color" is here for a more convenient color representation. This way, colors can be represented in more natural ways like: {r,g,b[,a]}, 0xaarrggbb, "red", "#rrggbb" Class color is implemented in pure Lua, and adds a .lua file to Evas' share folder. | |||
2014-12-23 | evas: preparation of places for model_saver_loader separated from ↵ | Bogdan Devichev | |
image_saver_loader. | |||
2014-12-23 | fix evas modules to never free eina module - fixes seg on shutdown in x | Carsten Haitzler (Rasterman) | |
this fixes T1946 | |||
2014-08-11 | eina: rename to eina_module_symbol_global_set | Cedric BAIL | |
As discussed on the ML, eina_module_global_set should become eina_module_symbol_global_set. | |||
2014-07-13 | efl: remove Windows CE support | Vincent Torri | |
2014-07-11 | evas: load engine symbol into global namespace. | Cedric BAIL | |
2014-07-03 | Evas: Add DDS image file loader | Jean-Philippe Andre | |
@feature: Add a Micrsoft DirectDraw Surface file loader | |||
2014-07-01 | fix tabe/whitespace format issues in evas module | Carsten Haitzler (Rasterman) | |
2014-07-01 | fix static jpeg saver usage due to defines being removed from config.h | Carsten Haitzler (Rasterman) | |
2014-04-01 | evas: add TGV saver module. | Cedric BAIL | |
2014-04-01 | evas: add a tgv loader. | Cedric BAIL | |
The TGV file format is specifically created for Evas. It is designed to allow region decompression and parallele decompression with a fast path for GPU that do handle ETC1 compression. Plan for adding other compression method will come later. | |||
2014-01-08 | fix mingw build for setuid fix/checks | Carsten Haitzler (Rasterman) | |
2014-01-08 | setuid safeness - ensure if an app that is setuid doesn't do bad things | Carsten Haitzler (Rasterman) | |
this makes efl ignore certain env vars for thnigs and entirely removes user modules (that no one ever used) etc. etc. to ensure that *IF* an app is setuid, there isn't a priv escalation path that is easy. | |||
2013-10-01 | evas: add JPEG 2000 loader. | Vincent Torri | |
This add finally support for JPEG 2000, but be aware that libopenjpeg is very badly managed. There is currently only version 1.5.x that does provide the right files, is usable by a third party and portable. You can seriously forget any other version. |