An invalid optimization was implemented in proxy rendering.
We can't assume a proxy is a smart object.
Refer to 5cefa00d0a.
Fixes T832.
Proxy rendering is still broken when using cserve2... :(
apparently I read the commit order wrong and this fix went in for 1.4.0, not 1.3.2, which means anyone who has 1.3.2 has been having lots of fun crashes for the past 24 hours
This function does the following operation:
COPY pixel x mask --> dst
But it wasn't iterating over the source. So it was repeating
the value of the first pixel over and over again.
Is this even used anywhere? RGBA + alpha mask function!?
this was a fixme which was likely written sometime before July 2010 when the bug was fixed, just prior to the 1.3.1 release. I think it's probably okay to require that release since it's been 3+ years.
This reverts commit f8b0322704.
this breaks efreets icon cache. i have been noticing this since
yesterday across all my machines once i update just efl. i tracked it
down to this commit.
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 :
a = 256 - (c >> 24)
in NEON:
"vmvn.u8 q7,q6 \n\t"
// ie (8 bit)~(c>>24) === 255 - (c>>24)
We cant just add "1" as overflow will occur in case (c>>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.
This makes the function slower by 20-30% but it is still at least 2 times faster then C code.
Reviewers: raster
Differential Revision: https://phab.enlightenment.org/D455
The code was giving enough memory to store doubles and longs, but they
could be unaligned as "unsigned char" allows 1-byte alignment, while
double may require 8 bytes.
By specifying the array as "long long" we force certain alignment in a
platform independent way. As this array is small enough and
short-lived, the number of items were not changed, this results in
more bytes on the stack but it shouldn't matter.
Summary:
When user paste text to elm_entry, _edje_entry_user_insert is called.
We need to reset a prediction buffer just like _edje_entry_text_markup_insert.
Reviewers: seoz, Hermet, woohyun, tasn, jihoon, raster
Reviewed By: raster
CC: cedric
Differential Revision: https://phab.enlightenment.org/D461
I do think that it was a left over from previous file format. Removing
this memcpy should make Enlightenment startup faster and should reduce
by 500KB the memory it use.
It is sometime useful to start from a defined buffer, but to not touch it
until needed. This make life of caller more easier as they don't need to
duplicate the buffer themself as Eina will now take care of that.
Summary:
"_edje_entry_imf_event_delete_surrounding_cb" changes text of entry.
When the callback function is called and the entry is changed,
we need to notice to applications that the entry is changed.
Reviewers: seoz, Hermet, tasn, woohyun, jihoon, raster
Reviewed By: raster
CC: cedric
Differential Revision: https://phab.enlightenment.org/D460
Summary:
If ONE single item in the whole textblock has a padding of k,
then ALL the lines of the textblock will be padded by k pixels.
Here's a solution to add the padding only to the first line.
Test Plan:
Write any multiline text, without styles, in an entry.
Add some glow to one element. All lines should be spaced by
an extra 2 pixels.
Reviewers: tasn
CC: cedric
Differential Revision: https://phab.enlightenment.org/D442
Track padding per paragraph, since this is how it is computed.
Problem before this patch:
- If markup text is changed, padding may grow, and the layout is updated (good)
- If the UI itself needs a relayout, the old padding value is NOT reused,
so style paddings will reset the padding to 0.
Test protocol:
- Set some text with style=glow. The whole object should have padding 2,2,2,2
- Relayout the UI, the whole object will have padding 0,0,0,0 (should be 2,2,2,2)
Summary:
If the property was successfully fetched the number of items stored in
val is returned, otherwise -1 is returned.
Note: Return value 0 means that the property exists but has no elements.
Reviewers: seoz
Reviewed By: seoz
CC: cedric
Differential Revision: https://phab.enlightenment.org/D457
Fix race condition when touching/changing a (theme) file often.
An Eio_Monitor was marked as "delete_me" but the rename callback
was still called, leading to memory access to already freed
objects.
Test protocol was:
ELM_THEME=~/default.edj elementary_test &
watch touch ~/default.edj
If a file had changed, a new OPEN message was sent, and the
client image ID was then changed, but the LOAD message was
sent with the previous image ID. So cserve2 would not be
able to honor that request.
When an image file is changed, it is discarded from cserve2,
so the references become invalid. In case we were loading a
scaled version of that image, no proper error checking was
done, leading to obvious crashes.
this changes the internal encoding of font glyphs in evas to use 4bit
uncompressed if small, or 4bit rle (run length encoded) if larger.
this caves at least 50% of memory on fonts - and more if bigger. with
large fonts (40-80pixel size) we can save in the region of 80% of
memory used for glyphs. this also happesn to allow speedups in
rendering too.
structure.
- moved gl_sync_draw_done for a better structure packing.
- changed gl_sync_draw_done type from int to char which is enough.
- added more description to gl_sync_draw_done
We where inserting the pointer data instead of the pointer, leading to
unaligned access on Sparc (Thanks Lutin to report it and Debian tools/infra
to help us catch it) and also a memory leak.
Summary: Add data set case of selection event for XDND selection if selection atom is XDND
Reviewers: raster
Reviewed By: raster
CC: JackDanielZ, woohyun, Hermet, seoz, cedric
Differential Revision: https://phab.enlightenment.org/D446
In cserve2, a shortcut was taken to check if two images were the
same, using memcmp() on the Evas_Image_Load_Opts struct. But it
seems some empty areas in the struct are uninitialized, potentially
making memcmp() fail when the images were actually the same.
This is a minor issue since this function is called only when
bypassing the socket wait.
Also, memset load_opts to 0 and copy all the fields to avoid
the same warning in socket send().
I'm just wondering about the performance impact vs. memcpy/memcmp.
The bullet library generates tons of warnings:
1. -Wunused-variable
2. -Wunused-parameter
3. -Wshadow
2 and 3 were properly ignored by pragma GCC, but unused-variable
doesn't seem to work. At least on my version of GCC (4.8.2).
So, let's ignore ALL warnings from libbullet includes.
this makes efl ignore certain env vars for thnigs and entirely removes
user modules (that no one ever used) etc. etc. to ensure that *IF* an
app is setuid, there isn't a priv escalation path that is easy.
this MIGHT fix T45 but i can't reproduce to confirm, but reading a
backtrace indicates this could have been the issue. it looks like
there is room for a dangling pointer anyway, so fix.
stable release - cherry-pick me!
- Invalid alloc size (typo)
- Initialized value never read (set twice)
- Potential memleak (call free(msg) in case of send error)
- Null pointer dereference (check nullity)
There are still other warnings, but I believe these are false
positives.
since the map_changed is reset right after the map is updated,
it could not decide to redraw the map surface properly.
now map_update() returns the value to redraw the map surface properly.
vasprintf can return -1, in which case the buffer is corrupted.
So we better handle this ...
gcc told me of this thanks to -Wunused-result when building package,
thank you gcc for your incredible powers.
ERR<7807>: lib/eina/eina_binbuf_template_c.x:95 eina_binbuf_append_length() *** Eina Magic Check Failed !!!
This fix a problem where eina_binbuf was used without
calling eina_binbuf_new when ECORE_CON_REMOTE_UDP is used.
We do have mmap provided by Evil, but there is no implementation yet of
an anonymous map support. Also it is not clear how the memory system of
windows does actually work, so not sure this optimization is relevant
to windows at all. Thus we disable it for the time being and unbreak
the windows support.
- cherry-pick me -
stable release - cherry-pick me!
of course! eina_hash_direct_add() for the object pointer is using the
poitner to the stack value, not the value itself it points to... this
was bad and just by luck out value was on the stack that grows but
never shrinks and thus never crashes, BUT... it will just break in all
sorts of fun ways. basically it makes the hash useless as the keys in
it are effectively all the SAME value as they point to the same
storage.. but it changes whenever that stack mem gets changed.
Summary: evas_scale_smooth would not compile with BUILD_NEON set
Reviewers: raster
CC: cedric
Differential Revision: https://phab.enlightenment.org/D424
this fixes T323 - this is a change in lua 5.2 that makes osize encode
the type of data being allocated where 5.1 didn't do it and the math
was thus screwed as a result. comments in the diff.
cherry-pick me!
Summary:
evas_string_char_next_get is simple wrapper of eina_unicode_utf8_next_get with
some check routines.
But in _markup_get_text_utf8_append, these check routines look unnecessary.
Reviewers: cedric, seoz, raster
Reviewed By: raster
CC: cedric
Differential Revision: https://phab.enlightenment.org/D420
Summary:
_op_blend_mas_c_dp_neon rework:
main loop now process 4 pixels per iteration
fast path when *m == 0
Reviewers: raster
Reviewed By: raster
CC: cedric
Differential Revision: https://phab.enlightenment.org/D418
Summary:
When there is multi text nodes for range text get,
it gets wrong format node of last text node.
It makes broken result.
Test Plan: https://phab.enlightenment.org/D398
Reviewers: woohyun, tasn, seoz
Reviewed By: tasn
CC: cedric
Differential Revision: https://phab.enlightenment.org/D399
so firstly the module loading logic in emotion is pretty bad. it
forcible loads into memory (dlopen + run code from) EVERY emotion
module whenever you use emotion anywhere. this is a fat memory cost and
startup cost. it should not ever have done this. so remove that code
and make it explicitly load only the backend requested and fall back
to using what is compiled in (generic by default) and otherwise
generic as a module, then xine, then gstreamer then gstreamer1.
gstreamer1 seems broke - all i see is a black box (no video).
this also fixes a deadlock problem. if you have BOTH gstreamer AND
gstreamer1 modules loaded i get a deadlock inside glib. this seemingly
fixes it as it'll only load the first one it finds, not both (unless
explicitly requested).
We now build a list of item to walk on for each step to just avoid all necessary walking.
It is a slightly more elegant idea than my previous patch even if it only give a speed
improvement of 5% in the best case. Now that render code and the callee only take 1.6%
of the time I am looking at in the benchmark, meaning nothing else to improve here.
This fix the bug spotted in Enlightenment dialog box.
This reverts commit a69c5ba0ae.
yes - this broke text rendering. revert it. several dialogs/uses in e
broke with shadow and glow text being heavily offset up/to the right
of the proper text.
- No need for a separate xcb_connection here as we already have a
connection at this point so let's use that.
- Fix up formatting.
Signed-off-by: Chris Michael <devilhorns@comcast.net>
We now build a list of item to walk on for each step to just avoid all necessary walking.
It is a slightly more elegant idea than my previous patch even if it only give a speed
improvement of 5% in the best case. Now that render code and the callee only take 1.6%
of the time I am looking at in the benchmark, meaning nothing else to improve here.
Being annoyed by different types of eina critical macros - CRI, CRIT,
CRITICAL -, I concluded to unify them to one. Discussed on IRC and
finally, CRI was chosen to meet the consistency with other macros -
ERR, WRN, INF, DBG - in terms of the number of characters.
If there is any missing bits, please let me know.
This does help for some textblock benchmark with a speed increase of 12% and
the one that don't get better don't get slower either, so let's put that in.
This patch will detect how many more times ecore_init was called
during initialization and use that as a threshold to do a clean shutdown.
It is a necessary evil as we do have ecore module that will initialize
eldbus that will then reinit ecore_init from within ecore_init and without
a chance for the application to act on it.
I also reenable a test to make sure we will catch earlier this kind of issue.
Add to fuction prototype new param: Eina_Bool approximation.
If need exact matching state name and value set EINA_FALSE to
'approximate'. In other cases used EINA_TRUE.
Reviewers: cedric, raster, seoz
CC: cedric
Differential Revision: https://phab.enlightenment.org/D400
Signed-off-by: Cedric BAIL <cedric.bail@samsung.com>
This commit will add API for working with smooth for image
and proxy part type.
There are two functions will be added:
1. edje_edit_state_fill_smooth_get
2. edje_edit_state_fill_smooth_set
Reviewers: cedric, raster, seoz
Reviewed By: cedric
CC: cedric
Differential Revision: https://phab.enlightenment.org/D394
Signed-off-by: Cedric BAIL <cedric.bail@samsung.com>
There was detected that pending_objects array of Evas structure of
email application stores at least 550 objects that never are removed
from this array. These objects are not active and are not about to render.
We know that once the decision not to remove changed objects from this
array was accepted. But then the criterion of leaving object in this
array was weakened.
We propose to weaken this criterion more sufficiently – do not store
in this array objects that can not be cause of whole canvas
invalidation. Our exact proposal for this criterion you can see in the
patch attached to this issue.
NOTE: This patch is a try, there may be some side effect especially with
mapped object that we didn't find, so it could be reverted if before the
release of 1.9 we see anything wrong.
Reviewers: cedric
CC: cedric, seoz
Differential Revision: https://phab.enlightenment.org/D354
Signed-off-by: Cedric BAIL <cedric.bail@samsung.com>