1 - use inlist as regular list uses non-thread safe mempool;
2 - lock around image loading, so if main thread requests pixels right
before worker thread is loading them, you don't get ie->info.module
to NULL while it would be used (triggered from engines/common).
Maybe this should be handled by a global mutex elsewhere instead of
per-image mutex, but it has more granularity now.
3 - emit "preloaded" callback if it was canceled to be loaded from main
thread.
Please someone review these changes.
SVN revision: 38312
image preload will use modules from threads, there is a possibility to
crash due wrong reference counting.
actually much more can fail, we need to check modules don't keep that
needs exclusive access in globals or per-Evas_Module, but that's
another issue.
TODO: replace spinlocks with atomic operations.
SVN revision: 38309
We had some problems with preload and after running LLVM's CLang
Static Analyser we found out that current->target could be NULL after
loop.
Also fixed some GCC and CLang warnings, kudos to these wonderful tools
that "Saved The Day".
PS: we should put some CLang Static Analyser results so others can
help fix other parts of E.
SVN revision: 38293
evas_object_image_preload() should not use object as const because it
will mdofiy the object state (so it's semantic makes more sense).
if data was already loaded, then callback before ignored it (return).
SVN revision: 38246
fast direct3d engine written by Dmitriy Mazovka. You rock !
* m4/evas_check_engine.m:
* m4/evas_check_loader.m4:
use m4_popdef for each macro (otherwise, fail if aclocal is too old)
* src/lib/canvas/evas_font_dir.c:
include evas_common.h and evas_private.h after Eet.h and Evil.h
so that EAPI is correctly defined
SVN revision: 38244
if image was already preloaded, inform user.
regular use case is to have image hidden, ask for preload and then
show image on callback, if there is no callback, image is never shown.
SVN revision: 38236
Wow, this was tricky to find since it is hard to trigger, thanks to
Canola complex edje files we could spot it!
In some cases we end with object being marked as dirty while
calculating its state (ie: edje), then we need to run smart calculate
again.
This has a drawback however: we cannot check for need_recalculate()
inside smart calculate anymore, we must assume it is only called if
the flag is set. To avoid that we could mark a shadow member and use
that or use a counter, that has the problem of using more data.
SVN revision: 38108
Eina hash api must get non NULL pointer allocated with
eina_hash_new(), but Evas hash started with NULL and would allocate
and destroy the hash as required by operations.
To do a proper wrapper we must ensure we don't call Eina hash API with
NULL, we must handle that outside Eina.
PLEASE do not remove this code again (it's the second time I add it),
this is the correct approach. Other than that is going after evas_hash
usage and converting directly to eina_hash.
SVN revision: 38091
Unset value is now 0x0 and this is handled as invalid, with an error message.
1x1 is a valid fill, but it is very slow and often system hangs while
it scale the whole thing... usually nobody want it at 1x1, we just end
using that for unset values. With unset value at 0x0 it will not
happen and we'll know when we forgot to do so!.
SVN revision: 38071
* evas: if we automatically destroy hash, check for NULL before
handling it to eina api, which expect elements to be created with
eina_hash_new() and thus will fail on NULL.
* eina: add magic checking for eina_hash and eina_hash_iterator, this will
help spot when NULL is used.
* eina_hash_foreach: do not try to create the iterator if hash is NULL.
SVN revision: 37982
* group the want_* variables related to engines and loaders at the beginning
of configure.ac
* use -no-undefined directly instead of a flag checked wrt the host
* some clean up in Makefile.am files
Please report any problem
SVN revision: 37784
but some other people can help me now with that code in svn
* expedite is working but sometimes crashes. Maybe a big mem leak ?
* maybe moving the creation of the bitmap in
evas_software_wince_gdi_output_buffer_paste()
to
evas_software_wince_gdi_output_buffer_new()
so that the memcpy is not necessary anymore
SVN revision: 37709
giving an extra void *user_data to layout function is now easy to
write bindings, just give the callback to be a generic function that
will call the language/binding specific function handled as user_data.
Example, for python we can use:
void _layout_dispatcher(Evas_Object *o, Evas_Object_Box_Data *priv, void *data) {
PyObject *pyobj = data, *args;
args = PyTyple_New(1);
PyTuple_SET_ITEM(args, 0, Evas_object_from_instance(o));
PyObject_Call(pyobj, args, NULL);
Py_DECREF(args);
}
evas_object_box_layout_set(o, _layout_dispatcher, pyobj, Py_DecRef);
SVN revision: 37640
* when fopen used, open in binary mode
* use Evil when fopen is used
* clean a bit some Makefile.am and add Evil dependency where needed
* in evas_path.c, remove useless old Windows CE code. It's managed by Evil, now
* in Evas_Data.h, move Eina.h before EAPI is defined for Evas.
* define _WIN32_WCE when the host is windows cee
SVN revision: 37476
tyo fix up some of these breaks first and there isn't a lot of time devoted
to this. so revert this. it's in svn history so we can dig it out any time we
like.
SVN revision: 37453
1. nearest scaling is now broken - it's always linear interpolation. this
will lead to slowdowns. i need to fix this - a must.
2. i think it's time i put in a transformed image cache that can cache an
image object at a transform (and share it) automatically.
3. transforms in non-software-engines will not work - broken. need to at
least do xrender and gl engines.
any volunteers to help?
SVN revision: 37447
Table code is still *incomplete*, it just do homogeneous layouts as
I'm still trying to figure out how to make it great.
I'm not expecting to make layout configurable, as we did for box, but
if you think it's required we can do that later.
Now that the public API of both BOX and TABLE are in, we can add these
as parts of Edje.
SVN revision: 37359
Draw back: When we are destroying an Evas canvas, we loose all cached font
that are not used anymore.
A correct fix would be to link Fndat to the Evas that provide and use them.
And only delete them when no more Evas reference them.
SVN revision: 37353
Box is a smart object to help with the common task of laying out lots
of objects. It's very flexibile and one can customize the layout
function on a per-object basis dynamically, just set a new layout
function (the most common are provided). By default layouts use size
hints from children to do their work, but one can also add new
properties, just subclass with evas_object_smart_smart_set() and then
define your own option_* callbacks.
This code was ported from Guarana (widgets/sequence_box.c) with
permission of ProFUSION embedded systems so it can be relicensed from
LGPL to Evas license.
Original author: Gustavo Lima Chaves <glima@profusion.mobi>
Port: Gustavo Sverzut Barbieri <barbieri@profusion.mobi>
SVN revision: 37188
On the let's break 'em all bandwagon, add the two callbacks (or
virtuals if you like the name) so we can know when some object is
attached or detached as a member of our object, this will help
eliminate confusing and duplicate functions like
evas_object_smart_clipped_smart_add().
Please recompile *ALL* your libs and applications that depend on Evas
and Smart Objects, like ETK.
SVN revision: 37084
565. what it does is it's a half-way house between no dither and "small
dither mask". what is does is change the "rounding" between odd and even
lines. the resolt is not as nice as small (or large) dither mask - but its
almost "good". it gives a horizontal-blinds like look to dithering. it's
almost as fast as no-dither in my tests on a core2 (of course making lots of
use of branch prediction or conditional instructins - whihc arm nd x86 have).
SVN revision: 36373
ProFUSION funded the rework of DirectFB engine, it works quite well,
please report problems with it and be sure to try to uncomment the
following lines to see if it helps:
evas_engine.c: (uncomment if you notice problems)
//#define DFB_USE_EVAS_IMAGE_DRAW 1
//#define DFB_USE_EVAS_RECT_DRAW 1
//#define DFB_USE_EVAS_POLYGON_DRAW 1
//#define DFB_UPDATE_INDIVIDUAL_RECTS 1
polygon.c: (comment if you notice slowdowns, but may lead to visual problems)
#define USE_SPAN_RECTS 1
You can also turn on debug by uncommenting in evas_engine.c:
//#define DFB_DEBUG_IMAGE 1
//#define DFB_DEBUG_FLAGS 1
//#define DFB_DEBUG_ACCELERATION 1
Thanks to Denis Oliver Kropp (dok) for review and patches!
SVN revision: 35904
that's about it. a bit hacky - but works and frankly.. the idea is that u'd
set a scale factor once really and not change it per obj... most likely.
SVN revision: 35896
This class covers the most common cases, usually its sub-classes will
have to implement resize and override one or two methods at most,
making the smart object usage less error prone and easier.
Default behavior is:
- add: creates a hidden clipper with "infinite" size;
- del: delete all children objects;
- move: move all objects relative relatively;
- resize: not defined;
- show: if there are children objects, show clipper;
- hide: hides clipper;
- color_set: set the color of clipper;
- clip_set: set clipper of clipper;
- clip_unset: unset the clipper of clipper;
Documentation explains an easy way to inherit from this class and
still be able to use overridden methods.
SVN revision: 35861
Some people is using it for some time now without problems, so I'm
adding it to SVN to get some broader use. Remember to recompile ALL
libraries that depend on Evas as it will change the
EVAS_SMART_CLASS_VERSION and old classes will fail to load.
This will also change Edje so it will postpone _edje_recalc() to
render time, calculate() callback, however some methods will force
early recalculation.
SVN revision: 35860
- some enignes break as they dont have the stubbed out functions, and
xrender/gl engines dont even implement the drawing and need to (but are
stubbed out).
SVN revision: 35677
* add a ressource file that set the video management
as non legacy. It forces device that are in vga to
run in vga and not in qvga with gapi
* use c++ calls to display error messages in evas_wince_ddraw.cpp.
It removes a problem during linking with some versions of cegcc
* minor fixing / formatting
SVN revision: 35148