Commit Graph

131 Commits

Author SHA1 Message Date
Rafael Antognolli 99621b948a evas/cserve2: There's no need to disable this anymore.
We don't use this cache with cserve2, so it makes no sense to keep async
preload disabled. When not using the cserve2, even if built with that
option, it will support preload with no side effects.



SVN revision: 73422
2012-07-06 16:58:56 +00:00
Iván Briano 15328efb85 evas/cserve2: fix typo that kept cserve2 disabled
now seriously...

Introducing Cache Serve 2.

This cache server will initially load images for clients connected to
it. It starts slave processes to load these images, and share the loaded
images through shm with the clients. All the connection done between
clients and the server goes through sockets.

The cserve2 build option is turned on by default, while the old cserve
was disabled, but in order to make clients use it, the environment
variable EVAS_CSERVE2 must be set, and a server must be running.

Clients will try to find the socket on a specified location using the
environment variable EVAS_CSERVE2_SOCKET. If it's not defined, then the
XDG_RUNTIME_DIR path should be used, and finally HOME, TMPDIR and /tmp.



SVN revision: 70699
2012-05-03 21:01:31 +00:00
Cedric BAIL 377cc2368a evas: remove EVAS_FRAME_QUEUING.
NOTE: This should be part of evas_render itself and not
delegated to the engine. So cleaning things to make it easier
during evas_render rewrite.


SVN revision: 70503
2012-04-26 09:53:03 +00:00
Carsten Haitzler 3c9c59c5a5 hmm no - we shouldnt delete here.. we just find it in the active image
hash. as such the image is dirtied and thus removed from this hash
anyway so it doesnt need deleting.



SVN revision: 67778
2012-02-09 03:50:10 +00:00
Jiyoun Park 64e2d7fee5 fix memory leak of dirty image
if file was chaned by somebody, it was added to dirty list during cache request.
currently this dirty image added to cache->dirty list and never freed until image shutdown.
but dirty image of chaned file never used so add delete code for memory efficiency.
and fix bad indentation.


SVN revision: 67604
2012-01-30 14:36:15 +00:00
Sebastian Dransfeld 45f0dcbd45 evas: only check references ifndef EVAS_CSERVE
We only check the value of references if EVAS_CSERVE isn't defined, so
no need to define it or assign it if EVAS_CSERVE isn't defined.

SVN revision: 67304
2012-01-18 23:33:54 +00:00
Sebastian Dransfeld c9abcf691d evas: Remove unused variables
SVN revision: 67302
2012-01-18 23:33:33 +00:00
Cedric BAIL b7a86e79e0 evas: less unused warning.
SVN revision: 65963
2011-12-06 16:08:30 +00:00
Carsten Haitzler 157224ffef jiyoun bug! you didnt fix the hkey string properly.. you set the last
2 chars to o? where ? is "undefined". you set the same string char to
/ then o. fix!



SVN revision: 63785
2011-10-04 01:41:45 +00:00
Vincent Torri 6c59cdc4f4 fix warning
SVN revision: 63710
2011-09-30 04:14:30 +00:00
Jiyoun Park dae46003e7 From: Jiyoun Park <jy0703.park@samsung.com>
Subject: RE: [E-devel] [Patch] Animation gif feature patch

Animated gif suport in evas and api's to handle animated images and
frame flipping. from jy.



