Commit Graph

583 Commits

Author SHA1 Message Date
Carsten Haitzler c1c7ad8360 evas color copy neon asm - declare tmp as output not input for warning--
less warnings - use output not input for tmp var. much better.
2017-02-12 00:32:22 +09:00
Carsten Haitzler f4088a1f74 evas smooth scaler - fix warning where indenting is misleading
indeed the indenting is misleading. fix.
2017-02-12 00:29:49 +09:00
Carsten Haitzler 40af2935af evas blit main - put mmx funcs in ifdefs as they are not used on arm
fixes warning
2017-02-12 00:29:49 +09:00
Carsten Haitzler 5424345c46 evas draw func get - make pixels as unused as it is in neon asm cases
also a little shitespace cleanup and correct ()ing of ops to clean
this function up a bit.
2017-02-12 00:29:41 +09:00
Carsten Haitzler f00dbd2252 evas convert color - neon asm - fix warning by casting - no side effects
it's a warning one way or another so reduce noise with a harmless case
as passing in a pit ro a 32bit type is more restrictive than the ptr
it accepts (an 8bit type)
2017-02-11 23:13:00 +09:00
Cedric BAIL 5ac43bb26d evas: use the right structure to not over allocate memory.
Eina_Trash is designed for storing cached pointer without any memory
consumption. Please be careful with EFL memory consumption.
2017-02-10 14:27:29 -08:00
Carsten Haitzler a84370fcd8 evas yuv convert - fix unused increments
this removes useless yp1 += and yop2 += as they are SET int he loop.
this fixes 1367510 and 1367511
2017-02-08 21:19:39 +09:00
Carsten Haitzler b5348e47cc evas image load - remove unreachable code
it's just printing a warning anyway and coverity CID 1368210 is right
as it says it's unreachable. fix.
2017-02-08 21:19:39 +09:00
Carsten Haitzler c657d41fc3 evas image load - handle null module handle in case
this fixes CID 1368338
2017-02-08 21:19:39 +09:00
Carsten Haitzler a909ca1f68 evas draw context - reduce size and allocations and frees
so a little perf fun shows malloc/free/realloc/etc. are, combined a
reasonable overhead. this reduced malloc overhead for draw contexts so
whne we duplicate them or create new ones, we re-use a small cache of
8 of them to avoid re-allocation. just take the first one from the
list as it really is that simple. mempool would not have helped more
here and cost more overhead.

@optimize
2017-01-31 23:01:50 +09:00
Cedric BAIL 8f1c071d6a eina: rename EINA_{FLT,DBL}_CMP to EINA_{FLT,DBL}_EQ. 2017-01-06 15:58:46 -08:00
Jiyoun Park 8ee0c30eb0 evas_image_main: fix memory leak of camera app -PLM[P161206-03545]
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 https://phab.enlightenment.org/D2823

I tested photocam, but crash doesn't occur anymore, even though removing flag check.
2017-01-06 15:40:09 +09:00
Carsten Haitzler 3842e87d3a evas image skip header - more fixes for when images fail to load
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-06 09:38:44 +09:00
Carsten Haitzler 309e490bc0 efl header skip with preload - fix seg on invalid file
for invalid files we didn't handle this case, so fix it - recent
commit/feature add.
2017-01-04 20:18:42 +09:00
Haegeun Park 0ac95c40bc [Evas GL Thread 1] evas: Fixed indentation of evas_thread_render.c
Summary:
@fix

Change-Id: I411fe6d75dc7b15c0d7f19f165ea4b0cc3b28c12

Reviewers: sung, jpeg, cedric, raster

Subscribers: cedric, jpeg

Differential Revision: https://phab.enlightenment.org/D4525
2017-01-04 15:30:21 +09:00
Carsten Haitzler 2cb621fe4a evas loader - don't stat NULL file paths
something i found valgrinding my recent async improvments. statting
null path. fix it.
2017-01-02 22:58:24 +09:00
Carsten Haitzler 9e01cf2698 evas image async preload - add option to also make header load async
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-02 18:53:56 +09:00
Carsten Haitzler b0530aba4f evas cutouts - quickly avoid huge per issues with large nos of cutouts
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
2017-01-02 18:53:56 +09:00
Carsten Haitzler ef49935f72 evas - clean up whitespace and 80 column wrapping and commented out code
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-28 13:31:48 +09:00
Carsten Haitzler 8424c2b4a3 evas - use freeq for common and cache images
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-28 12:40:14 +09:00
Jean-Philippe Andre 2f1d666a06 evas: PNG save of ARGY88 needs unpremul
PNG saves unpremultiplied values, so we need to do that
for the newly supported ARGY88 colorspace as well. Fixes
the previous commit.
2016-12-22 19:23:01 +09:00
Chris Michael f427050b61 evas: remove float comparison warnings for evas_convert_color
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2016-12-20 10:25:51 -05:00
Cedric BAIL 224ba8586b evas: fix use of signed and unsigned type in conditional expression warning. 2016-12-15 11:28:17 -08:00
Cedric BAIL e1843b2ced evas: fix potential use of unitialized variable. 2016-12-15 11:27:54 -08:00
Hermet Park 7d7c17c22a evas common: disable thread_queue feature on win32.
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-01 20:04:58 +09:00
Hermet Park c7620cf83c evas common: fix a typo. 2016-12-01 17:12:42 +09:00
Jean-Philippe Andre 69a684cf04 evas: Fix a few issues after init/shutdown/init
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-23 23:48:53 +09:00
Wonki Kim 88e1fc9613 evas: Add shutdown logic on thread creation failure
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: https://phab.enlightenment.org/D4411

Note (@jpeg):
I have modified the patch just a little bit.

