Function allocated reply->children_len bytes, and then copied
sizeof(Ecore_X_Window) * reply->childen_len bytes into the buffer, leading
to memory corruption.
SVN revision: 42624
support this (atm). there is possibly little point in doing so... perhaps
svg... thought maybe tiff too later? for now, get jpeg 100% up to snuff.
SVN revision: 42587
people were not noticing it as they were using 64 bits machines... but
with 32 bits just 4 bytes were copied and 3 were missing :-P
SVN revision: 42549
move some to error/critical, remove trailing \n.
NOT doing ChangeLog entry on purpose, it's useless as it's an
intra-release change (changes the previous unlreleased change)
SVN revision: 42547
Have all source to include config.h conditionally (HAVE_CONFIG_H),
define EINA_LOG_LEVEL_MAXIMUM, minor changes to configure.ac to make
it conform with the rest of efl.
SVN revision: 42544
Some methods are missing and the in-process thumbnail needs to be
done, the documentation is almost the same as the client, so I really
appreciate someone else do it :-)
SVN revision: 42541
be way too big to ever allocate. probably code can do with other fixes too.
also make jpeg loader rudametarily understand load regions. very brute-force.
but enough for just this moment to do testing.
SVN revision: 42507
* Callbacks were named to help Vala bindings.
* All callbacks get 'void *data' as first argument, always.
* All async methods get free_data parameters and call them also on disconnect()
* queue_remove() renamed to generate_cancel() to be more clear.
* queue_clear() renamed tp generate_cancel_call() to be more clear.
SVN revision: 42445
This new iterator receives a rectangle as argument and tile_w X tile_h sized
tile, and slices the rectangle iterating over it on each iteration.
SVN revision: 42427
We list in it the required packages needed to compile eet.
* remove uneeded flags that are in Libs.private (those from the packages
that are listed in Requires.private)
Patch by dottedmag, modified a bit.
SVN revision: 42367
Many people try "make check" and then complain they have some error
messages, but they are actually expected... but even for the
experienced is hard to know whenever it was expected or not, so
explicitly say that.
Also check if safety checks are enabled or not before doing "break"
tests, otherwise we'll end with segfaults and tests failing. (I have
not tested with them disabled, but should be okay).
SVN revision: 42360
This will concatenate all source files in the hope compiler will do a
better job. On my test with static/built in mempools it saves me 4k, I
guess some intra module calls can be saved.
SVN revision: 42315
It's pointless to be able to change magic number string after it's
created, so let's avoid walking the existing list and just remove
places where strings were being duplicated (list/array both inited
magic strings for accessor/iterators).
Also an optimization, register using an array and sort it before
searching. Sort will just happen when array was changed, and this is
just done when eina_magic_string_get() is called.
SVN revision: 42310
Being able to indivually initialize individual modules was initially
"good", but at end it's putting complexities on users that would try
to "optimize" by doing just what they used, but in the end most people
would get them wrong, users would have to do lots of code and etc. At
the end it does not worth.
Most module init just register handful errors and log domains, so are
cheap. The exception is mempool users, that would dlopen() stuff, but
people that are concerned (embedded) can just compile those statically
in eina.
Since at the end any real application would use most of modules, we
actually end saving lots of function calls that would do nothing other
than increment a global counter.
I also did the init/shutdown use an array, making it easier to
maintain. The inital dependencies were analysed by a script I wrote, I
hope it's all right.
Please fix any breakages you find!
SVN revision: 42300
Note : currently, because of a circular calls of
eina_log_init() and eina_safety_checks_init(), eina
is not correctly shut down. Imho, eina_log should not
depend on the safety checks module. That would mean
some fprintf in eina_log_domain_new(), eina_log_domain_free(),
eina_log_domain_register()and eina_log_domain_unregister().
SVN revision: 42292
with small modifications and fixing
ecore_evas_win32 does not build, though. I think that
if we add log support in evas, all the macro must have
different names, because of all the _private.h headers
that are included in all source files (that's the problem
with win32). I'll fix ecore_evas_win32 build later. Or
someone can do it if he wants :-)
SVN revision: 42274
write down specialized cases for threads or not, function or file,
color or not. Maybe it's not even an optimization since we add yet
another indirection/function call, but each case is simpler.
* EINA_LOG_FILE_DISABLE=1: disables show of file:line in
stderr/stdout messages.
* EINA_LOG_FUNCTION_DISABLE=1: disables show of function() in
stderr/stdout messages.
one must not use the two options at the same time, if that's the case
code will ignore EINA_LOG_FILE_DISABLE=1 and use just function
disable.
SVN revision: 42272
Users may opt to set EINA_LOG_LEVEL_MAXIMUM to some integer and macro
will then evaluate to check for that value before actually call
eina_log_print() macro. By using optimizations compilers will
effectivelly compile out the code if it is never reached, thus saving
the check and function call in possible critical paths.
SVN revision: 42269
remove debug_level options as it is better handled by EINA_LOG_LEVELS
and EINA_LOG_LEVEL variables, for example:
EINA_LOG_LEVEL=3 EINA_LOG_LEVELS=ethumb:4,ethumb_client=1
will show debug for ethumb (lib), just errors (no warnings) for
ethumb_client library and everything else shows "info".
SVN revision: 42261
Sparse Matrix was implemented and tested by Rafael Antognolli and
myself in order to implement optimized large sparse matrix walk in
some products, one of them WebKit-EFL optimizations.
We have done extensive tests, with good code coverage. Similar to
lists/inlists, we keep pointer to last known element and similar to
iterators we keep reference to last accessed row and cell inside
rows. This allows fast sequential access (for i... for j... m[i,j]),
that is our most common usage case.
Rows are kept in a list, with cells inside that row as another
list. It's not similar to most book implementations where cells keep
reference to their sibling cells in other rows as well, we opted to
not do that to save some pointers and make algorithms simpler, still
do great for our use case.
This code was developed on behalf of our client, that wants to remain
unnamed so far. Thanks client ;-)
SVN revision: 42243
note that one can turn per module debug, for example:
EINA_LOG_LEVEL=4 EINA_LOG_LEVELS=eina_stringshare:0 ./bla
will enable level 4 (debug) for all modules except eina_stringshare
that is forced to 0 (just critical messages).
SVN revision: 42224
All these individual init functions are getting messy, some modules
lack them and it's easy to get inconsistent. Safety check needs error
and log, but these need safety checks as well, some modules (lalloc,
rbtree and others) use safety checks but provide no _init().
I want to know if we really gain something to init individual
modules. It should not be that expensive as init should not allocate
heavy resources and the recommendation is to call eina_init() so most
users will do that anyway.
If people agree I'll unmark all *_init() as EAPI and make them private
to eina lib.
SVN revision: 42214
Automatically add \n to messages. Since we use that prefix, there is
no use to allow messages without \n, it would look a mess.
Some logging systems may not require the trailing newline, for example
logging to xml or syslog, for those you don't need to ignore this char
if present.
Yes, this breaks convention, but better now than latter. And the
results are not so bad.
SVN revision: 42200
eina_log_threads_enable() and then get thread safe logging with
non-main threads being printed with special notation to easily spot
those.
SVN revision: 42199
EINA_SAFETY_CHECKS will call eina_log, so calling these from inside
eina_log_print() may lead to recursion, that is really bad (although
it seems it would never lead to infinite recursion).
handle d->deleted, also showing error.
SVN revision: 42198
* stderr logger was doing prefix properly but user message to stdout, fixed.
* log is improved:
* grep-able, it shows the 3 letter level name as prefix, unknown levels
will have their number printed.
* colors just on prefix, less polluted output still easy to spot.
* function names are highlighted.
SVN revision: 42197
* more docs.
* do not getenv("EINA_LOG_ABORT") everytime, just at init.
* EINA_UNLIKELY() in some critical paths (not that big impact anyway)
* eina_log_print_cb_stderr() and use it by default.
SVN revision: 42196
will be created. The logic is the following:
* if the environment variable TMPDIR is set, use its value
* if it is not set, take the directory passed with the
-td option (see edje_cc help)
* otherwise on Windows use a temporary dir and on other
platform, use /tmp
SVN revision: 41978
* eina_error might be kept for error messages and codes, but it's logging API
will be deprecated. For now, it's been kept for not breaking others code and
for a smoother transition.
* Added test for new logging API, also demonstrates usage.
SVN revision: 41960
files according to the doc
* define _GNU_SOURCE before the inclusion of alloca
as features.h inclued by alloca.h, defines some
macros according to _GNU_SOURCE.
SVN revision: 41940
Subject: [E-devel] [evas] Add RGBA -> grayscale 64 entries palette conversion
This is needed for E-Ink devices outta there. Names of new files,
configure.ac variables and macros are awful, suggestions are welcome.
SVN revision: 41825
Those symbols appeared earlier than in 1.2.2, but debian/libeet1.symbols
was not updated, so there is no point to look at the actual minimal
versions of symbols.
SVN revision: 41824
This concerns Ticket #109: Add Lua support for Edje
It adds Lua as scripting facility to Edje, letting Embryo untouched.
It should be easier to use and be more flexible than Embryo, imho ;-)
---
The patch
---
Lua 5.1 is used in sandboxed mode. Lua byte code is not
platform/architecture independent, Lua code is saved as text in the Edje
container and parsed at load time, therefore.
The patch goes in two directions
1) Analogous to Embryo for scripting logic, messaging and custom states.
The same things are implemented as in Embryo:
- messaging from and to C
- manual creation of timers, animators, pollers for custom events /
animations
- manual manipulation of Edje parts by means of the public
edje_object_part_* and internal functions and custom states
-> those routines are actually implemented as Lua
bindings to
functions in Edje.h and Ecore.h
-> the implementation is done in an object oriented way, so that the
interface gives the feel of an object description language, pretty
similar to EDC itself
-> combining custom states and custom animators allows
for fancy
animations and transitions, e.g circular/spline translations or
complex/conditional transitions, etc.
-> this is just the same as Embryo does, but implemented in Lua, so
nothing new here, actually
2) Dynamic object creation and manipulation
- this interface stems from the 'script_only' objects in
Edje. Those
objects are a kind of scriptable Edje counterparts to Evas_Smart
objects. The infrastructure for Embryo is already there, but has
never been used
- I added this in Lua and added some first bindings to
experiment
with
- I thought it would be useful to allow for a limited dynamic
creation of ui parts
- We can create instances of groups from within the same Edje
container and use them just like the main Edje object as
stated in
1)
- And there are some stand-alone bindings to dynamically create
Evas_Image, Evas_Table, Evas_Line, Evas_Polygon as examples
-> this may be useful to decouple the program from the ui
even more,
to be able to do things that have to be done in the program itself
atm, but actually belong to the user interface, but need dynamic
creation of objects or complex interactions
-> those objects are manipulated manually with Lua bindings
to the
corresponding edje_object_* and evas_object_* functions
---
Discussion points
---
Both stuff in 1) & 2) is functioning, but needs testing, feedback,
improvements, ...
Stuff in 1) can already fully replace Embryo scripting with Lua
scripting. There still is space for improvements/additions, though.
Of the stuff in 2), I think it may only make sense to add the dynamic
creation of groups defined in the same Edje container. Dynamic creation
of other Evas_Objects makes not much sense, as most of them can already
be used as Edje parts and be manipulated with custom states (apart from
polygons and lines) and it would make the whole theming potentially more
programing-like and much more susceptible for errors, etc.
Would this be useful, or drop it all?
The scripting should be there just for logic, conditionals, custom
states and animations, not for a whole dynamic canvas, imho.
There is a patch around with EXTERNAL Edje parts. Seems to be a better,
faster, more secure way to extend Edje with custom objects.
There would be the possibility of precompiling Lua code at compile time
(edje_cc) for faster loading, but we would have to patch and run our own
Lua version.
The Lua parser is pretty fast, though, and using
byte-converted/endianness-swapped byte-code does only pay off for Lua
chunks of some kilo lines.
Byte code also occupies much more space than text in the final Edje
container, as it includes debug symbols.
---
Cedric and Vincent told me, that the plan was to replace Embryo totally
by Lua before the official release of Edje at the end of the year? So it
would make sense to bring Lua to svn soon and look how it fits in, test,
debug, adapt it further to the themers needs, decide on its final shape,
GATHER SOME PEOPLE TO HELP ;-)
---
The Lua enhanced Edje is in sync with svn and can be get directly here
git clone git://repo.or.cz/edje_lua.git
cd edje_lua
git checkout -b lua_patch origin/lua_patch
or apply the attached patch
There are also some examples to show the usage of the things
mentioned
above
- showcase.edj: shows usage of custom animators, custom states,
messaging and the script_only object
- test.edj: test cases of script usage and bindings (custom states,
custom transitions, tween_states, animators, timers,
object_parts),
but most of it are experimental script_only objects
http://didgmo.sourceforge.net/showcase.edjhttp://didgmo.sourceforge.net/test.edj
The source of showcase.edc is attached, too, to just have a glimpse at
Lua inside of EDC
---
So, what do you guys think?
Thanks and sry for the looong mail, hehe ;-)
SVN revision: 41802
Kubo just found that docs could be improved and macro could be
simplified during his learning of EFL. Big bonus he did the
improvements =)
SVN revision: 41799
- Edje_Real_Part use less memory.
- Edje_Real_Part and Edje_Real_Part_State now use a mempool.
- When both param1 and param2 are the same, only recalc param1.
- Don't compute Edje_Real_Part more than one time per edje_recalc_do.
SVN revision: 41771
- Forgot to reset clip before drawing cleanup rect.
- Always draw a rect to reset the background, just
choose a correct color.
Note: This will slow down software_x11 engine, as this engine
always do memset, so it does it twice. Before only the alpha
case was impacted, now both case are. Need time to fix it. If
someone has, don't hesitate :-) You can use elementary windows
state test, to see if thing is going correctly or not.
For the record, SDL engine has a score around 500 under X11 on
my computer, where the X11 engine does only have a score around
450.
SVN revision: 41770
Note: It's not a good idea to initialize curl, if you just
want to do some ecore_con network or ipc. Better let them
initialize separatly.
SVN revision: 41743
- Provide two functions with a better name (Still need more doc).
- Deprecating old eet_data_descriptor*_new.
- Provide helper function for eet when using eina data type.
SVN revision: 41732
<dieb_> weird, undefined refernce to eina_cpu_count
<raster> you have no cpus!
<dieb_> dammit!
<Sachiel> try eina_hamster_count
<dieb_> lo
<raster> oh god
<raster> now u did it
<raster> i have to add that
<dieb_> heheheh
SVN revision: 41727
if sfont=something was given to _edje_text_class_font_get(), sfont
might be untouched there and old pointer was being freed, resulting in
double free. So make sure we're using the correct pointer there.
SVN revision: 41714
Note: A bug spotted in layout of box is the reason of this revert. From
my understanding, layout require some property on the object to be
correctly set. This is done during edje_recalc_single on the part. The
layout fonction of evas would be called just after the resize. If we
didn't do an edje_recalc_do, but an edje_recalc, the call to
edje_recalc_single will be delayed and the layout property will not be
set correctly.
SVN revision: 41698
WARNING: THIS CAN CAUSE RENDERING GLITCH AND OTHER WEIRD BEHAVIOUR WITH
YOUR EDJE FILE. PLEASE REPORT ANY ALIEN STUFF.
Note: This patch cache the result of _edje_part_recalc_single, until
any relative part are moved, the object is resized or some property
are changed (like during text set or color class set).
Note: Be carefull when you call edje_object_size_min_restricted_calc,
it's really an inderect heavy user of _edje_part_recalc_single and
I wasn't able to bring it down.
Note: This patch use more RAM, around 480 bytes per Edje state, so I
don't recommand using it on a Desktop with a lot of CPU power.
SVN revision: 41663
Note: It doesn't really impact edje memory foot print yet. But in
the plan to do a computation cache inside edje, this structure
will be used a lot (I am planning to do this feature at some point,
but no ETA yet, and be reassured it will be optionnal so we can
choose between CPU load or memory load).
Note: As I was looking for similar area of improvements,
Edje_Part_Description could really use an union to reduce it's size,
but as we load this structure directly from an Eet file, we need
union in Eet first. And this should be part of a comming Edje file
format break.
SVN revision: 41652
eina_list_search_sorted_near_list() was broken and barfed at my face
during development of eina_list_sorted_insert(), so I rewrote it
following more traditional approach, also adding special cases for
head/tail remembering that random access in lists is not as fast as
array. I also simplified that code.
eina_list_sorted_insert() should be fast, O(log2 n) insert, with
special cases to insert already sorted arrays forwards or backwards,
however I believe that it's better to simply append/prepend in those
cases (if known).
SVN revision: 41625
This should not impact anybody, at least in SVN I got no hits for this
function.
The new parameter contains the result of the last call to func(), so
we can know if the node is smaller, bigger or exactly the requested
value and don't need to call func() on node to know for sure.
SVN revision: 41623
eina_list_merge() now fixes the smallest list segment, not always the
right. Before if we joined a list 1 to 1000 segments we'd fix all the
1000 instead of the single at left.
Tests to make sure both code paths are being executed.
SVN revision: 41622
that still integrate cleanly with the EFL.
ecore_thread_run need two callbacks :
* func_heavy is called from another thread and should not use the
EFL except Eina, but carefully.
* func_end is called when func_heavy is done, but from inside ecore
main loop, so you can at this point call every EFL functions without
fear.
Note :
The system automatically detect how many CPU you have and will spread
the load on all of them.
You must not assume that the result will come in the same order you
requested it. Depend on each CPU load and how heavy the function on it
are.
SVN revision: 41555
Rectangle needs the list module for the pool_new() function. Patch
also adds a check for initialization error on the unit test.
By: Andre Dieb
SVN revision: 41460
The original intention was that if the property is absent or not of extected type (or invalid window) they should return -1, otherwise they should return the number of elements in the property, 0 if none.
Unfortunately they all returned 0 if the property does not exist. Also, ecore_x_window_prop_xid_list_get retuned 0 if the property exists, has no elements, but has wrong type (should be -1).
These issues should be fixed now but this may cause problems in any code that relied on the incorrect behavior.
SVN revision: 41418
-Q, -V, -D: change debug levels, always forget about EINA_ERROR_LEVEL :-P
print message with status, if it failed, was generated or already exists.
SVN revision: 41374
To reach this case, have a timer that would not be fired on
_ecore_main_loop_iterate_internal(), for example it's not ready yet
(just_added==1), system would get into this inner loop and would never
stop, since there is timer expired now (next_time == 0.0), if we go to
start_loop it would just get into the same loop, not dispatching and
timers.
Python test 04-idler.py triggered that problem.
SVN revision: 41342
* allow the build of evas without xlib installed (for OpenInkpot guys)
* add big fat warning when at least a module is linked statically (try it !)
more patches will follow now (ecore, e, rage and ewl)
I let pyton and c++ bindings maintainer to do the rename
SVN revision: 41329
These thumbnails are generated using an edje template. Each thumbnail is
an edje file, that has a group called "movie/thumb"
The thumbnail can be animated by receiving a signal "animate" or "animate_loop"
(the last one being a loop animation that calls itself when finished), and
the animate_loop program can be stopped by receiving a signal "animate_stop".
The transition time is set based on the time of the animation (that is set
by the call ethumb_video_time_set()).
SVN revision: 41322
Efreet_Mime did not match last set of magics for given mime-type due to
missing check after the loop. This bug was partially masked by the
problem fixed in my previous patch.
By: Mikhail Gusarov
SVN revision: 41305
Hello,
I've fixed a bug in parsing magic file in Efreet_Mime: if some magic
rule has a subrule with non-zero depth, then the 0 depth is used instead
for subrule. This led to nonsense like all .xml documents matched as
application/docbook+xml.
By: Mikhail Gusarov
SVN revision: 41304
evas_common_font_utf8_get_prev currently works correctly only on an
ASCII symbols. For non-ASCII it just returns random garbage somehow
constructed from a string.
Attached patch makes it work according to the comment at the start.
SVN revision: 41292
- Now it's possible to access the ecore_evas used to generate the
thumbnails (and use functions like ecore_evas_buffer_pixels_get() ont it);
- Functions to calculate aspect and fill area using the aspect ratio as
argument are also provided.
SVN revision: 41288
Improvements: Now evas rendering loop is the one responsible to
initialize the surface to 0 correctly (taking into account surface
alpha and object opacity). This will reduce the number of memset
we do.
Note: Current software_x11 (xlib and xcb) are buggy. They are
copying too much data when the surface use a mask. That's why
two memset are left in their code. They could be removed, but
we should fix the surface we copy on change (look at mxob user
and evas_software_xlib_x_output_buffer_paste).
SVN revision: 41206
check the libraries only if benchmarking is enabled
* add extra dist files to be able to configure eina
with autogen.sh and also add .spec files
SVN revision: 41203
configure time) in an exported header. Use only macros
defined by the compilers, which is sufficient and simpler.
* Add missing EINA_DEPRECATED in some cases.
SVN revision: 41199
what is modified:
eina_counter_add -> eina_counter_new
eina_counter_delete -> eina_counter_free
eina_lalloc_delete -> eina_lalloc_free
eina_mempool_new -> eina_mempool_add
eina_mempool_delete -> eina_mempool_del
eina_mempool_alloc -> eina_mempool_malloc
eina_tiler_del -> eina_tiler_free
It remains some questions: have the following API a good name:
eina_module_list_delete
eina_list_free
eina_rbtree_delete
(see ticket #286)
If you find any problem, please report in that thread
SVN revision: 41187
sent by ecore_pipe. The programs based on Ecore on Windows
do not take 100% of the cpu power anymore.
Patch by Lars Munch, modified by me (formatting + guards)
SVN revision: 41179
a way to select it with --enable-foo by passing
'static'. Use at your own risks.
If I've messed something up, please report in that thread
SVN revision: 41160
Efreet API is BRAIN NUTS, some stuff you're supposed to release (list)
and others are up to the callback to release.
Okay, I broke e17 trying to fix efreet tests. API is so inconsistent
that its own test was wrong. I'm reverting my change and fix the test,
but this is bad.
SVN revision: 41133
also rename evas_layer_free() to evas_layer_free_objects() as what it
do now, make _evas_layer_free() as static and use it both cases.
SVN revision: 41123