SVN revision: 62331
2011-08-11 06:04:08 +00:00
Cedric BAIL abffaa922d evas: wipe out cache in the right order.
SVN revision: 61956
2011-08-01 14:56:26 +00:00
Mike Blumenkrantz ee754de955 fixes a weird bug exposed somewhere by giant tooltips resulting in the following crash:
#0  0xb7e92786 in evas_cache_image_flush (cache=0x0) at evas_cache_image.c:1353
#1  0xb7e9192e in evas_cache_image_drop (im=0xb6aa4d38) at evas_cache_image.c:913
#2  0xb7ee3d8b in eng_image_free (data=0xb6a020c0, image=0xb6aa4d38) at evas_engine.c:383
#3  0xb7e4b8e6 in evas_object_image_free (obj=0xb7517178) at evas_object_image.c:2478
#4  0xb7e4f403 in evas_object_free (obj=0xb7517178, clean_layer=0) at evas_object_main.c:45
#5  0xb7e41c95 in evas_layer_free_objects (lay=0xb6a5d8b0) at evas_layer.c:80
#6  0xb7e42656 in evas_free (e=0xb6a98cd8) at evas_main.c:204
#7  0xb7f27ad3 in _ecore_evas_free (ee=0xb6ab18e8) at ecore_evas.c:2822
#8  0xb7f24161 in ecore_evas_free (ee=0xb6ab18e8) at ecore_evas.c:839
#9  0xb7df2f7f in _deferred_ecore_evas_free (data=0xb6ab18e8) at elm_win.c:477
#10 0x4b0fd858 in _ecore_job_event_handler (data=0x0, type=14, ev=0xb6a99c58) at ecore_job.c:131
#11 0x4b0f907e in _ecore_event_call () at ecore_events.c:693
#12 0x4b0ff93e in _ecore_main_loop_iterate_internal (once_only=0) at ecore_main.c:1750
#13 0x4b0fe195 in ecore_main_loop_begin () at ecore_main.c:848



SVN revision: 61736
2011-07-26 10:03:07 +00:00
Cedric BAIL 5cbc6350ba evas: add software YUY2 colorspace converter.
NOTE: will shortly learn how to write the corresponding shader and add it soon.


SVN revision: 61548
2011-07-21 10:36:05 +00:00
Cedric BAIL 260718c700 evas: add evas_object_image_load_orientation_set, evas_object_image_load_orientation_get.
SVN revision: 60040
2011-06-07 13:39:13 +00:00
Lucas De Marchi 10237c5b56 evas: fix misspellings
Misspellings found by codespell



SVN revision: 59822
2011-05-30 16:45:08 +00:00
Carsten Haitzler 4dd1d5cf62 fix load of data to ACTUALLY set the load error in evas's image
objects. including preload.



SVN revision: 59529
2011-05-19 11:19:22 +00:00
Carsten Haitzler a59cd2a040 pointed out by jiyoun ... but patch wasn't quite right. shouldnt
manually ref-- the old im - should call drop. also... dont make
original dirty as we don't modify it, we just drop (unref) it.



SVN revision: 59431
2011-05-16 02:06:41 +00:00
Vincent Torri c3d5bfb5c5 Evas: cache: missing guards
SVN revision: 59394
2011-05-15 10:11:22 +00:00
Cedric BAIL c2df2df0c6 evas: don't use dead condition.
SVN revision: 59300
2011-05-09 14:42:12 +00:00
Cedric BAIL f91a33ef0d evas: we should not rely on mutex recursive stuff. fix potential source of bug.
SVN revision: 59294
2011-05-09 12:55:57 +00:00
Cedric BAIL 2166ee30c5 evas: use Eina_Condition.
SVN revision: 59288
2011-05-09 10:33:21 +00:00
Carsten Haitzler 57e07025d4 if you preload the same image more than once.. it may/will cause
problems as target is inserter in cache image target list multiple
times. fix by only alloding preload request to go in once.



SVN revision: 59140
2011-05-03 03:20:02 +00:00
Cedric BAIL 902350711d evas: don't use EINA_LOCK_INITIALIZER and improve eina_threads call.
Only call eina_threads_shutdown when thread are dead and not before.

Release and destroy thread lock before calling evas_async_events_process
as you should never have a lock taken in the main loop when calling it.


SVN revision: 59119
2011-05-02 11:28:47 +00:00
Carsten Haitzler a05d575f0a warning-- for eina locks
SVN revision: 59102
2011-05-02 08:24:27 +00:00
Carsten Haitzler e3a69d7c4a and fix up lock goop to work right with improved eina lock goop. i
hope i nixed this bug.