Signed-off-by: Jean-Philippe Andre <jp.andre@samsung.com>
2016-11-22 14:50:38 +09:00
Chris Michael 2da9ce5921 evas: Cleanup unused variables when compiling for Neon
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 <cp.michael@samsung.com>
2016-11-18 11:30:29 -05:00
Chris Michael 31c7303425 evas: Remove unused variables
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 <cp.michael@samsung.com>
2016-11-18 11:30:29 -05:00
Cedric BAIL 53dd596f43 evas: reduce usage of __thread directive.
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-16 16:05:56 -08:00
Stefan Schmidt 21e35157ec evas: fix typo in thread name setting for ecore-pipe
Thanks to Vincent Torri for pointing this out.
2016-11-15 12:00:21 +01:00
Carsten Haitzler 51b2789a35 evas lang unicode tables - reduce memory by 24k+1324 bytes
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-11-03 22:22:54 +09:00
Sungtaek Hong 57c4d83b2e evas: remove unnecessary check for clip coords.
Summary: (dst_clip_w <= 0 || dst_clip_h <= 0) is already checked.

Reviewers: jpeg, cedric, Hermet

Reviewed By: Hermet

Subscribers: conr2d

Differential Revision: https://phab.enlightenment.org/D4303
2016-09-21 17:41:47 +09:00
Derek Foreman e2875cefc4 eina_cpu, evas: Remove _eina_cpu_fast_core_get, don't set render thread affinity
We've decided it would be best to just let the scheduler do its job.
2016-09-20 11:38:57 -05:00
Daniel Hirt f68a925d81 Evas font: force freetype v35 ttf interpreter
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-20 11:29:38 +03:00
Derek Foreman 541b72dcb2 render_thread: Attempt to set affinity to a random fast core
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-19 09:40:43 -05:00
Stefan Schmidt 6bf537d43d Revert "render_thread: Attempt to set affinity to a random fast core"
This reverts commit a17ac66f0a.

This change broke every efl build locally, as well as on Jenkins, for me.

CLD     lib/ethumb_client/libethumb_client.la
/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-19 10:45:56 +02:00
Derek Foreman a17ac66f0a render_thread: Attempt to set affinity to a random fast core
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-16 14:10:49 -05:00
Hermet Park e8fcc41e40 evas map: fix the rendering problem.
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-12 16:50:00 +09:00
Jean-Philippe Andre b2d92f2626 evas: Implement support for external buffers
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 cs.data 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-06 16:55:00 +09:00
Jean-Philippe Andre 2f737e8f3b evas: Change internal function image_data_direct 2016-09-06 16:54:54 +09:00
Jean Guyomarc'h 9a82b17eff evas: don't redefine PAGE_SIZE if already defined
On OSX, we include mach.h (via the inlined locks API), which
already defines PAGE_SIZE.
2016-08-29 20:03:52 +02:00
Derek Foreman e0c1f4a2a7 evas: Try harder to create the render thread
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-24 14:34:36 -05:00
Jean Guyomarc'h 469cf26873 evas: handle thread queue creation failure
eina_thread_queue_create() might fail.
Actually it does fail on Mac OS X under
some circumstances.
2016-08-23 21:15:24 +02:00
Carsten Haitzler a739d4d7da evas software downscaler - get about 1.8x to 3x speedups for cases
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-19 11:08:55 +09:00
Daniel Hirt 24ccd475b8 Evas font: fix size query again
Some wrong variables were used in the rewrite at
8c6effae8e, basically reverting the original fix.
2016-08-07 11:26:53 +03:00
Tom Hacohen 8c6effae8e Evas font: Fix width query for OpenType fonts. (rewrite)
This is essentially a cleaner redo of ef817f15f0.
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-14 17:32:01 +01:00
Tom Hacohen 281043e357 Revert "Evas font: fix width query for OT"
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 ef817f15f0.
2016-07-14 17:24:38 +01:00
Daniel Hirt ef817f15f0 Evas font: fix width query for OT
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-14 12:22:44 +00:00
Carsten Haitzler 98a02fc17c evas scale cache - address possible coverity deadlock
this should fix CID 1106338  where we don't lock and unlock caches in
the same order.
2016-07-11 21:45:39 +09:00
Jean Guyomarc'h 147ef32b2b efl: fix misleading indentation
GCC's -Wmisleading-indentation is complaining...
It is a warning flag introduced in GCC 6.x, and
is enabled by -Wall.
2016-05-18 21:57:02 +02:00
Carsten Haitzler 25c42176e6 evas - make func indenting more redable with overflow lines aligned 2016-05-15 23:59:14 +09:00
Carsten Haitzler af4c3c0fe1 evas gl - fix leak with font glyph textures
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-12 12:47:30 +09:00
Tom Hacohen 8203c79678 Evas langauge: Prevent potential buffer overflow and clean code.
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-08 11:34:53 +01:00
Youngbok Shin f4f9753c20 Evas: Add API to reinit the language and use it in elementary.
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: https://phab.enlightenment.org/D3864
2016-04-08 11:24:32 +01:00
Carsten Haitzler b132ce65ec evas - fix leak because cutouts_fre .. doesnt free - it just resets to 0
this works with 7166e6b859 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 7166e6b859)
2016-04-01 17:54:37 +09:00
Carsten Haitzler 7166e6b859 evas sw render: fix previous thread fix to be portable
this fixes the fix 4d6a8a7fce 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-04-01 11:29:50 +09:00
Jean-Philippe Andre d5b0b1e683 Evas: Add SW engine map/unmap functions
Also, fix some of the code using them.
2016-03-28 16:40:01 +09:00
Carsten Haitzler 4d6a8a7fce evas sw render: cutout rects may be used in multiple threads
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-26 10:52:14 +09:00
Daniel Hirt 4013dccda6 Evas font: fix width calc in last_up_to_pos
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-23 15:31:20 +02:00
Jean-Philippe Andre b82382e958 evas: NEON scaling up fixed
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: https://phab.enlightenment.org/D3809
2016-03-22 13:49:05 +09:00
Jean-Philippe Andre c52a53c3dc Evas Image: Implement Gfx.Buffer get/set/copy_set APIs
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-03-15 11:11:59 +09:00
Youngbok Shin 33ea565347 Evas: Use proper language for harfbuzz shaping
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: https://phab.enlightenment.org/D3628
2016-02-04 10:07:08 +00:00
Jean-Philippe Andre 2ac9e788c6 Evas: Implement ARGY88 and GRY8 conversion to ARGB8888
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-29 22:05:50 +09:00
Jean-Philippe Andre b5500a8644 Evas: Move alpha functions to static_libs/draw
This is a pretty simple code refactor, moving pixel handling
to the new draw lib.
2015-12-03 18:42:50 +09:00
Vincent Torri db8d1883d7 Evas: use LC_MESSAGES on Windows to fix compilation
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-30 16:28:02 +00:00
Tom Hacohen 2c9a79e939 Revert "Evas: Temporarily hack OT_SUPPORT to fix textgrid"
Fixed in upstream, see T2865.

