path: root/src/lib/evas/common (follow)
AgeCommit message (Collapse)Author
2017-01-06eina: rename EINA_{FLT,DBL}_CMP to EINA_{FLT,DBL}_EQ.Cedric BAIL
2017-01-06evas_image_main: fix memory leak of camera app -PLM[P161206-03545]Jiyoun Park
In gl engine, image objects try to unload image's pixel data after creating or updating the texture. but image entry's reference is still 1, it is added to the pending_unloads list, and it is cleaned when evas render function. If elm image use preload feature, preload_done flag is true, so this image data cannot be removed from pending_unloads list, it cause memory leak. I think it is better to free image's pixel data in evas_cache_image_unload_data, (not add to the pending_unloads list) but it it complicated to modify. so I'll remove the code to check preload_done flag in evas_common_rgba_pending_unloads_cleanup function. this flag check was added because of gl preloading, but now gl preloading feature is disabled. this flag is related with I tested photocam, but crash doesn't occur anymore, even though removing flag check.
2017-01-06evas image skip header - more fixes for when images fail to loadCarsten Haitzler (Rasterman)
this fixes some more issues i have found in using skip header like if the file doesn't exist etc. recent feature add so not a fix.
2017-01-04efl header skip with preload - fix seg on invalid fileCarsten Haitzler (Rasterman)
for invalid files we didn't handle this case, so fix it - recent commit/feature add.
2017-01-04[Evas GL Thread 1] evas: Fixed indentation of evas_thread_render.cHaegeun Park
Summary: @fix Change-Id: I411fe6d75dc7b15c0d7f19f165ea4b0cc3b28c12 Reviewers: sung, jpeg, cedric, raster Subscribers: cedric, jpeg Differential Revision:
2017-01-02evas loader - don't stat NULL file pathsCarsten Haitzler (Rasterman)
something i found valgrinding my recent async improvments. statting null path. fix it.
2017-01-02evas image async preload - add option to also make header load asyncCarsten Haitzler (Rasterman)
to date if you use async preload we still load the header synchronously and this can be horrible especially with generic loaders. there is no way to farm this off to the preload thread. now there is. youhave to set it as a skip head load option before doing a file_set AND you need to issue a preload ... but now it's possible. @feature
2017-01-02evas cutouts - quickly avoid huge per issues with large nos of cutoutsCarsten Haitzler (Rasterman)
i found evas_common_draw_context_apply_cutouts() was procsessing 300+ cutouts and as it's O(n^2)/2 to try and merge adjacent rects for cutouts this really performs like complete junk. we apply cutout rects a LOT. this is not the best solution, but it's quick and much faster than doing the clipouts which drop framerate to like 1-2fps or so in the nasty case i say (tyls -m of photos in a dir with a 2160 high terminal). this figures out the target area to limit the count of rects significantly so O(n^2) is far far better when n is now < 10 most of the time. and for the few operations where it's a high value this now uses qsort to speed up merges etc. etc. @optimize
2016-12-28evas - clean up whitespace and 80 column wrapping and commented out codeCarsten Haitzler (Rasterman)
this doenst change functionality but just cleans up the file whitespacing and formatting and removed commented out junk, 80 column wrapping/overflow etc.
2016-12-28evas - use freeq for common and cache imagesCarsten Haitzler (Rasterman)
this makes software rgba images and cache images use freeq to try and minimize possible bugs and crashes if we hit use of freed data for images.
2016-12-22evas: PNG save of ARGY88 needs unpremulJean-Philippe Andre
PNG saves unpremultiplied values, so we need to do that for the newly supported ARGY88 colorspace as well. Fixes the previous commit.
2016-12-20evas: remove float comparison warnings for evas_convert_colorChris Michael
Signed-off-by: Chris Michael <>
2016-12-15evas: fix use of signed and unsigned type in conditional expression warning.Cedric BAIL
2016-12-15evas: fix potential use of unitialized variable.Cedric BAIL
2016-12-01evas common: disable thread_queue feature on win32.Hermet Park
We have an issue that eina_thread_queue msg isn't delivered properly on win32. That occurs broken image drawing in case of non-smooth scaling. I disabled this feature on win32 because scale_sample_draw is gonna be rarely used since async rendering introduced.
2016-12-01evas common: fix a typo.Hermet Park
2016-11-23evas: Fix a few issues after init/shutdown/initJean-Philippe Andre
elm_suite would crash when CK_FORK=no is set, because evas was badly initializing or shutting down. Note that elm_suite still crashes with CK_FORK=no but valgrind doesn't complain.
2016-11-22evas: Add shutdown logic on thread creation failureWonki Kim
Summary: In case of thread creation failure, shutdown logic will be stuck. To prevent stuck, set exit variables to make thread_shutdown working even if init fails. Also modify init logics to return init result to a caller. Reviewers: jypark, woohyun, cedric, jpeg Subscribers: cedric Differential Revision: Note (@jpeg): I have modified the patch just a little bit. Signed-off-by: Jean-Philippe Andre <>
2016-11-18evas: Cleanup unused variables when compiling for NeonChris Michael
Compiling on rpi3 indicated that there are some unused variables in the neon codepaths for several evas op functions. This patch just adds EINA_UNUSED to the function parameters where needed. NB: No functional changes Signed-off-by: Chris Michael <>
2016-11-18evas: Remove unused variablesChris Michael
Compiling on rpi3 using neon indicates that 'alpha' and 'tmp' variables are unused. Reading through the source confirms it, so remove them. Signed-off-by: Chris Michael <>
2016-11-16evas: reduce usage of __thread directive.Cedric BAIL
Moved rects caching into draw context to avoid the use of __thread slot. Draw context are defined per thread anyway and should be just fine. This doesn't really change the picture regarding glibc problem when to many __thread are needed, but slightly improve the global picture. Also this patch doesn't affect our performance in expedite benchmark as far as I can tell.
2016-11-15evas: fix typo in thread name setting for ecore-pipeStefan Schmidt
Thanks to Vincent Torri for pointing this out.
2016-11-03evas lang unicode tables - reduce memory by 24k+1324 bytesCarsten Haitzler (Rasterman)
so bu5hman pointed out a compile warning from clang that { 0x20000, 42711, EVAS_SCRIPT_HAN }, has 42711 exceeding a signed short. true. so this should be an unsigned short. but this drew me to the fact the whole array could be shorter by packing this short with the style memeber after it making them pack into a nicely aligned 4 byte chunk next to the start unicode value before it, thus chopping 1324 bytes off this table. even worse the 8192 entry fast table above is using a full 32bits per entry where they data they store is not even exceeding 7bits, so move this to an unsigned char saving another 24k. this should reduce cache misses and memory footprint and binary footprint of the evas .so files etc. @fix + @optimize
2016-09-21evas: remove unnecessary check for clip coords.Sungtaek Hong
Summary: (dst_clip_w <= 0 || dst_clip_h <= 0) is already checked. Reviewers: jpeg, cedric, Hermet Reviewed By: Hermet Subscribers: conr2d Differential Revision:
2016-09-20eina_cpu, evas: Remove _eina_cpu_fast_core_get, don't set render thread affinityDerek Foreman
We've decided it would be best to just let the scheduler do its job.
2016-09-20Evas font: force freetype v35 ttf interpreterDaniel Hirt
Ref T4623 v40 bytecode interpreter is official as of freetype 2.7. The results don't look so good at the moment. The text looks and glyph positioning seem worse than they were with the previous v35 interpreter. So, in the meantime we'll keep using v35, just so everything looks normal again. Although the v40 is relevant since around 2.6.3, I rather not do any FREETYPE_MINOR checks in this patch, because distributions might ship previous versions with the other (v38) interpreter enabled.
2016-09-19render_thread: Attempt to set affinity to a random fast coreDerek Foreman
We've been pinning the render thread for every EFL process to core 0. This is a bit silly in the first place, but some big.LITTLE arm systems, such as exynos 5422, have the LITTLE cores first. On those systems we put all the render threads on a slow core. This attempts to fix that by using a random core from the pool of fast cores. If we can't determine which cores are fast (ie: we're not on a linux kernel with cpufreq enabled) then we'll continue doing what we've always done - pin to core 0.
2016-09-19Revert "render_thread: Attempt to set affinity to a random fast core"Stefan Schmidt
This reverts commit a17ac66f0a0b089dde0b2e550523b0d59ec97f52. This change broke every efl build locally, as well as on Jenkins, for me. CLD lib/ethumb_client/ /bin/sh: line 2: 10047 Segmentation fault (core dumped) EFL_RUN_IN_TREE=1 ../src/bin/edje/edje_cc -id . -fd . -id ./tests/emotion/data tests/emotion/data/theme.edc tests/emotion/data/theme.edj Makefile:52584: recipe for target 'tests/emotion/data/theme.edj' failed make[4]: *** [tests/emotion/data/theme.edj] Error 139 make[4]: *** Waiting for unfinished jobs.... /bin/sh: line 2: 10088 Segmentation fault (core dumped) EFL_RUN_IN_TREE=1 ../src/bin/edje/edje_cc -id . -fd . -id ./modules/ethumb/emotion modules/ethumb/emotion/template.edc modules/ethumb/emotion/template.edj Makefile:52590: recipe for target 'modules/ethumb/emotion/template.edj' failed make[4]: *** [modules/ethumb/emotion/template.edj] Error 139 /bin/sh: line 2: 10119 Segmentation fault (core dumped) EFL_RUN_IN_TREE=1 ../src/bin/edje/edje_cc -id . -fd . -id ../src/modules/elementary/prefs/ modules/elementary/prefs/elm_prefs_swallow.edc modules/elementary/prefs/elm_prefs_swallow.edj Makefile:52614: recipe for target 'modules/elementary/prefs/elm_prefs_swallow.edj' failed make[4]: *** [modules/elementary/prefs/elm_prefs_swallow.edj] Error 139
2016-09-16render_thread: Attempt to set affinity to a random fast coreDerek Foreman
We've been pinning the render thread for every EFL process to core 0. This is a bit silly in the first place, but some big.LITTLE arm systems, such as exynos 5422, have the LITTLE cores first. On those systems we put all the render threads on a slow core. This attempts to fix that by using a random core from the pool of fast cores. If we can't determine which cores are fast (ie: we're not on a linux kernel with cpufreq enabled) then we'll continue doing what we've always done.
2016-09-12evas map: fix the rendering problem.Hermet Park
I got an issue report about map rendering. After investigated, I found that was introduced by data overflow. For fast computation, evas map uses integer data type rather than float, that gives up some range of data size. So, if vertex range is a little large but still reasonable, polygon won'be properly displayed due to the integer overflow. We can fix this by changing FPc data type to 64 bits (ie, long long) But I didn't do yet though I can simply fix this costlessly. By the way, my test case map points are below. 0: -1715, -5499 1: -83, -1011 2: 1957, 5721 3: 325, 1233 and gl result is perfect but sw is totally broken. @fix
2016-09-06evas: Implement support for external buffersJean-Philippe Andre
This brings support for the eo api for external buffers (like the old data_set / data_get). The new API now works with slices and planes. The internal code still relies on the old array for YUV color conversion. This makes the code a little bit too complex to my taste. Tested with expedite for RGBA and YUV 422 601 planar, both SW and GL engines (x11).
2016-09-06evas: Change internal function image_data_directJean-Philippe Andre
2016-08-29evas: don't redefine PAGE_SIZE if already definedJean Guyomarc'h
On OSX, we include mach.h (via the inlined locks API), which already defines PAGE_SIZE.
2016-08-24evas: Try harder to create the render threadDerek Foreman
It's entirely possible that a system doesn't have a cpu 0, so when we try to pin all our render threads onto processor 0 we may fail. This results in some very connfusing build breakage when edje_cc hangs up because its render thread didn't start. So, if starting the thread with affinity fails, let's try without affinity. (This is trivial to reproduce - just use sysfs to turn off cpu0 after boot.) @fix
2016-08-23evas: handle thread queue creation failureJean Guyomarc'h
eina_thread_queue_create() might fail. Actually it does fail on Mac OS X under some circumstances.
2016-08-19evas software downscaler - get about 1.8x to 3x speedups for casesCarsten Haitzler (Rasterman)
this speeds up downscaling of images by somewhere between 1.8 to 3x dpeending on case and cpu etc. - this is ONLY for downscaling of an image buffer betweeb 50% width and/or height up to 100% of width and height. it's a special case optimization that cuts down the complexity of the full super sampling filter to just do a bilinear interpolation which is actually strictly correct for this size range and shouldn't drop quality. it uses fixed point (16.16) to do the sup pixel sampling. no mmx/asse or neon, but we could actually easily use it as we do use mmx/ee and neon in the bilinear upscaler to do interpolation so this would work here too. it just requires time and effort to make yet 2x more special cases and use the ASM to do the hard slog here. @optimize
2016-08-07Evas font: fix size query againDaniel Hirt
Some wrong variables were used in the rewrite at 8c6effae8ee027a928bcee79968a0b21d8250487, basically reverting the original fix.
2016-07-14Evas font: Fix width query for OpenType fonts. (rewrite)Tom Hacohen
This is essentially a cleaner redo of ef817f15f0eaec9704ec25d9468c2c8497a5bc13. Logic should be exactly the same as there, the different is that this one shares the code between OT and non OT. Please refer to that commit for more information.
2016-07-14Revert "Evas font: fix width query for OT"Tom Hacohen
This was not done correctly. This split the code, which is essentially the same for both OT and non OT. It's the same logic with some minor additions for OT, so most of the code should be together. This reverts commit ef817f15f0eaec9704ec25d9468c2c8497a5bc13.
2016-07-14Evas font: fix width query for OTDaniel Hirt
Fixes T4068. Simply querying the last glyph to determine the width of the glyph sequence won't always work, as OT can have negative offsets (adjusts the placement of a specific glyph better). The solution is to calculate the "max width" of some sequence that will guarantee us proper width results. The worst solution would be to iterate on all the glyphs and sum up the max width. This is a bit impractical. Instead, we will inspect just the "cluster" of the last glyph, if one exists. This should have no performance impact on trivial cases, and very little impact on the others. @fix
2016-07-11evas scale cache - address possible coverity deadlockCarsten Haitzler (Rasterman)
this should fix CID 1106338 where we don't lock and unlock caches in the same order.
2016-05-18efl: fix misleading indentationJean Guyomarc'h
GCC's -Wmisleading-indentation is complaining... It is a warning flag introduced in GCC 6.x, and is enabled by -Wall.
2016-05-15evas - make func indenting more redable with overflow lines alignedCarsten Haitzler (Rasterman)
2016-04-12evas gl - fix leak with font glyph texturesCarsten Haitzler (Rasterman)
some font glyphs are still allocated after tyhe last gl window is freed which means we can't make current anymore to free textures after that. this fixes that by flushing gl texture info from the font cache when the last gl windows are gone. @fix
2016-04-08Evas langauge: Prevent potential buffer overflow and clean code.Tom Hacohen
We were copying a user defined string into a fixed size buffer without doing any boundary checks. This commit fixes that. Also cleaned up similar code that was using hardcoded numbers. @fix.
2016-04-08Evas: Add API to reinit the language and use it in elementary.Youngbok Shin
Summary: evas_common_language_from_locale_* functions kept static pointers inside of its functions. Once these function was called, it was never reset. It made big problems for harfbuzz and hyphenation. Also, Elementary provides elm_language_set() API. Then we need to support it fully. @fix Test Plan: Test case for hyphenation is included in Evas test suite. Reviewers: raster, tasn, herdsman, woohyun, z-wony, Blackmole, minudf Subscribers: cedric, jpeg Differential Revision:
2016-04-01evas - fix leak because cutouts_fre .. doesnt free - it just resets to 0Carsten Haitzler (Rasterman)
this works with 7166e6b85994b19a29f05c9e2b6d75a314a3cb91 and fixes a leak added because ... free does not free! evas_common_draw_context_cutouts_real_free(0 now actually frees the rects, but evas_common_draw_context_cutouts_free() before did not. @fix (follow on from 7166e6b85994b19a29f05c9e2b6d75a314a3cb91)
2016-04-01evas sw render: fix previous thread fix to be portableCarsten Haitzler (Rasterman)
this fixes the fix 4d6a8a7fce51b5654404226668a27d52d1e30eb3 to be portable to platfomrs that do not support __thread - seemingly openbsd does not (argh!) and maybe others. so on these platforms then they dont get the optimization of keeping a cutout rect pool to avoid re-allocation. this also every 4096 draws "resets" the cutout cache so it doesnt expand and stay expanded forever. @fix
2016-03-28Evas: Add SW engine map/unmap functionsJean-Philippe Andre
Also, fix some of the code using them.
2016-03-26evas sw render: cutout rects may be used in multiple threadsCarsten Haitzler (Rasterman)
several draw funcs keep a static Cutout_Rect *rects = NULL; variable to cache cutout rects to avoid re-allocating them a lot etc. this is fast and handy but we may use these from multiple threads. thats bad .... mmmkay. so this fixes it the dirty way - makes them thread local. :) this fixes T3348 - the crash mentioned by @zmike @fix