SVN revision: 59086
2011-05-01 13:25:23 +00:00
Carsten Haitzler 3aa2f7bb4a revert some changces to try fix lock issues - they create other
nastier ones.



SVN revision: 59073
2011-05-01 07:26:42 +00:00
Carsten Haitzler d5b8646544 try and remove lock deadlocks...
SVN revision: 59070
2011-05-01 06:58:36 +00:00
Carsten Haitzler 3d4b3d40a9 and try and reduce possible cache deadlocks/issues.
SVN revision: 59064
2011-05-01 06:26:41 +00:00
Carsten Haitzler a41176be3d remove unneded lock+unlock
SVN revision: 59060
2011-05-01 04:44:56 +00:00
Carsten Haitzler 6152914dd5 fix some nasty image cache issues i've found like double-frees, leaks
etc. etc. in corner-cases. it also re-factors the image cache code to
be much more manageable and understandable with cache/list management
doing the right thing in the internal calls.



SVN revision: 58779
2011-04-21 06:24:27 +00:00
Christopher Michael b42f8940b3 Evas: Fix nasty blank space after return and before semicolon.
NB: Nothing functional, just formatting.



SVN revision: 58708
2011-04-18 16:31:12 +00:00
Carsten Haitzler 7a2f6cd6d6 failure case more efficient
SVN revision: 58683
2011-04-15 09:32:28 +00:00
Carsten Haitzler 4e5231b3f8 fix image double-deref/free when not meant to happen
SVN revision: 58682
2011-04-15 07:49:25 +00:00
Cedric BAIL 25f1cf2d2f evas: fix build with uclibc.
SVN revision: 57991
2011-03-22 14:29:25 +00:00
Cedric BAIL 9eb10c822d evas: that wasn't a typo in fact.
SVN revision: 57989
2011-03-22 13:44:29 +00:00
Cedric BAIL bc554a974d evas: fix typos.
SVN revision: 57988
2011-03-22 13:36:16 +00:00
Carsten Haitzler cc58ee1e6a evas cache system more pedantic about matches and statting.
SVN revision: 57890
2011-03-19 07:08:59 +00:00
Carsten Haitzler 3d26ace1c7 evas: add memory image loader api. ask not how it works or i shall
disembowel you. ktnxbi.



SVN revision: 57736
2011-03-14 10:53:37 +00:00
Carsten Haitzler 19d4f8affc add unload callback - missing event problem that makes it impossible
for client apps that tried to be efficient with preloads to adapt
when the preloaded data is taken away from them. this allows it.
missing callback api bug fix.



SVN revision: 55745
2010-12-24 16:04:27 +00:00
Carsten Haitzler 62c8659619 fixed async preload stall bug! still 1 issue left when caches
(scalecaches) are flushed which can cause a hang until all data is
"loaded back in" again. it's a bit of a doosey actually and so isn't
fixed here.



SVN revision: 55551
2010-12-14 10:22:06 +00:00
Carsten Haitzler 9fe4dfe9b3 put in some disabled cache dump dbg.
SVN revision: 53949
2010-10-28 10:00:22 +00:00
Gustavo Sverzut Barbieri d89ebf341b cleanup: internal image information is now unsigned.
There is no meaning in negative values for image loading, marking as
dirty or size, so image internals (cache, entry) were changed to
unsigned, reducing possible errors, particularly with overflow.

engines were converted to the new way, but any 3rd party modules will
still work as they should be using values >= 0 only anyway.

please review.

new cases introduced by "comparison between signed and unsigned" were
fixed in the modules that used cache_entry or Image_Entry dimensions.



SVN revision: 52428
2010-09-18 23:16:25 +00:00
Lucas De Marchi 9c091e1714 Assert cache->usage never becomes negative
Assert cache->usage never becomes negative as was occurring before the
fix in r52149.

Just in time, the fix in r52149 was made by Ulisses, not me.