This reverts commit 8ccea8233c.
2015-11-27 12:34:15 +00:00
Jean-Philippe Andre 8ccea8233c Evas: Temporarily hack OT_SUPPORT to fix textgrid
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 <behdad@behdad.org>
  Date:   Wed Nov 4 20:40:05 2015 -0800

      [ft] Remove font funcs that do nothing
2015-11-25 16:44:04 +09:00
Youngbok Shin a9b4be11e1 Evas object: Add paragraph_direciton APIs
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: https://phab.enlightenment.org/D1690
2015-11-19 11:43:39 +00:00
Daniel Hirt 4c086b6e1b Evas language: add full locale language getter
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-17 16:20:21 +02:00
Tom Hacohen 8fcf9a0fe6 Evas language: Fix language from locale function.
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-17 12:07:42 +00:00
Jean-Philippe Andre 7974f674aa Evas: Allow edje_decc to work with ETC images
This reuses the internal function data_get, data_put, image_save
respecting the border information and adding support for ETC
formats.

@fix
2015-11-10 16:12:21 +09:00
Bogdan Devichev f416f5adde evas: move model save/load from common to common3d.
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 https://phab.enlightenment.org/T2713.

Reviewers: cedric, Hermet, raster, Oleksander

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D3030

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-11-09 15:27:26 -08:00
Jean-Philippe Andre cc5cccc511 Eet: fix decoding of embedded ETC images
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-29 17:58:34 +09:00
Srivardhan Hebbar be464e5843 evas: handling memory leak on realloc failure.
Summary: Signed-off-by: Srivardhan Hebbar <sri.hebbar@samsung.com>

Reviewers: cedric

Differential Revision: https://phab.enlightenment.org/D3212

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-10-21 13:40:01 -07:00
Carsten Haitzler 0bca7af2e8 evas - was missing evlogs for the threaded rendering handling - fix 2015-10-15 19:29:40 +09:00
Cedric BAIL 8a39069b64 evas: fix performance regression by reducing the unecessary memcpy we are doing.
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-13 12:10:34 -07:00
Carsten Haitzler 5801013ad4 evas - region updates - go back to tiler as its faster
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-05 18:41:00 +09:00
Carsten Haitzler 8a4ddea224 evas render - async sw - fix context duplication by using proper dup call
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-10-04 16:58:42 +09:00
Carsten Haitzler 1b6e3f2611 fix coverity complaint (not real bug) - CID 1324882
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-25 11:17:54 +09:00
Carsten Haitzler 974e82c5e5 evas - make new exact regions round up to 16x16 to keep count sane
make region count sane by rounding to 16x16
2015-09-24 20:45:14 +09:00
Carsten Haitzler 217faeebe8 evas cutouts - optimize to use less cpu
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-24 14:09:20 +09:00
Carsten Haitzler 49adf8aa47 evas tiler update handler - move to region code to be accurate and fast
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-24 14:09:09 +09:00
Carsten Haitzler 5b2baf173e efl - set thread names for internally created threads for debugging
@feature
2015-09-10 15:17:08 +09:00
Jean-Philippe Andre 3e640ab226 evas: Use malloc instead of calloc in context_dup
Since we call memcpy right after, no need for calloc
2015-09-04 15:02:48 +09:00
Jean-Philippe Andre 69cbbc2184 evas: Add internal context_dup function
This will simplify some code related to clipping and masking.
2015-09-04 11:11:39 +09:00
Daniel Hirt a197aa366b Evas language: fix script run code
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-19 17:16:42 +03:00
Jean-Philippe Andre ea001c3ec1 Evas: Add debug env var EVAS_IMAGE_NO_MMAP
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-18 18:31:39 +09:00
Cedric BAIL 10fb77cc55 evas: twice faster NEON intrinsics scaling up implementation
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: https://phab.enlightenment.org/D2881

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-08-04 17:34:29 +02:00
Carsten Haitzler d31098fcec evas image unload - fix free path to remove from pending list
this should fix T2580
2015-08-04 10:47:38 +09:00
Carsten Haitzler 17823d21ea evas - image data unload - try plug another possible crash path
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-26 03:02:06 +09:00
Carsten Haitzler 5b1e3b3a89 evas - image unload - fix unload to only unload imgs needing it
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-24 23:21:55 +09:00
Hosang Kim 51b097c014 evas_image : fix unloads cleanup logic
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: https://phab.enlightenment.org/D2823

Signed-off-by: Jean-Philippe Andre <jp.andre@samsung.com>
2015-07-16 20:15:12 +09:00
Carsten Haitzler 59db1cd0e2 evas - unload/scalecache self-feeding loop unload/reload fix
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-12 13:17:08 +09:00
Hosang Kim eeec176166 evas: Init need_unload value after unload.
Summary: @fix

Reviewers: seoz, cedric, woohyun, raster

Reviewed By: raster

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D2803
2015-07-09 12:04:40 +09:00
Chris Michael 0c0ec74ee2 evas: Remove unused variable
Signed-off-by: Chris Michael <cp.michael@samsung.com>
2015-07-07 09:00:04 -04:00
Carsten Haitzler ec6ddf59e2 evas - image core - fix unloading of images to work again
i think this has been disabled for a while. image unloading is broken
- esp with gl enigne as due to async move it was effectively disabled.

this re-enables it. unloading is deferred with a managed list of things
needing unloading and then when any async sw renders are not busy any
more - do the unload then in the mainloop of all pending/flagged
images to unload

@fix
2015-07-07 21:38:21 +09:00
Daniel Kolesa c709f1dca2 eolian/generator: constify all prototypes for @const functions
Otherwise there would be conflicts in certain circumstances.

