Commit Graph

66 Commits

Author SHA1 Message Date
Jean-Philippe Andre e7e3f73bbe Gif: Fix animated gifs when used as proxy sources
This looks like a typo: if (animated > 1) when animated is a... Bool!

So, I am not entirely sure why this bug is visible in case of gif
proxies, all it seems that the load_data function may be called
multiple times when the object is visible. So gif close and reopen
happen properly, and the first frame can be decoded.
2014-02-17 16:59:43 +09:00
Cedric BAIL 1929637aa0 evas: no loader should ever close an Eina_File anymore.
This would lead to some crash in EFM if relying on Evas to find the file format by
trying all its loader.

This should fix T674 and T668.
2013-12-20 15:10:16 +09:00
Carsten Haitzler 846bbafbfb evas - jpg loader - speed up header check for pgoressive jpgs 2013-12-20 14:14:52 +09:00
Guillaume Friloux 8937708e43 Fix coding style madness. 2013-12-19 11:12:46 +01:00
Carsten Haitzler 8f876cfe72 evas - fix gif loader drop of image data sometimes (image dump/flush)
stable release - cherry-pick me!

this fixses some still gifs going missing.
2013-12-12 18:42:13 +09:00
Carsten Haitzler 22da09105d evas gif loader - address animated always being true
this addresses CID 1135790 and removes useless checks.
2013-12-11 18:10:15 +09:00
Carsten Haitzler 9a3294d1cb gif loader - handle theoretical NULL loader_data case 2013-12-11 09:23:09 +09:00
Carsten Haitzler 3047ec4d91 evas - fix gif loader cpu overuse - used too much cpu to decode anims
stable release - cherry-pick me!

the evas gif loader used way too much cpu to decode animated gifs
because in the rewrite that made it correct, it did not store the
current gif file handle and state, thus each frame it would have to
decode all frames before that one before finally decoding the final
one. that means to decode frame 200, it decoded frame 1, 2, 3, 4 etc.
all the way up to 199 THEN decoded 200 on top, so decode cost became
progressively more then further through the animation you were.

this fixes that by storing state and file handle and allowing you to
iterate through.
2013-12-10 16:38:23 +09:00
Cedric Bail 885222f22d evas: fix loader to properly define _XOPEN_SOURCE for Solaris. 2013-12-04 18:33:04 +09:00
Cedric Bail d2c5a37f37 evas: this value is never read after that point, simplify logic.
This has been spotted by clang static analyzer.
2013-11-28 17:04:32 +09:00
Cedric Bail 1b9d5f9a3e evas: Nice catch from Coverity, fix defect CID 1126097, 1126096 and 1126088. 2013-11-07 19:56:04 +09:00
Carsten Haitzler 309e287b7c evas - gif loader rewrite (clean up code, document it a lot AND fix bugs)
after several days of beating head on desk, i gave up trying to find
the exact cause of some gifs not rendering right as animated gifs due
to the loader. it had something to do with dispose mode handling and
which frame it was applied to. i noticed the structure made it also
hard to fix, so this re-structures the entire thing with cleaner code,
less code AND more comments, with a limited memory cache (512k) for
previous frames per image (to avoid eating up huge memory blobs for
big/long animations - though at the expense of cpu), and with some
notes for future fixes - like fixing the "load 2 copies of the same
animated gif" issue... that's another day.

this does fix https://phab.enlightenment.org/T443 along with many
other things.
2013-10-30 18:18:08 +09:00
Vincent Torri 3b8b2ac66c evas: add JPEG 2000 loader.
This add finally support for JPEG 2000, but be aware that libopenjpeg
is very badly managed. There is currently only version 1.5.x that does
provide the right files, is usable by a third party and portable. You
can seriously forget any other version.
2013-10-01 16:38:44 +09:00
Cedric Bail e60baa0061 evas: change mapping policy to be less agressive into loading file in memory.
Should fix T271.
2013-08-02 10:25:26 +09:00
Stefan Schmidt 92de5dd3c6 evas/eet: Prevent libjpeg to redefine INT32.
The define prevents that INT32 gets redefined in libjpeg while it
already is defined for the mingw build.
2013-07-09 11:19:28 +01:00
Chris Michael 461e406b91 Fix memleak reported by Coverity.
NB: Fixes Coverity CID1039652

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-07-08 08:43:24 +01:00
Carsten Haitzler 28c2bd1918 evas - gif: refactor a lot of the gif animated loader code to be much cleaner. 2013-07-06 15:12:36 +09:00
Carsten Haitzler fab94cb3ea evas - fix gif animatd loader segv just inroduced. 2013-07-05 23:11:51 +09:00
Cedric Bail 2efcd3bb19 evas: fix gif loader accessing uninitialized value. 2013-07-05 11:35:06 +09:00
Jean-Philippe Andre f1506d8dd2 evas/loaders: use Eina_Stringshare where needed.
Evas loaders' open() function expect the key to be a stringshare,
so declare it as such and keep using ref() without add().

Signed-off-by: Cedric Bail <cedric.bail@samsung.com>
2013-07-02 16:58:10 +09:00
Jean-Philippe Andre 687c4aa475 evas/cserve2: use Eina_Stringshare.
We must close the image after loading the data.
Also, Evas loaders expect stringshares.

Signed-off-by: Cedric Bail <cedric.bail@samsung.com>
2013-07-02 16:58:10 +09:00
Jean-Philippe Andre 65fcf390b4 evas/loaders: init/shutdown EET from loader module.
cserve2 slave requires Eet to be initialized before use :)

Signed-off-by: Cedric Bail <cedric.bail@samsung.com>
2013-07-02 16:58:10 +09:00
Jean-Philippe Andre a09efda8d2 evas/loaders: add log domain for ICO loader.
This is to remove the dependency of the ico loader on Evas itself.

