path: root/src/lib/evas/common (unfollow)
AgeCommit message (Collapse)Author
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
2016-03-23Evas font: fix width calc in last_up_to_posDaniel Hirt
Width calculations should consider the x_bear. This has been leading to inconsistent results between wrapping calculation during layout and the final formatted size. Also, we should stop our walk only when exceeding 'x', so changed "<=" to "<". @fix
2016-03-22evas: NEON scaling up fixedJean-Philippe Andre
Summary: Previous implementation loaded data from memory first and then checked the borders. Here I check the borders first as it is for C implementation. This prevents read of non-accessible memory. Reviewers: cedric, jypark, Hermet, jiin.moon, jpeg Reviewed By: jpeg Projects: #efl Differential Revision:
2016-03-15Evas Image: Implement Gfx.Buffer get/set/copy_set APIsJean-Philippe Andre
Those APIs should provide a cleaner interface than the old data_set/data_get APIs, by making sure the operations are atomic (ie. no need to call size_set, cspace_set and then data_set). padding/duplicated borders are not supported. TODO: Implement legacy API on top of the new API, instead of this quick patch
2016-02-04Evas: Use proper language for harfbuzz shapingYoungbok Shin
Summary: Evas Text, Textblock, Textgrid keeps own language information. This language information could be vary from the result of setlocale(). Especially, Evas Textblock supports <lang> tag. The language could be changed in the middle of text. All of these language has to be used for harfbuzz shaping. @fix Test Plan: N/A Reviewers: herdsman, raster, woohyun, tasn Reviewed By: tasn Subscribers: cedric, jpeg Differential Revision:
2015-12-29Evas: Implement ARGY88 and GRY8 conversion to ARGB8888Jean-Philippe Andre
This is adding support for a deprecated function, but apparently it is used. Also, remove crazy abort() inside the data_put function. Fixes T2991
2015-12-03Evas: Move alpha functions to static_libs/drawJean-Philippe Andre
This is a pretty simple code refactor, moving pixel handling to the new draw lib.
2015-11-30Evas: use LC_MESSAGES on Windows to fix compilationVincent Torri
Compilation is broken on Windows because LC_MESSAGES does not exist on this platform Include Evil.h to provide support of LC_MESSAGES @fix
2015-11-27Revert "Evas: Temporarily hack OT_SUPPORT to fix textgrid"Tom Hacohen
Fixed in upstream, see T2865. This reverts commit 8ccea8233c144f723470da09a01487484c269440.
2015-11-25Evas: Temporarily hack OT_SUPPORT to fix textgridJean-Philippe Andre
See T2865. Since Harfbuzz 1.1.0, terminology displays fonts funnily aligned to the top. This is apparently because until 1.0.6 the y_offset was always 0 for all glyphs, but since 1.1.1 the offset is actually set. This is a TEMPORARY fix. There might be an underlying issue left here. Harfbuzz changed behaviour in this commit: commit 44f82750807475aa5b16099ccccd917d488df703 Author: Behdad Esfahbod <> Date: Wed Nov 4 20:40:05 2015 -0800 [ft] Remove font funcs that do nothing
2015-11-19Evas object: Add paragraph_direciton APIsYoungbok Shin
Summary: It adds evas_object_paragraph_direction_set, get APIs. The APIs set or get paragraph direction to/from the given object. It changes BiDi calculations and affect the direction and aligning of text. It doesn't have any effect to text without Fribidi library. The default paragraph direction is EVAS_BIDI_DIRECTION_INHERIT. If dir is EVAS_BIDI_DIRECTION_INHERIT, paragraph direction is changed according to smart parent object. If there is no smart parent object, paragraph direction works as EVAS_BIDI_DIRECTION_NEUTRAL. @feature Test Plan: Test cases included to the following files. - evas_test_textblock.c - evas_test_text.c - evas_test_object_smart.c Run "make check". Reviewers: woohyun, raster, herdsman, tasn Subscribers: c, raster, cedric Differential Revision:
2015-11-17Evas language: add full locale language getterDaniel Hirt
evas_common_language_from_locale_get truncates the country letters in the language. We don't always want that (one example is dictionaries).
2015-11-17Evas language: Fix language from locale function.Tom Hacohen
This function was trying to infer from the LANG env var, though it should have just queried the locale all along, as the language we want is the system's text language, and not necessarily the LANG variable's value. @fix.
2015-11-10Evas: Allow edje_decc to work with ETC imagesJean-Philippe Andre
This reuses the internal function data_get, data_put, image_save respecting the border information and adding support for ETC formats. @fix
2015-11-09evas: move model save/load from common to common3d.Bogdan Devichev
Summary: Move model save/load to common3d. Here also will be common algorithms and structures which will be used in all loaders and savers. See task Reviewers: cedric, Hermet, raster, Oleksander Subscribers: cedric Differential Revision: Signed-off-by: Cedric BAIL <>
2015-10-29Eet: fix decoding of embedded ETC imagesJean-Philippe Andre
Typos, lack of NULL check, excessive sizeof(type) not matching the object type, no border set, etc... This all lead to a crash and then no render (with an error message and then without...). This also simplifies the implicit loading of ETC1 as ETC2 when supported by the driver. @fix
2015-10-21evas: handling memory leak on realloc failure.Srivardhan Hebbar
Summary: Signed-off-by: Srivardhan Hebbar <> Reviewers: cedric Differential Revision: Signed-off-by: Cedric BAIL <>
2015-10-15evas - was missing evlogs for the threaded rendering handling - fixCarsten Haitzler (Rasterman)
2015-10-13evas: fix performance regression by reducing the unecessary memcpy we are doing.Cedric BAIL
Actually copying max is pretty useless and super slow. We usually have something like 1024 slot in a context, but a very small amount of them are acutally active. It would be better to actually do some kind of copy on write technique here, but as Eina_Cow doesn't handle array and we are close to a release, let's be conservative.
2015-10-05evas - region updates - go back to tiler as its fasterCarsten Haitzler (Rasterman)
the overhead didnt show up in y tests. do show up with certain expedite tests. hmmm. last time i messed with region code it was actually same speed as tiler. bonus was it was fully accurate.
2015-10-04evas render - async sw - fix context duplication by using proper dup callCarsten Haitzler (Rasterman)
valgrind pointed this one out. we access freed memory when we dup a context because the context CONTAINS ptrs to things like rects for cutouts. we didnt dup these. use the proper context dup call (and properly ref pixman color image too). this was a random bug/crash waiting to happen and valgrind caught it. suprising it hasnt turned up before :/ @fix
2015-09-25fix coverity complaint (not real bug) - CID 1324882Carsten Haitzler (Rasterman)
coverity complained on the n <=- 0 return. it will never be <= 0 if rects2 is non-null. this just should make coverity less noisy.
2015-09-24evas - make new exact regions round up to 16x16 to keep count saneCarsten Haitzler (Rasterman)
make region count sane by rounding to 16x16
2015-09-24evas cutouts - optimize to use less cpuCarsten Haitzler (Rasterman)
this optimizes draw ctxt cutouts by skipping small ones and remembering the last cutout added so it isn't double-added as well as extending the minimum cutout array to 512 and going up in blocks of 512 instead of 128. also optimize the clipping code a bit more.
2015-09-24evas tiler update handler - move to region code to be accurate and fastCarsten Haitzler (Rasterman)
this move evas tiler that does update handling to use fully correct regions using region.[xh]. this also removed old unused regionbuf code and a bunch of commented out code no longer needed. much simpler now and easier to maintain.
2015-09-10efl - set thread names for internally created threads for debuggingCarsten Haitzler (Rasterman)
2015-09-04evas: Use malloc instead of calloc in context_dupJean-Philippe Andre
Since we call memcpy right after, no need for calloc
2015-09-04evas: Add internal context_dup functionJean-Philippe Andre
This will simplify some code related to clipping and masking.
2015-08-19Evas language: fix script run codeDaniel Hirt
For script runs that start with an UNKNOWN character, the whole run was mistakenly identified as script type UNKNOWN. Also, refactored code a bit for readability. Fixes T2670. @fix
2015-08-18Evas: Add debug env var EVAS_IMAGE_NO_MMAPJean-Philippe Andre
Looking for image buffer memory leaks with Valgrind is impossible when all images are mmaped. This is intended as a DEBUG environment variable only.
2015-08-04evas: twice faster NEON intrinsics scaling up implementationCedric BAIL
Summary: Already checked it for tizen 2.3/2.4. Scaling function works properly and much faster. Reviewers: raster, jolfzverb, cedric Reviewed By: cedric Subscribers: cedric Projects: #efl Differential Revision: Signed-off-by: Cedric BAIL <>
2015-08-04evas image unload - fix free path to remove from pending listCarsten Haitzler (Rasterman)
this should fix T2580
2015-07-26evas - image data unload - try plug another possible crash pathCarsten Haitzler (Rasterman)
i am not sure if this is the odd crash i am seeing, but in theory it could be. as these crashes are rare it's hard to find and gdb is "too late" other than telling me the image is freed already by the time we do an unload.
2015-07-24evas - image unload - fix unload to only unload imgs needing itCarsten Haitzler (Rasterman)
need_unload seems to have been done wrong. using preload not need_unload. no idea why it checked/cleared preload instead of need_unload.
2015-07-16evas_image : fix unloads cleanup logicHosang Kim
Summary: Now Evas gl preload feature is disabled. But if it is turned on, memory crash occurs. Because evas_gl_common_texture_upload is not excuted immediately. Test Plan: EVAS_GL_PRELOAD=1 ELM_ENGINE=gl elementary_test -to "photocam" Reviewers: raster, cedric, woohyun, seoz, Hermet, singh.amitesh, jpeg Subscribers: jpeg, cedric Differential Revision: Signed-off-by: Jean-Philippe Andre <>
2015-07-12evas - unload/scalecache self-feeding loop unload/reload fixCarsten Haitzler (Rasterman)
i was runing perf top and noticed that evas_image_load_file_data_eet(0 was being called. in fact - it was #1 on the list of functions being called. why? it didn't make sense. i found out. just a blinking cursor in terminology was causing the background to be unloaded and re-loaded. the new "actually unload" changes for 1.15 made this happen and thus we kept sucking in new data all the time even if the scalecache already had the data - and that was the problem. so now calcecache prepare tells you if you don't have cached data and if you likely then have to ensure the data is loaded. this cuts down quite a bit of work. while i'm at it... we definitely need to clean house on the internals of evas. a decade+ of features, mess, optimizations needs to be fixed. i mean really house-cleaned. rewritten clenl;y re-using existing code where appropriate.
2015-07-09evas: Init need_unload value after unload.Hosang Kim
Summary: @fix Reviewers: seoz, cedric, woohyun, raster Reviewed By: raster Subscribers: cedric Differential Revision:
2015-07-07evas: Remove unused variableChris Michael
Signed-off-by: Chris Michael <>