This also requires adding const on many existing functions,
and similar work is necessary in Elementary.

@fix
2015-06-25 12:18:43 +01:00
Oleksandr Shcherbina d409df1caa evas: change interface evas_3d to evas_canvas3d
Summary:
Regard to https://phab.enlightenment.org/T2479 it is need for right generation
Eolian files

Reviewers: cedric

Subscribers: cedric, tasn

Differential Revision: https://phab.enlightenment.org/D2711

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-06-17 17:52:17 +02:00
Stefan Schmidt 9434c0992c evas/evas_op_add_main: Remove superfluous if branch.
We do the same in both branches: return func.

CID: 1267478, 1267480, 1267482, 1267486
2015-06-09 10:38:40 +02:00
Stefan Schmidt 0da6dbb159 evas/evas_op_mul_main: Remove superfluous if branch.
We do the same in both branches: return func.

CID: 1267468, 1267471
2015-06-09 10:38:40 +02:00
Stefan Schmidt 9df111d766 evas/evas_op_mask_main: Remove superfluous if branch.
We do the same in both branches: return func.

CID: 1267481, 1267485
2015-06-09 10:38:40 +02:00
Stefan Schmidt 64a60f32a9 evas/evas_op_copy_main: Remove superfluous if branch.
We do the same in both branches: return func.

CID: 1267483, 1267484, 1267487, 1267488
2015-06-09 10:38:40 +02:00
Stefan Schmidt c4dd19c2df evas/evas_op_blend_main: Remove superfluous if branch.
We do the same in both branches: return func.

CID: 1267469, 1267470, 1267473, 1267474
2015-06-09 10:38:40 +02:00
Stefan Schmidt 85e5e9da5b evas/evas_op_sub_main: Remove superfluous if branch.
We do the same in both branches: return func.