Signed-off-by: Cedric Bail <cedric.bail@samsung.com>
2013-07-02 16:58:10 +09:00
Jiyoun Park 958a430f5e * Evas: Fix jpeg loader cannot deal with exif information correctly 2013-06-29 15:00:43 +09:00
Chris Michael d92edb51a4 Fix memleak reported by klockwork:
If a jpeg image is rotated and we have allocated space for ptr_rotate,
then we should free it Always ... Not Only if the degrees are
180...because we allocate it always

Signed-off-by: Chris Michael <cp.michael@samsung.com>
2013-06-28 13:39:45 +01:00
Sebastian Dransfeld 336f6ec328 efl: formatting 2013-06-20 13:28:18 +02:00
Sebastian Dransfeld 068f1ddc62 efl: formatting 2013-06-20 13:08:36 +02:00
Sebastian Dransfeld 51023d2d4f evas: Keep sane name for public header
Evas_Common.h should be used for the public header, and rather rename
evas_common.h internal header to another name.

Sa:
Evas_Common_Header.h -> Evas_Common.h
evas_common.h -> evas_common_private.h

Shouldn't have both Evas_Common.h and evas_common.h because of case
insensitive filesystems.
2013-06-20 12:53:29 +02:00
Jiyoun Park ebf0cd6728 Evas: fix gif cannot decode alpha value correctly. 2013-06-05 15:26:09 +09:00
Simon 23ed5115c0 evas: Fix evas gif image loader for libgif version 5
Because arc doesn't like me much at the moment here's a simple patch to
fix the gif loader for the latest libgif version. DGifOpen now takes a
error param as its final argument, if the param is not NULL it will
return a error code if it fails. Similar to another patch i sent a few
months back. The patch has been tested on OBS for old and new versions.
2013-06-03 09:16:25 +01:00
Cedric Bail c3f9d3b8b8 evas: Make Evas_Loader API public. 2013-05-08 18:16:59 +09:00
Jérémy Zurcher 62cae26de0 evas: fix var used uninitialized on_error 2013-05-07 22:33:10 +02:00
Cedric Bail 0d2c6481b8 evas: final cleanup of the API, should be ready to make it public by now. 2013-05-06 19:02:05 +09:00
Cedric Bail 6929386895 evas: now move eina_file also out of the frame_duration API. 2013-05-06 19:02:05 +09:00
Cedric Bail 7d83e42046 evas: move evas cache API outside of the image data loader API. 2013-05-06 19:02:04 +09:00
Cedric Bail 6f802ab234 evas: start work on making the loader module a public API.
Goal is to be able to remove all internal Evas call from inside all
loader module. To do so we are going to open and hold a reference to the
file from outside of the module, read the header, create the image data,
load the data, close that reference.

Once that done, the next step is to let the file remain open as soon as
the filename/key is set and add an API to set an Eina_File directly. This
way edje can maintain the same file open as it use for an edje object,
keeping things in sync and avoid rendering glitch during update.
2013-05-06 19:02:04 +09:00
Cedric Bail 2b61da5a5a evas: remove svg loader from inside the merged tree. 2013-05-06 19:02:04 +09:00
Jiyoun Park e7990ed693 * Evas: Fix gif loader can't load image which has normal frames and
error frames
2013-05-05 00:01:57 +09:00
Jiyoun Park ccea9eca41 Evas: fix gif bug related with scale down decode. 2013-04-15 13:45:18 +09:00
Jiyoun Park 8aea52b847 remove tab 2013-04-15 13:25:50 +09:00
Jiyoun Park 5ba104b46e * Evas: fix gif decoding bug related with background color. 2013-04-14 20:49:45 +09:00
Cedric Bail 3fe8098e9c include some header files conditionally add specific test for fcntl 2013-03-11 10:34:47 +09:00
Henrique Dante de Almeida 2656d7097e evas: Fix PSD image loading 2013-02-26 10:17:28 -03:00
Daniel Willmann c0fc75b78d xpm_loader: Make tok larger so strcpy will fit
Found through klocwork. It seems there are more potential issues here.

Signed-off-by: Daniel Willmann <d.willmann@samsung.com>
2013-02-18 12:18:33 +00:00
Cedric BAIL 74aa601afc evas: improve portability of bmp loader.
On system like 64bits windows it is not a guaranty that a
sizeof (long) == sizeof (void*), we are better using the right type.
This generate a warning that we could have seen with just cross compilation.
2013-02-16 10:36:41 +01:00
Daniel Willmann fecf68a886 efl: Unbreak evas gif-loader animation support
Always returning -1 for the frame duration does not have the desired
effect. Fix the logic checking whether eina_file_open has succeeded.

Animated GIFs play way too fast without this.

Signed-off-by: Daniel Willmann <d.willmann@samsung.com>

SVN revision: 83100
2013-01-22 19:00:08 +00:00
Gustavo Sverzut Barbieri 1486f40f9b fix bug spotted by clang.
SVN revision: 83015
2013-01-20 14:24:39 +00:00
Lucas De Marchi 06ff74834f efl: remove checks for socket.h, net/*, arpa/*
SVN revision: 82585
2013-01-10 20:26:02 +00:00
Lucas De Marchi db395ef7eb efl: Remove check for unistd.h
* unistd.h: is very useful, very old and very standard.



SVN revision: 82577
2013-01-10 20:25:26 +00:00
Jiyoun Park aad1b1ed4e Fix evas bmp loader code which deal with image size.
if image file's image size not apply padding size, decoding cannot work correctly



SVN revision: 82532
2013-01-10 08:53:11 +00:00