summaryrefslogtreecommitdiff
path: root/src/bin/evas (follow)
AgeCommit message (Collapse)Author
2014-10-28inotify: Fix safety after read in 3 placesJean-Philippe Andre
Fixes Coverity issues: - CID 1039565 - CID 1039566
2014-10-28Evas cserve2: Check message sizeJean-Philippe Andre
Fixes CID 1039570
2014-09-01evas cserve2 - check return of fcntlCarsten Haitzler (Rasterman)
fix CID 1039707
2014-08-27evas cserv2 - fix fcntl return checkCarsten Haitzler (Rasterman)
fixes CID 1039704
2014-08-27evas cserve2 - fix fcntl return checkCarsten Haitzler (Rasterman)
fix CID 1039705
2014-08-27evas cserve2 - fix check of fcntl returnCarsten Haitzler (Rasterman)
fix CID 1039706
2014-08-27evas cserve2 - check fcntl return for setting non-blockCarsten Haitzler (Rasterman)
fix CID 1039707
2014-08-14evas cserve - handle possilbe null ref and fentry pointersCarsten Haitzler (Rasterman)
this fixes CID 1193209 with possible NULL refs.
2014-08-13evas - cserve - dummy slave - shut coverity up and unmap mmaped memCarsten Haitzler (Rasterman)
while right, coverity doest know that this is just a dummy example, so... make it happy by unmapping. fixes CID 1193218
2014-03-18Evas cserve2: Fix client crashes when a file changedJean-Philippe Andre
Clients must ignore changed file entries as they are not valid anymore. The server will also mark the entry as invalid in case of file update. @fix
2014-02-14cserve2: Fix minor clang warningJean-Philippe Andre
2014-02-13evas cserve2 - fix chekc of wrong return typeCarsten Haitzler (Rasterman)
the wrong value was checked (not the returned value) - coverity caught this. fixes CID 1135269
2014-01-15Evas/cserve2: Add some safety checks when reading socket messagesJean-Philippe Andre
Fixes CID 1039571 and 1039572.
2014-01-14Evas/cserve2: Fix potential crash in image_freeJean-Philippe Andre
Don't try to free an object that was already freed. Basically, allow image_free(NULL).
2014-01-14Evas/cserve2: Clear up File_Data when opening a new imageJean-Philippe Andre
After a file changed, the "changed" flag was not reset in the File_Data structure, although it was supposed to represent a new entry altogether.
2014-01-14Evas/cserve2: Rename "invalid" field to "changed"Jean-Philippe Andre
This flag indicates that a file changed, not that the entry is invalid. There is another "valid" flag already.
2014-01-14Evas/cserve2: Improve error messages a bitJean-Philippe Andre
2014-01-14Evas/cserve2: Reduce error logs on invalid glyph loadJean-Philippe Andre
Change message level from ERR to WRN, when a glyph is not loadable because FT fails to load it or it contains 0 pixel. cserve2 used to complain about invalid glyph 3, on a few fonts
2014-01-14Evas/cserve2: Fix crash in server on file changeJean-Philippe Andre
An inotify callback is triggered when an image file changes, and it is supposed to cleanup all references to this image. Unfortunately, it was doing it in a very unsafe way as pointers could become invalid, because of hash free callbacks in the referenced image list. Add some list safety and always assume the pointer might be dead after free operations. TBH, this _file_changed_cb function looks very confused to me (as it tries to bypass eina_hash_del).
2014-01-14Evas/cserve2: Fix memleak during shutdownJean-Philippe Andre
Don't reset the dead slave callback, as it is used to free the slave worker's resources.
2014-01-14Evas/cserve2: Use calloc instead of mallocJean-Philippe Andre
This will silence some warnings from valgrind (and add some safety as well...)
2014-01-13evas - fonts - move to using 4bit and rel 4 bit compressed font glyphsCarsten Haitzler (Rasterman)
this changes the internal encoding of font glyphs in evas to use 4bit uncompressed if small, or 4bit rle (run length encoded) if larger. this caves at least 50% of memory on fonts - and more if bigger. with large fonts (40-80pixel size) we can save in the region of 80% of memory used for glyphs. this also happesn to allow speedups in rendering too.
2014-01-10evas cserv2 - remove logical dead codeCarsten Haitzler (Rasterman)
fixes CID 1113441
2014-01-10cserve2 - debug bin - fix theoretical leak of socket fdCarsten Haitzler (Rasterman)
fixes CID 1039286
2014-01-09Evas cserve2: Fix crash in cserve2 when slaves dieJean-Philippe Andre
If a slave dies (eg. killed) when it's idle, then cserve2 will crash miserably at the next request. Indeed, the dead slave's corpse was removed from the working slaves' list but not from the lazy idle slaves list. Also, set read buffer to NULL after free. Just in case. We never know :)
2013-12-26efl: Unified eina critical manro to CRI.Daniel Juyung Seo
Being annoyed by different types of eina critical macros - CRI, CRIT, CRITICAL -, I concluded to unify them to one. Discussed on IRC and finally, CRI was chosen to meet the consistency with other macros - ERR, WRN, INF, DBG - in terms of the number of characters. If there is any missing bits, please let me know.
2013-12-15evas - fb engine - fix mem leak if ioctl fails on fb modeCarsten Haitzler (Rasterman)
this fixes CID 1137852
2013-12-11evas - cserve2 - fix uninitialized member "image_id".Carsten Haitzler (Rasterman)
fixes CID 1042303.
2013-11-27evas/cserve2: Update image loaders listJean-Philippe Andre
evas_image_load.c's list was updated to match the generic loaders, in 38dd405712f5306fdb4b30. The list used by cserve should be the same. Actually, there should be a common function instead of code duplication here.
2013-11-10evas: use portable infrastructure to detect page size.Cedric BAIL
2013-10-30evas/cserve2: Fix crash in server when an image file changesJean-Philippe Andre
Since cserve2 uses inotify to track image file updates, it will drop its references to a specific file and all the associated images. Fix some logic in the deletion code.
2013-10-29evas/cserve2: Fix new Coverity issuesJean-Philippe Andre
Nothing extraordinary here. Most potential crashes are extremely unlikely. - Fix CID 1113444 - Fix CID 1113442 - Fix CID 1113441 (Logically dead code, can not be NULL) - Fix CID 1113440: Explicit null dereferenced This is actually an impossible situation. Fixed by checking for nullity and printing out some error messages instead of just crashing. - Fix CID 1113439: Dereference after null check Logically impossible code as both idxpath and datapath must be either set or null at the same time. Change the if logic to tell Coverity there's no bug. - Fix CID 1113438 (Argument cannot be negative) Fix wrong check of return value from shm_open. - Fix CID 1113437 (Argument cannot be negative) Fix wrong check of return value from shm_open. - Fix CID 1113436 (Dereference null return value) This case really shouldn't happen. But the extra check does not hurt. - Fix CID 1113435 (Dereference before null check) Check for nullity after map open. - Fix CID 1113434 (Extra sizeof expression) Debug buggy debug tool :) - Fix CID 1113433 (Uninitialized scalar variable) Insignificant issue: only prints wrong debug logs :) - Fix CID 1113431 (Uninitialized scalar value) Check if (!found) only to print out logs. Not a big deal if found was invalid. - Fix CID 1039462 (Logically dead code)
2013-10-28evas/cserve2: Merge Glyph_Data and mempool indexJean-Philippe Andre
Glyphs were previously using 3 shared buffers, now reduce to 2: - Memory pool (mempool) containing the glyph drawable data - Index table (Shared_Index / array) containing only the indexes of the buffers in the mempool - Glyph_Data table (array) containing the glyphs descriptors AS WELL as the buffer indexes. So, we just merge the two index tables into one by using directly objects of type Glyph_Data for the referencing of the mempool buffers.
2013-10-28evas/cserve2: Add debug and reduce number of GLYPHS_USED messagesJean-Philippe Andre
One socket message was sent per each glyph used ... which means a LOT of messages when text is being redrawn. Reduce this flow of messages by triggering send() only when 50+ items are being used. Btw, USED is a bit useless as there is no UNUSED equivalent. Also, slightly improve debug logs.
2013-10-28evas/cserve2: catch only SIGINT from cserve2Jean-Philippe Andre
SIGTERM and SIGQUIT don't need to be caught. the proper signal to ask cserve2 to exit cleanly is SIGINT. enlightenment_start (or systemd) should be responsible for restarting in case of crash / unexpected termination. cserve2 will not restart if killed with signal SIGINT, as it will then exit with return code 0 (normal)
2013-10-28evas/cserve2: Reduce repacking and resizing of SHMJean-Philippe Andre
These operations have tons of side effects and it's a lot easier to just avoid doing them. Now, repacking will always need to happen as applications will add/delete strings and items, but the less frequent, the better :) Also, align most arrays & mempools to 32K instead of the default page size (4K). This will also reduce resizes.
2013-10-28evas/cserve2: Fix font reloading after cserve2 restart.Jean-Philippe Andre
Well it LOOKS like it's working properly. Clients can safely keep running after cserve2 crashed and restarted.
2013-10-28evas/cserve2: Add PID to shm filenamesJean-Philippe Andre
This will help identify new memory pools in case cserve2 restarts and reloads the same glyphs for instance.
2013-10-28evas/cserve2: Reconnect to cserve2 in case of server crashJean-Philippe Andre
Try to reconnect to cserve2 if the socket connection was lost. Resend some messages if necessary. Images reload seems to be working. Actually, the images don't change over time, so the clients just keep the previous references to their images. FONT RELOAD IS NOT WORKING: - Crashes - Invalid glyph data - Infinite loop in _glyph_map_remap_check() Root cause: When new glyphs are requested from the server, they are added to the mempool. So it is necessary to remap the font. Unfortunately, in case of server reboot, we did not keep the mempool so the old glyphs that were not requested again will not be valid.
2013-10-28evas/cserve2: Fix reload of image without load_optsJean-Philippe Andre
Problem: Images opened without load_opts are reopened multiple times. Solution: Use empty load opts when looking for the key.
2013-10-28evas/cserve2: Fix scaling error (server side)Jean-Philippe Andre
This causes crashes in the client also...
2013-10-28evas/cserve2: Fix invalid file referencing in clientJean-Philippe Andre
Fixes elementary_test "Bg Image": - Various load_opts (jpeg geometry) where not handled properly by the client.
2013-10-28evas/cserve2: Fix scaling optionsJean-Philippe Andre
Be more careful when selecting the original image for scaling. Most load opts must remain the same, only smooth can be toyed with. Also, fix alpha when scaling.
2013-10-28evas/cserve2: Add alpha flag to Image_dataJean-Philippe Andre
2013-10-28evas/cserve2: Use scalecache with cserve2Jean-Philippe Andre
Let's reuse the logic from scalecache and call cserve2 functions when the scalecache should be used. So, now, cserve2 server will not scale any image... This is too computationally intensive for the server's main thread. This is not optimal but makes a hell of a lot more sense for the moment. (since cserve2 manages the SHM segments)
2013-10-28evas/cserve2: Fix images indexing (File_Entry stuff)Jean-Philippe Andre
High-level problem: cserve2 does not support load_opts properly when opening an image. As a result, when (pre)loading a JPEG file with specific load options (eg. w, h, region and orientation), the image buffer might have the wrong dimensions. So, we need to use load_opts when computing file hash key. And, pass these load options to the loader slave, and use them while OPENING the image. This will set properly the geometry. Fixes test "Preload and Prescale" in elementary_test.
2013-10-28evas/cserve2: Drop pre-emptive load of large imagesJean-Philippe Andre
When the image is too large, let's not preload it unless specifically requested by the application. Value 320x320 is completely arbitrary.
2013-10-28evas/cserve2: Fallback to normal cache for animated gifsJean-Philippe Andre
Pass around "animated" flag for images that can be animated. Fallback to local cache if the image is animated. Implementing support for animated images in cserve2 does not seem to make a lot of sense considering each frame must be requested independently in real time,... and to be honest there doesn't seem to be any valid use case anyway :)
2013-10-28evas/cserve2: Fix font hintingJean-Philippe Andre
cserve2 was not handling font hints properly in the server side Add some consistency checks and separate glyphs per hinting value
2013-10-28evas/cserve2: Fix segfault in cserve2 slaveJean-Philippe Andre
Slaves always crash when loading SVG images. The svg module was simply not a dynamic module.