CID: 1267476, 1267477, 1267479, 1267489
2015-06-09 10:38:40 +02:00
Carsten Haitzler cc49c1702b evas - fix yuv support to no longer ignore 709 colorspace params
if yuou use 709 instead of 601 yuv (ycbcr) evas will just be wrong and
use 601. this fixes that and implements 709. it also fixes a scaling
bug for yuv in the gl engine. no one noticed but me, so i won't call
this a bug fix, and it can go into the next efl release - no need to
backport unless it actually bothers peolpe (which it seemingly doesn't)
2015-05-27 20:19:46 +09:00
Carsten Haitzler bd1d996545 evas font draw - fix up some whitespace/indenting/formatting 2015-05-18 17:13:38 +09:00
Yury Usishchev 835c393d17 evas: add support for BUILD_NEON_INTRINSICS to evas_convert_rgb_32.c
Summary: This fixes build for aarch64 when TILE_ROTATE is disabled and BUILD_NEON is enabled(it is enabled by default for aarch64 since https://phab.enlightenment.org/D2309).

Reviewers: cedric, raster

Subscribers: cedric

Projects: #efl

Differential Revision: https://phab.enlightenment.org/D2498

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-05-13 16:20:22 +02:00
Cedric BAIL 45bba2439d evas: do not cast uint64x1_t to int in evas_common_convert_argb_premul
Summary:
In GCC 5.1 arm_neon header for aarch64 was changed. It is not possible anymore to silently cast uint64x1_t to int.

So replace cast with proper getter function to avoid following error:
lib/evas/common/evas_convert_color.c:50:18: error: incompatible types when assigning to type 'DATA32 {aka unsigned int}' from type 'uint64x1_t'
nas += vpaddl_u32(vpaddl_u16(vpaddl_u8(cmp)));

Reviewers: raster, cedric, devilhorns

Subscribers: cedric

Projects: #efl

Differential Revision: https://phab.enlightenment.org/D2443

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-05-07 09:53:12 +02:00
Cedric BAIL ad1076525a evas: implement _op_blend_rel_mas_c_dp_neon using NEON intrinsics
Summary: NEON intrinsics can be built both for armv7 and armv8.

Reviewers: raster, cedric

Reviewed By: cedric

Subscribers: cedric

Projects: #efl

Differential Revision: https://phab.enlightenment.org/D2442

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-05-07 09:53:11 +02:00
Cedric BAIL 2c2983aadb evas: implement _op_blend_rel_{p,pan}_dp_neon using NEON intrinsics
Summary: NEON intrinsics can be built both for armv7 and armv8.

Reviewers: raster, cedric

Subscribers: cedric

Projects: #efl

Differential Revision: https://phab.enlightenment.org/D2441

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-05-07 09:53:11 +02:00
Cedric BAIL 10ece61dbf evas: implement _op_blend_rel_c_dp_neon using NEON intrinsics
Summary: NEON intrinsics can be built both for armv7 and armv8.

Reviewers: raster, cedric

Reviewed By: cedric

Subscribers: cedric

Projects: #efl

Differential Revision: https://phab.enlightenment.org/D2440

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-05-07 09:53:11 +02:00
Cedric BAIL d364cbdadd evas: implement _op_blend_rel_p_c_dp_neon using NEON intrinsics
Summary:
NEON intrinsics can be built both for armv7 and armv8.

There were no NEON variant for this function, so it was added with all copies to init function.

Reviewers: raster, cedric

Reviewed By: cedric

Subscribers: cedric

Projects: #efl

Differential Revision: https://phab.enlightenment.org/D2417

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-05-07 09:53:11 +02:00
Cedric BAIL 76a5efe13a evas: implement pixel_color blending functions using NEON intrinsics.
Summary:
NEON intrinsics can be built both for armv7 and armv8.
Implemented functions:
_op_blend_pan_c_dp_neon
_op_blend_p_can_dp_neon
_op_blend_pan_can_dp_neon
_op_blend_p_caa_dp_neon
_op_blend_pan_caa_dp_neon

Reviewers: raster, cedric

Subscribers: cedric

Projects: #efl

Maniphest Tasks: T2341

Differential Revision: https://phab.enlightenment.org/D2409

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-05-07 09:53:11 +02:00
Cedric BAIL 657d495aa9 evas: implement _op_blend_p_mas_dp_neon and _op_blend_pas_mas_dp_neon in NEON intrinsics.
Reviewers: raster, cedric

Reviewed By: cedric

Subscribers: cedric

Projects: #efl

Differential Revision: https://phab.enlightenment.org/D2391

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-05-07 09:53:09 +02:00
Cedric BAIL 8fa4d415e4 evas: improve _op_blend_p_dp_neon intrinsics implementation
Summary:
Use vceqq and vbsl instead of twice as much vmovl and vadd instructions.
Replace vaddq_u8 with vaddq_u32.
This allows NEON code to behave exactly like C version.

Reviewers: raster, cedric

Reviewed By: cedric

Projects: #efl

Differential Revision: https://phab.enlightenment.org/D2361

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-05-07 09:53:09 +02:00
Yury Usishchev 970afe9bea evas: implement _op_blend_mas_can_dp_neon in NEON intrinsics.
Reviewers: raster, cedric

Reviewed By: cedric

Projects: #efl

Differential Revision: https://phab.enlightenment.org/D2369

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-05-07 09:53:09 +02:00
Yury Usishchev be7c7c2c77 evas: implement _op_blend_p_c_dp_neon in NEON intrinsics.
Reviewers: cedric, raster

Projects: #efl

Differential Revision: https://phab.enlightenment.org/D2366

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-05-07 09:53:09 +02:00
Yury Usishchev a0d0c98839 evas: improve _op_blend_mas_c_dp_neon intrinsics implementation.
Summary:
Use vceqq and vbsl instead of twice as much vmovl and vadd instructions.
Replace vaddq_u8 with vaddq_u32.
This allows NEON code to behave exactly like C version.

Reviewers: cedric, raster

Projects: #efl

Differential Revision: https://phab.enlightenment.org/D2362

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-05-07 09:53:08 +02:00
Yury Usishchev d2c5730b81 evas: implement _op_blend_mas_c_dp_neon in NEON intrinsics.
Reviewers: raster

Subscribers: cedric

Projects: #efl

Differential Revision: https://phab.enlightenment.org/D2312
2015-05-07 09:53:08 +02:00
Yury Usishchev 9caa6a3597 evas: implement _op_blend_p_dp_neon and _op_blend_pas_dp_neon in NEON intrinsics.
Reviewers: raster, cedric

Reviewed By: cedric

Subscribers: cedric

Projects: #efl

Differential Revision: https://phab.enlightenment.org/D2311
2015-05-07 09:53:08 +02:00
Yury Usishchev a30481d27b evas: implement _op_blend_c_dp_neon in NEON intrinsics.
Reviewers: raster, cedric

@feature

Reviewed By: cedric

Subscribers: jpeg, cedric

Projects: #efl

Differential Revision: https://phab.enlightenment.org/D2310

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-05-07 09:53:08 +02:00
Yury Usishchev 71eec44ccc evas: enable NEON-optimized code for aarch64.
Summary:
Add new define, BUILD_NEON_INTRINSICS to control whether NEON inline code or
NEON intrinsics should be built.

GCC NEON intrinsics can be built both for armv7 and armv8. However NEON inline
code can be built only for armv7.

@feature

Reviewers: raster, stefan_schmidt, cedric

Subscribers: cedric, stefan_schmidt

Projects: #efl

Differential Revision: https://phab.enlightenment.org/D2309

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-05-07 09:53:08 +02:00
Tom Hacohen 450ff212e2 Evas text utils: move the non-ot function into the current ifdef.
This function should only be build when OT is off. Move
it to the #else part of the ifdef.
2015-04-22 13:11:58 +01:00
Jean-Philippe Andre 02d94f5e5e Evas tiler: Remove unused functions (clang)
rect_list_add_split_strict is still kept for reference in
eina_tiler.c
2015-04-21 20:46:04 +09:00
Jean-Philippe Andre de567368f8 Evas: Fix clang warning (actually use function)
Those helper functions are barely ever used...
2015-04-21 20:16:21 +09:00
Cedric BAIL 3b46609140 evas: _op_blend_p_dp_neon and _op_blend_pas_dp_neon miscalculation fix
Summary:
When processing random data result of this function differs from C variant in more than 50% cases.
This difference is due to alpha calculation, in C code :

alpha = 256 - (*s >> 24)

in NEON:

"vmvn.u8 q4,q0 \n\t"
// ie ~(*s>>24) === 255 - (*s>>24)

We cant just add "1" as overflow will occur in case (*s>>24) == 0 (we use only 8 bit per channel in vector registers)
So here is the solution:
copy *d right before multiplication and add it to the result of it later.

Same approach as in D455.

Reviewers: raster, cedric, stefan_schmidt

Reviewed By: cedric

Subscribers: cedric

Projects: #efl

Differential Revision: https://phab.enlightenment.org/D2308

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2015-04-10 12:05:05 +02:00
Jean-Philippe Andre 3fd7f199da Evas: Fix use of uninitialized values
Not a meaningful issue, but let's make Coverity happy.
Fixes:
 - CID 1293522
 - CID 1293521
2015-04-10 11:34:50 +09:00
Jean-Philippe Andre 464e6ca987 Evas masking: Avoid potential crashes (SW)
Make sure not to sample the mask image outside its boundaries.
This is a series of last resort checks. I can not reproduce the
crashes but know they have happened.

I used EINA_UNLIKELY more for clarity than for compiler optimizations.
2015-04-08 18:17:34 +09:00
ChunEon Park 1e33454772 evas common: make logic same to c code version.
As C version,
It increase alpha value by 1 to avoid loosing of the remains while it divides
values. Neon version does same technique to make same results.
2015-04-07 23:06:43 +09:00
ChunEon Park 51d60e649c evas common: NEON version of evas_common_convert_argb_premul.
This patch reduces power consumption by around 18mA in certain scenarios
(music player list scroll, my files sound list scroll), making
evas_common_convert_argb_premul() ~60% faster (6.2msec->2.6msec).

Take music-player application, make 100 copies of the standard
Over the Horizon” song, scroll up and down to see those
downscaled-from-720x720 thumbnails enter and leave the screen.
Every time a list item enters the screen, the image is re-read
(as evas image cache is not large enough to store more than two
pictures of that size), and one call of _common_convert_argb_premul()
occurs, taking ~6.2msec (which is not much compared to ~60msec
spent in libpng->libz (the biggest bottleneck here),
but still noticeable).

A similar power consumption improvement is observed during
scrolling sounds list of the same files in My Files application
(just with idle level ~100mA lower).

We also checked the new code to be correct on random input data.

all tests are performed based on tizen device.

Signed-Off-By: Artem Dergachev <dergachev.a@samsung.com>
2015-04-07 23:05:40 +09:00
ChunEon Park 7a6eb2ea42 evas/common: improve evas_common_convert_argb_unpremul() computation.
prev logic increased the alpha channel by 1 so the unpremul resulted in the color got too diff from the origin.

We can't avoid losing the rest values while dividing values in premul/unpremul()
but this will recover the value better closed to origin value.
2015-04-06 22:02:49 +09:00
Cedric BAIL c2e75544e1 efl: move mmap API to be part of Efl_File class. 2015-04-03 16:23:13 +02:00
ChunEon Park 2b0fb1ea1d evas/common Fixed incorrect blend pixel color logic in neon.
previously, it had the remaining value issues on blending computation.
The blending color result was in correct.

Signed-Off-By: Vladimir Kuramshin <v.kuramshin@samsung.com>
2015-04-03 19:48:30 +09:00
Carsten Haitzler 377e94263b evas - font - new color bitmap support - rename funcs to match file 2015-03-20 10:49:49 +09:00
Youngbok Shin e197f8804f evas: Support bitmap embedded color font.
Summary:
Add the code for getting bitmap buffers from embedded color font,
And draw the bitmap buffers as images.
For drawing the bitmap buffers as images,
evas_common_draw_context_font_ext_set internal API is changed to
pass additional gl engine functions.
T2139
@feature

Test Plan:
1. Set a bitmap embedded color font to textblock.
2. Set a unicode emoticon text.
3. See the result.

Please check the sample unicode in the following link.
http://www.fileformat.info/info/unicode/char/1f3af/index.htm
http://www.fileformat.info/info/unicode/char/1f555/index.htm
http://www.fileformat.info/info/unicode/char/2600/index.htm
http://www.fileformat.info/info/unicode/char/263a/index.htm

Reviewers: tasn, woohyun, jpeg, raster

Reviewed By: raster

Subscribers: herdsman, cedric

Differential Revision: https://phab.enlightenment.org/D2084
2015-03-19 19:02:03 +09:00
Carsten Haitzler 6d5b2b32a0 evas scale sample - fix useage of eina thread queue
pass in ref not &ref (other uses were fine - this single one broken)
2015-02-27 10:35:01 +09:00
Cedric BAIL 1af679dbd5 Revert "Revert "evas: refcounting initialisation and protect things.""
This reverts commit 789633b321.

Now this should be useful since we have refactored the shutdown logic of all engine.
2015-02-23 11:36:03 +01:00
Cedric BAIL 93333ede15 evas: refactor shutdown. 2015-02-23 11:35:29 +01:00
Cedric BAIL 789633b321 Revert "evas: refcounting initialisation and protect things."
This reverts commit 216397bea6.

We do have some engine that are doing partial shutdown outside of the protected
function, leading to a crash.
2015-02-20 17:39:27 +01:00
Cedric BAIL 6bb4ecd65d evas: use two thread when scaling image.
This is for now just a small experiment. It was based on the experiment made
with OpenMP. I prefered to only use Eina here as we have already all the infrastructure
to do this nicely and simply. As a result I get a 65% speed improved on average for
the involved scaling operation. The secondary CPU is on my laptop running with a load of
75% percent. I don't have right now the time to do power consumption analysis, but I
think it shouldn't be to bad. I am also not throwing more core at this as we are not able
to use the second core at its max already, so additional core may result in a bigger
energy loss without enough gain.
2015-02-20 17:11:44 +01:00
Cedric BAIL 216397bea6 evas: refcounting initialisation and protect things. 2015-02-20 15:10:12 +01:00
Cedric BAIL 552a38cde5 evas: refactor software engine initialisation. 2015-02-20 15:04:52 +01:00
Jean-Philippe Andre 888fc6e93f Evas masking: Fix potential issues with map & masking
These bugs have not been observed but the code logic did not
make sense.

@fix
2015-02-10 11:39:24 +09:00
Jean-Philippe Andre c394479afe Evas masking: Fix some garbage pixels with the SW engine
A rare case of garbage data would happen if smooth scaling
was called with a mask and 1:1 scaling. Use the proper
render_op to COPY for the first pass.

@fix
2015-02-10 11:39:24 +09:00
Daniel Zaoui 87d523478b warning-- 2015-01-21 20:42:58 +02:00
Carsten Haitzler d5c3ad97e5 evas map aa - match previous fix.
this matches 83eb1aa3c2 fix in the other
map render func
2015-01-07 21:04:58 +09:00
Jean-Philippe Andre 267b8a5ead Evas map: Fix AA with opaque images
Well... actually this is not exactly a fix.
It just restores the previous behaviour, and allows AA to
work. As in, it won't draw ugly black lines but properly
blend to transparent.

But there is still a problem:

The image map render function changes the alpha flag on the source
image if AA is enabled or if the map has an alpha color. This is
actually wrong as images forcefully set to not have any alpha
(with evas_object_image_alpha_set(0)) will then not be opaque
anymore.

Right now I can't think of a solution (also I don't quite follow
the entire pipeline in evas map...). Changing the flag will
make some opaque areas transparent. Not changing the flag will
produce ugly artifacts where AA blending should happen. Fix one
bug and the other appears, and vice versa.

This can be tested with the example evas-map-aa and adding an
alpha channel to cube1.png (with gimp for instance) but manually
setting alpha to 0 in the code. Weird stuff will happen (try
playing with the map and pressing I to switch to/from image mode).
2015-01-07 20:21:16 +09:00
Jean-Philippe Andre 37f3d00a5c Evas map: Kill build warnings and don't set image flag
Don't change a source image alpha flag at render time.
It doesn't make sense at this point.

Also remove unused int pa.
2015-01-07 17:50:33 +09:00
Carsten Haitzler 83eb1aa3c2 evas map - new aa map has extra overflow with line list - fix it.
this fixes a feature added in this version of efl. as above.
2015-01-07 17:23:24 +09:00
Jean-Philippe Andre b601d89f45 Evas masking: Fix a potential issue with pixman
Untested. Just skip pixman path when there's a mask.
2015-01-07 16:48:39 +09:00
Jean-Philippe Andre 592068108b Evas masking: Fix another set of rendering artifacts 2015-01-07 15:06:03 +09:00
Jean-Philippe Andre 4bff14676e Evas masking: Fix mask blend functions (SW engine)
The selected op func was not performing the correct operation,
thus producing rendering artifacts. These functions should not
be used anywhere except in case of masking... which was not an
available option earlier.

It was doing (wrong):
dst = interp(mask, src, dst)

Instead of (correct):
dst = dst + (1 - mask) * src

NOTE:
This commit also disables MMX, SSE3 & NEON implementations of
pixel_mask blend operations, since they are also broken.
2015-01-07 15:06:03 +09:00
Jaeun Choi 62f3170874 Evas masking: Implement support for map draw (SW) 2015-01-07 15:06:02 +09:00
Jaeun Choi 4eb3a58edd Evas masking: Implement support for polygon draw (SW) 2015-01-07 15:06:02 +09:00
Jaeun Choi 6747fadd9a Evas masking: Implement support for line draw (SW)
Signed-off-by: Jean-Philippe Andre <jp.andre@samsung.com>
2015-01-07 15:06:02 +09:00
Jaeun Choi 9af60b1b04 Evas masking: Use alpha mask in SW engine draw functions
Work done by Jaeun Choi, rebased & squashed by jpeg.

This commit introduces changes to the low-level draw functions
of the SW engine considering the existence of an alpha mask image.

Features:
- Font masking (TEXT, TEXTBLOCK),
- Rectangle masking,
- Image masking (all image scaling functions should be handled).

The mask image itself is not yet set in the draw context (see
following commits).

@feature

Signed-off-by: Jean-Philippe Andre <jp.andre@samsung.com>
2015-01-07 15:06:02 +09:00
Jean-Philippe Andre a90876c337 Evas fonts: Fix minor deviation in RLE font render
So I've discovered some weird output values after drawing
some text. The destination alpha would become 0xFE even
when the back buffer had a background with 0xFF alpha.

Example:
Dest is 0xff00ff00 (green).
Color is 0xffffffff (white).
Current font alpha is 170 (0xaa).
--> Output was 0xFEaaFEaa instead of 0xFFaaFFaa.

This is because of some slightly invalid calculation
when doing the font masking (mtab[v] = 0x55 above).

Indeed, MUL_256 takes alpha values in the range [1-256]
and not [0-256] as was assumed.
2015-01-06 19:41:10 +09:00
Bogdan Devichev ce36f8f5ad evas: better example of _mmap_set and resources for it are added. 2014-12-23 21:20:21 +01:00
Bogdan Devichev dd60525798 evas: a _mmap version of the file_set is added. 2014-12-23 21:20:21 +01:00
Bogdan Devichev 61aab62be0 evas: entry points to modules is Eina_File. Model_Common_Loader is deleted. 2014-12-23 21:20:20 +01:00
Bogdan Devichev 17baa3fa6f evas: entry points to modules is new struct with Eina_file, not const char *file. 2014-12-23 21:20:20 +01:00
Bogdan Devichev aaddf1a963 evas: Evas_3D_Mesh_File_Type sank into oblivion. Changing entry point to model_save_load. Changing API in examples. 2014-12-23 21:16:07 +01:00
Bogdan Devichev 02c85b9fe8 evas: add lib/evas/common/evas_model_<action>.c. Functions are renamed similar to functions in image_save_load process. 2014-12-23 21:14:52 +01:00
ChunEon Park 74ff95c349 evas/map: fix aa regression bug. 2014-12-19 21:52:06 +09:00
Carsten Haitzler afb7315722 Use NEON intrinsics for mapping instead of inline asm
Summary: Rewrite linline assembly in mapping func using NEON intrinsics.

Reviewers: raster

Differential Revision: https://phab.enlightenment.org/D1740
2014-12-17 15:28:50 +09:00
Jean-Philippe Andre 624787c42a Evas font: Improve RLE rounding alpha8 to alpha44
This should ensure that the difference between the original
pixel value and the rle4 encoded one is <= 8.

The previous fix was a bit stupid as it was not taking into
account the conversion a4 to a8 (which is a8 = (a4 << 4) | a4).
2014-12-09 11:02:01 +09:00
Jean-Philippe Andre 52d117c905 Evas font: Compress font algo should round instead of floor
This is an attempt at having higher quality font rendering
while still using RLE-based font compression.
2014-12-08 18:02:44 +09:00
Carsten Haitzler ac7d7c9cbe Use intrinsics for scaling up instead of inline asm
Summary: Rewrite linline assembly in scaling func using NEON intrinsics.

Reviewers: raster

Differential Revision: https://phab.enlightenment.org/D1666
2014-11-29 15:50:03 +09:00
ChunEon Park b7d5700312 evas/map: correct last 1 pixel handling in spans.
Clipper causes the different rendering result by last 1 pixel on the width.
Because the left edge x range (0 ~ (w - 1)) and right edge x range (0  ~ w) is different.
This fix won't be memory over access problem even if x span position is on the end of the edge.
Because the span width(x2 - x1) will be 0, and it restuls in skipping drawing.
It's hardly find the problem but you can detect the subtle rendering difference when some arbitrary meshes with map is
You can compare image and rectangle map drawing for this.

@fix
2014-11-26 17:39:27 +09:00
ChunEon Park 795f9d6ce3 evas/map: revise draw code.
reverted draw logic and applying aa drawing better safely.
2014-11-26 16:00:59 +09:00
ChunEon Park e3b7d3daed evas/map: removed unnecessary. 2014-11-26 15:17:51 +09:00
ChunEon Park a3b3e1ecad evas/map: support aa in basic c computation. 2014-11-26 15:12:25 +09:00
ChunEon Park 215b52ecc1 evas/map : set antialias context for map rendering. 2014-11-26 12:22:55 +09:00
ChunEon Park d3d306ec5c evas/map: add comments for readability. 2014-11-26 12:07:10 +09:00
ChunEon Park cc115ec786 evas/map: code refactoring.
use array for easier indexing in the coming anti-alias logic code.
2014-11-25 21:35:33 +09:00
Jean-Philippe Andre bbe9425237 Evas: Remove irrelevant comment and disabled code 2014-11-19 17:10:37 +09:00
Jean-Philippe Andre 05aee3e370 Evas: Don't pass whole RGBA_Image to low-level render functions
Idea originated from Cedric the b0rker.

This is a big fat search-and-replace commit.
This commit also introduces space changes... Sorry for the mix.

NOTE: This commit may have one side effect as there was some very
      dubious code chaning the dst image's alpha flag in the
      Gfx get functions. Logically this didn't make sense (at
      draw time the dst alpha should already be well defined),
      so it should be safe.
