Fix invalid access if using async-render
authorbarbieri <barbieri@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Fri, 16 Jul 2010 22:52:04 +0000 (22:52 +0000)
committerbarbieri <barbieri@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Fri, 16 Jul 2010 22:52:04 +0000 (22:52 +0000)
commit44ff18de1f918e3c8de1dcbc08738906b91659a0
treed2f04936938eb14f5518e252f8b587d410c5c51c
parentceed709e16037bc5145a3ab17d88261e70d7f913
Fix invalid access if using async-render

Ouch, that was nasty! src/lib/cache/evas_cache_image.c was assuming
all Image_Entry were RGBA_Image (why?!?!?), thus doing the cast and
having mutexes and other to operate on garbage (possibly crashing due
segv). This happened to be the case with Soft16_Image used by
software_16 engines.

I'm not sure, but this may fix problems that people noticed with
async-render hanging their systems even if not explicitly enabled
during runtime.

I also found it quite strange the number of locks required by this
code! Clearly we could use macros to simplify and avoid bugs, but
maybe some atomic_inc/dec code should be used to remove half of the
mutexes in that code?

/me wonders what kinds of bug more we can expect from this code :-/

git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/evas@50300 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33
src/lib/cache/evas_cache_image.c
src/lib/engines/common/evas_image_main.c
src/lib/engines/common/evas_pipe.c
src/lib/include/evas_common.h