SVN revision: 52190
2010-09-13 13:58:34 +00:00
Lucas De Marchi d32c0f99bd Fix accounting of memory usage in image cache
Memory usage was not accounted right because
cache->func.mem_size_get(ie) returns 0 when called after
cache->func.destructor(ie). Thus the total memory used, kept on
cache->usage, is never decremented in _evas_cache_image_remove_activ()

This implies that cache->usage will keep growing and eventually it will
overflow, becoming negative. So evas_cache_image_flush() will not do its
job because cache->limit (assumed to be positive) will not be less than
cache->usage anymore. So the total memory allocated will start to grow
and the limit won't be respected.

Strictly speaking, it's not a leak, since all the memory will be
eventually freed when evas shutdown is called, but the program might be
killed by over allocating memory. This is caught by valgrind with the
massif tool. The graphic below shows that in the end a huge memory amount
is allocated. This is the moment when cache->usage became negative.

MB
26.04^                                                                   #
|                                                                   #::::
|                                                                   #::::
|                                                                   #::::
|                                                                   #::::
|                                                                   #::::
|                                                                   #::::
|                                                                   #::::
|                                                                   #::::
|                                                                   #::::
|                                                                   #::::
|                                                                   #::::
|                                                                   #::::
|                                                                   #::::
|                                                                   #::::
|                                                                   #::::
|                                                                   #::::
|                                                                   #::::
| :::::::::::::::::@@:::::::::@:::@::::::@::::::::::::::::::::::::::#::::
| : ::: ::: ::: :::@ :: ::: : @:: @:: :::@: :: ::: : : :: :: : ::: :#::::
0 +----------------------------------------------------------------------->Gi
0                                                                   54.83

This patch is a one line fix, which swaps the calls to
_evas_cache_image_remove_activ() and cache->func.destructor() making
cache->limit to be respected.



SVN revision: 52149
2010-09-10 23:00:26 +00:00
Sebastian Dransfeld ef4176d8e2 Check region h
SVN revision: 51721
2010-08-29 10:57:15 +00:00
Lucas De Marchi 255b2cb870 Apply double_condition_check.cocci
The offending projects were:

 E16/e/src/backgrounds.c                 |   10 ++++------
 PROTO/eon/src/lib/layout/eon_stack.c    |    4 +---
 ecore/src/lib/ecore_win32/ecore_win32.c |    3 +--
 ecore/src/lib/ecore_wince/ecore_wince.c |    3 +--
 edje/src/lib/edje_edit.c                |    3 +--
 evas/src/lib/cache/evas_cache_image.c   |    2 +-
 exalt/src/lib/libexalt_private.c        |    2 +-


This patch assumes code in these places were insane and the fix is to remove
one condition check. Most likely this is not true, but there's no automatic fix
for that.

Looking at the patch, it seems that some places should use "x" and "y" vars but
used just one of them and therefore they were caught by coccinelle.




SVN revision: 51666
2010-08-26 20:45:09 +00:00
Lucas De Marchi d8002ff386 Revert and re-apply badnull patch
Revert previous patch generated by badnull.cocci script, and apply the new one.
The main difference is that assert and assert-like functions are not touched
anymore.




SVN revision: 51650
2010-08-26 01:34:13 +00:00
Lucas De Marchi 5a8a8c9014 Convert (hopefully) all comparisons to NULL
Apply badzero.cocci, badnull.coci and badnull2.cocci

This should convert all cases where there's a comparison to NULL to simpler
forms. This patch applies the following transformations:

code before patch               ||code after patch
===============================================================

return a == NULL;                 return !a;

return a != NULL;                 return !!a;

func(a == NULL);                  func(!a);

func(a != NULL);                  func(!!a);

b = a == NULL;                    b = !a;

b = a != NULL;                    b = !!a;

b = a == NULL ? c : d;            b = !a ? c : d;

b = a != NULL ? c : d;            b = a ? c : d;


other cases:

a == NULL                         !a
a != NULL                         a




SVN revision: 51487
2010-08-21 13:52:25 +00:00
Cedric BAIL c689865500 * evas: remove some warning.
SVN revision: 51281
2010-08-18 15:11:07 +00:00