2014-11-13 12:20:57 +09:00
Jaeun Choi 237fdd3db8 Evas: Improved code consistency
Signed-off-by: Jean-Philippe Andre <jp.andre@samsung.com>
2014-11-12 17:26:27 +09:00
Jaeun Choi 11001b3c33 Evas: Fixed indentation
This is a purely cosmetic change.

Signed-off-by: Jean-Philippe Andre <jp.andre@samsung.com>
2014-11-12 17:16:16 +09:00
Jean-Philippe Andre e21a40de9d Evas: Fix COPY op for mask+color
Also, mark some functions with a FIXME as they look just wrong.
COPY_REL is never used...

MMX and NEON optimizations should be implemented for COPY MASK+COL.
2014-11-12 17:02:26 +09:00
Jean-Philippe Andre 85ecf662d4 Evas: Fix SW rendering COPY function with mask
This does not fix any known bug as there is no known path using this
function.
2014-11-12 17:02:20 +09:00
Jean-Philippe Andre 56e6141013 Evas convert: Remove dead code
Woah coverity...
Fixes CID 1039448
2014-10-28 10:54:51 +09:00
Cedric BAIL 2e1ff6550e evas: let's handle dds also during tests properly. 2014-10-21 23:42:03 +02:00
Mike Blumenkrantz 5375e154fe fix config.h inclusion across the tree 2014-09-23 15:56:46 -04:00
Philippe Coval 8f40c291ca evas: fix build on armv7l.
Summary:
Without compilation will fail on :

  error: unknown type name 'pix_type'
  error: expected identifier or '(' before 'else'

