path: root/src/bin (follow)
AgeCommit message (Collapse)Author
2013-11-04edje: add string "default" to a default description of the part being build.Vyacheslav Reutskiy
Fix deffect with a missing tokken 'state' in the first description block when generated by edje_cc (It is perfectly valid to not specify the first description name as it will always be "default"). Reviewers: cedric, seoz Reviewed By: cedric Differential Revision: Signed-off-by: Cedric Bail <>
2013-11-04edje: delete unused images from eet(edj) file.Vyacheslav Reutskiy
Update the data_process_lookups function. Earlier images are not deleted, but his name was removed from the list, and it was possible to access the image by id. Now all unused images are deleted. Reviewers: cedric, seoz Differential Revision: Signed-off-by: Cedric Bail <>
2013-11-01edje: make functions return Eina_Bool and fix documentation.Andrii Kroitor
Make the following functions return Eina_Bool so the caller can detect errors: edje_edit_part_drag_x_set edje_edit_part_drag_y_set edje_edit_part_drag_step_x_set edje_edit_part_drag_step_y_set edje_edit_part_drag_count_x_set edje_edit_part_drag_count_y_set Added functions for threshold: edje_edit_part_drag_threshold_set edje_edit_part_drag_threshold_get Fixed description of 'count' parameter of dragable.x/y Reviewers: cedric, seoz Reviewed By: cedric CC: reutskiy.v.v Differential Revision: Signed-off-by: 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.
2013-10-28evas/cserve2: Small performance fixesJean-Philippe Andre
2013-10-28evas/cserve2: Repack strings index when too fragmentedJean-Philippe Andre
2013-10-28evas/cserve2: Fix NULL vs. empty stringJean-Philippe Andre
Server side: Some strings were NULL, some other were empty. Client side was looking for NULL, but the shared index contained empty key.
2013-10-28evas/cserve2: Remap indexes when count is wrongJean-Philippe Andre
When advertised count is wrong, try to remap the index. This will avoid errors with string_get().
2013-10-28evas/cserve2: Fix lag with invalid font glyphsJean-Philippe Andre
2013-10-28evas/cserve2: Add valid flag on Image_Data and File_DataJean-Philippe Andre
Images and Files can be discovered by the client scanner before they are valid (aka. loaded or opened). We want clients to ignore all shared objects that are not ready yet, as they are in an undefined state (values and memory might be invalid).
2013-10-28evas/cserve2: Optimize shared stringsJean-Philippe Andre
Shared string indexes are not repacked, since they live in a memory pool (where the indexes can be reused). So, the index in the table is equal to their ID. Add initial test to check if the item at index n has the ID n.
2013-10-28evas/cserve2: Add SHM debug tool (CLI)Jean-Philippe Andre
Prints out the content or the shared index. Does not need any socket connection to the server, read-only.
2013-10-28evas/cserve2: Add glyph shm names to Font_DataJean-Philippe Andre
2013-10-28evas/cserve2: Remove dead code.Jean-Philippe Andre
2013-10-28evas/cserve2: Add proper tags to shm arraysJean-Philippe Andre
Use tags such as INDX, FONT, IMAG, FILE. These can help debugging and for robustness, as they will be visible in the memory dump. Update generation_id after repack as well
2013-10-28evas/cserve2: Fix cserve2_usage toolJean-Philippe Andre
Also, print shared arrays usage as it is sent as first message upon connection to the server. Add fonts to LRU and flush LRU as needed. Seems to work okay. Could probably be finetuned a bit.
2013-10-28evas/cserve2: Store Glyph_Data in shared mempoolsJean-Philippe Andre
- Create one Glyph_Data array per Font_Entry - Copy Font_Source descriptors in shared array - Copy font entries in shared index - Send font index path over socket - Merge Font_Source and Font_Data in shared memory - Send font index path on client connect - Repack font index after free - Pass font shm name to clients
2013-10-28evas/cserve2: Add mempool_buffer_offset_get() apiJean-Philippe Andre
2013-10-28evas/cserve2: Store glyphs in shared arraysJean-Philippe Andre
Also, change the internal structure of glyph listing: - Use lists instead of inlists Switch to use Glyph_Data instead of Glyph_Entry
2013-10-28evas/cserve2: Add compile-time log level flag for cserve2Jean-Philippe Andre
DBG and INF messages pollute the logs and performance reports from valgrind, let's disable them at build-time for better benchmarking. Fix other compilation warnings and clean code a bit
2013-10-28evas/cserve2: Optimize cserve2_shared_string_del()Jean-Philippe Andre
eina_hash_del_by_data is very expensive, so let's delete by key since we can get the original data.
2013-10-28evas/cserve2: Add binary search in server sideJean-Philippe Andre
2013-10-28evas/cserve2: Fix race condition on font load / socket failJean-Philippe Andre
If the client exits while the server is loading fonts, the font entry objects are accessed after being freed. Note: This is not a proper fix. The race condition should still be fixed, but delaying client deletion a bit might help for a while...
2013-10-28evas/cserve2: Share paths of index tables with clientsJean-Philippe Andre
- Send paths to all connected clients - Send paths upon connection from a new client - Client side: - Fast find opened images - Fast find loaded images - Optimize load by skipping socket wait Also, remap indexes when needed (file size changed) When index file grows, the clients are not notified, so they must constantly check that their mapping matches the current array size.
2013-10-28evas/cserve2: Prepare shared indexes in clientsJean-Philippe Andre
- Move required struct definitions to common evas_cs2.h - Open/close shm and map arrays to memory Pretty stupid for now as it will close & reopen the shm files even when unchanged. - Check shm size and array header consistency - Implement message send - Send messages from server when calling repack()
2013-10-28evas/cserve2: Fix image load premultiplicationJean-Philippe Andre
There was a color problem in elementary_test since elm sets premul to 0 while expedite sets it to 1 during image load.
2013-10-28evas/cserve2: _cserve2_cache_fast_scaling_check()Jean-Philippe Andre
Adapt function to new Data/Entry model.
2013-10-28evas/cserve2: Simplify error logsJean-Philippe Andre
2013-10-28evas/cserve2: Store Image_Data in shared arrayJean-Philippe Andre
Split image entries into Image_Data and Image_Entry. Store, find and use Image_Data descriptors from shared array. Fix some wrong hash table usages.
2013-10-28evas/cserve2: binary search in Shared_ArrayJean-Philippe Andre
2013-10-28evas/cserve2: Repack File_Data shared arrayJean-Philippe Andre