Applies to efl-1.11.0 and later

Bug: https://phab.enlightenment.org/T1620
Bug-Tizen: PTREL-737/part
Change-Id: Idbcb442803ed6559698b2a371d1d6c584ec053e0
Signed-off-by: Philippe Coval <philippe.coval@open.eurogiciel.org>

Test Plan:
  gbs build -P "profile.tizen_common_armv7l" --arch armv7l --include-all

@fix

Reviewers: cedric

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D1399

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2014-09-03 18:24:05 +02:00
Carsten Haitzler 33d39beac6 evas conversion - fix bad rotation handling
coveriity found bad copy & paste in conversion code - 270 rot twice.
fixes CID 1039448
2014-08-27 14:24:08 +09:00
Carsten Haitzler 372b2a256f evas - dither | convert - fix dead code
dead code as paln one checked twice in a row - the grey 16 check was
wrong so move to end and check against greay16 pal type

fix CID 1039449
2014-08-27 14:21:23 +09:00
Carsten Haitzler bb7a7151ec evas - remove logicallly dead code
fixes CID 1039450
2014-08-27 14:16:50 +09:00
Carsten Haitzler 6dfb9b292f evas - remove logicallly dead code
fixes CID 1039451
2014-08-27 14:14:47 +09:00
Carsten Haitzler 6038318851 evas font draw - fix possible custout rect leak found by coverity
fixes CID 1039477
2014-08-25 13:18:51 +09:00
Carsten Haitzler ddac73a5fc evas - scalecache cutouts - fix possible leak coverity found
fixes CID 1039923
2014-08-25 12:49:22 +09:00
Carsten Haitzler 8389e3e6a9 evas - rectangle custouts - fix possible leak coverity found
this fixes CID 1039924
2014-08-25 12:42:56 +09:00
Carsten Haitzler c654b3ef2c evas loaders - fix logically dead code
fix CID 1039447
2014-08-22 20:14:59 +09:00
Carsten Haitzler da45b6ad57 evas sw core - scaler - remove logically dead code
fix CID 1039445 1039446
2014-08-22 20:14:59 +09:00
Carsten Haitzler 2bfc9190d9 Revert "evas scalecache - fix thread deadlock posssibility"
This reverts commit 24a1c444b0.
2014-08-19 08:02:36 +09:00
Carsten Haitzler 029c6847d7 evas render i386 - comment out structurally dead code
this code has bugs, so comment it out rather than just have a return
get rid of it - CID 1039499
2014-08-14 20:17:16 +09:00
Carsten Haitzler d399921724 fix structurally dead code
this cleans up fixing of unused param warnings - fix

CID 1039524 1039504 1039523 1039503 1039522 1039502 1039521 1039501
1039540 1039520 1039539 1039519 1039538 1039537 1039517 1039536
1039516 1039535 1039515 1039534 1039514 1039533 1039513 1039532
1039512 1039531 1039511 1039530 1039510 1039529 1039509 1039528
1039508 1039527 1039507 1039526 1039506 1039525 1039505
2014-08-14 20:17:16 +09:00
Carsten Haitzler 24a1c444b0 evas scalecache - fix thread deadlock posssibility
there is a re-ordering of how locks are taken and this should cover
that deadlock possibility. fixes CID 1106338
2014-08-14 18:10:11 +09:00