Commit Graph

23445 Commits

Author SHA1 Message Date
Jean-Philippe Andre ca44473f18 evas/cserve2: Scan glyphs and add to fash
This will save (just) a few socket waits.
2013-10-28 15:47:14 +09:00
Jean-Philippe Andre d5ac5a8df3 evas/cserve2: Remap glyph mempool if resized 2013-10-28 15:47:14 +09:00
Jean-Philippe Andre 22009a3f64 evas/cserve2: Use only one Glyph_Map per font
In the new cs2 model, only one shared buffer is allocated
for a font, and it resizes on demand.
2013-10-28 15:47:14 +09:00
Jean-Philippe Andre 3f30fae818 evas/cserve2: Remap indexes when count is wrong
When advertised count is wrong, try to remap the index.
This will avoid errors with string_get().
2013-10-28 15:47:14 +09:00
Jean-Philippe Andre 8b39c443fe evas/cserve2: Fix lag with invalid font glyphs 2013-10-28 15:47:14 +09:00
Jean-Philippe Andre 9d2400af8b evas/cserve2: Add valid flag on Image_Data and File_Data
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-28 15:47:14 +09:00
Jean-Philippe Andre a14e69e573 evas/cserve2: Remap string entries when size changed
Lots of files can't be found by the client when the strings table
changed, because it was not remapped properly.
2013-10-28 15:47:14 +09:00
Jean-Philippe Andre 743e204763 evas/cserve2: Optimize shared strings
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-28 15:47:14 +09:00
Jean-Philippe Andre 71fdd0d342 evas/cserve2: Add SHM debug tool (CLI)
Prints out the content or the shared index.
Does not need any socket connection to the server, read-only.
2013-10-28 15:47:14 +09:00
Jean-Philippe Andre bc7b337fc0 evas/cserve2: Add glyph shm names to Font_Data 2013-10-28 15:47:14 +09:00
Jean-Philippe Andre b5ca88027d evas/cserve2: Remove dead code. 2013-10-28 15:47:14 +09:00
Jean-Philippe Andre 4f5c48236f evas/cserve2: Add proper tags to shm arrays
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-28 15:47:14 +09:00
Jean-Philippe Andre 1e4ee656a0 evas/cserve2: Fix cserve2_usage tool
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-28 15:47:14 +09:00
Jean-Philippe Andre df31807329 evas/cserve2: Client-side scanning of Font Entries 2013-10-28 15:47:14 +09:00
Jean-Philippe Andre 467b1b1739 evas/cserve2: Store Glyph_Data in shared mempools
- 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-28 15:47:14 +09:00
Jean-Philippe Andre c7515f3300 evas/cserve2: Add mempool_buffer_offset_get() api 2013-10-28 15:47:14 +09:00
Jean-Philippe Andre 7ebda2d123 evas/cserve2: Store glyphs in shared arrays
Also, change the internal structure of glyph listing:
 - Use lists instead of inlists

Switch to use Glyph_Data instead of Glyph_Entry
2013-10-28 15:47:14 +09:00
Jean-Philippe Andre 28a5c6f587 evas/cserve2: Add compile-time log level flag for cserve2
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-28 15:47:13 +09:00
Jean-Philippe Andre 9d731364c1 evas/cserve2: Optimize cserve2_shared_string_del()
eina_hash_del_by_data is very expensive, so let's delete by key
since we can get the original data.
2013-10-28 15:47:13 +09:00
Jean-Philippe Andre e95bd7755e evas/cserve2: Add binary search in server side 2013-10-28 15:47:13 +09:00
Jean-Philippe Andre f5fee255de evas/cserve2: Fix race condition on font load / socket fail
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-28 15:47:13 +09:00
Jean-Philippe Andre a230e41409 evas/cserve2: Fix Eina_File leak at shutdown
cserve2_shutdown was not called
2013-10-28 15:47:13 +09:00
Jean-Philippe Andre f5d0f0aec3 evas/cserve2: Scan shared indexes in client side
Read Image descriptors from the shared arrays

But, accessing the shared index can be a bit expensive, so
try to read from the socket before scanning the index,
without blocking.
2013-10-28 15:47:13 +09:00
Jean-Philippe Andre 08648ab2a5 evas/cserve2: Add _shared_index_remap_check()
Check consistency of index header and remap if necessary.
2013-10-28 15:47:13 +09:00
Jean-Philippe Andre 88ef4131a0 evas/cserve2: Share paths of index tables with clients
- 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-28 15:47:13 +09:00
Jean-Philippe Andre 47be3a2b81 evas/cserve2: Prepare shared indexes in clients
- 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-28 15:47:13 +09:00
Jean-Philippe Andre c0bb73c775 evas/cserve2: Fix image load premultiplication
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-28 15:47:13 +09:00
Jean-Philippe Andre db66f69104 evas/cserve2: _cserve2_cache_fast_scaling_check()
Adapt function to new Data/Entry model.
2013-10-28 15:47:13 +09:00
Jean-Philippe Andre ee74562bf0 evas/cserve2: Simplify error logs 2013-10-28 15:47:13 +09:00
Jean-Philippe Andre 64e7d48296 evas/cserve2: Store Image_Data in shared array
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-28 15:47:13 +09:00
Jean-Philippe Andre 315c2fd161 evas/cserve2: binary search in Shared_Array 2013-10-28 15:47:13 +09:00
Jean-Philippe Andre d0e647fee3 evas/cserve2: Repack File_Data shared array 2013-10-28 15:47:13 +09:00
Jean-Philippe Andre acae35b4d1 evas/cserve2: Use Shared_Array storage for File_Data
File_Entry and File_Data are now two different types,
one being stored in the shared array, the other one
is only a reference counting entry.
2013-10-28 15:47:13 +09:00
Jean-Philippe Andre c57a319df3 evas/cserve2: Rename File_Data pointers to fd
The name fe is also used by Font_Entry, slightly confusing
2013-10-28 15:47:13 +09:00
Jean-Philippe Andre 12deed8073 evas/cserve2: Use unique id counter
Merge file id and image id into a single entry id.
2013-10-28 15:47:12 +09:00
Jean-Philippe Andre 07fb7172d5 evas/cserve2: Implement shared index and buffers
Only import the C file for now.
Implement the following features:

- Shared Arrays
Store arrays of elements of fixed size in shm.

- Shared Mempool
Store random sized buffers in shm.
These buffers are indexed in a Shared Array and are
referred to using their index only.

- Shared Strings
Store strings in a shm in a way similar to Eina_Stringshare
(except strings are referred to using an int index).

- Include evas_cserve2_index.c to the compilation.
- Declare shared index functions in header file.
- Call init() and shutdown() on the shared index subsystem.
- Add find and foreach functions
2013-10-28 15:47:12 +09:00
Jean-Philippe Andre deb8776de5 evas/cserve2: Add functions to resize shm files
- cserve2_shm_segment_request()
Creates a new shm segment (Shm_Handle) from an existing file,
without changing the current mmap.

- cserve2_shm_resize()
Grows the file and remaps in memory (new virtual address).

- cserve2_shm_id_get()
Returns the shm creation ID.
2013-10-28 15:47:12 +09:00
Jean-Philippe Andre 781c2e26e5 evas/cserve2: Prepare usage of shared strings
+ Add macros to fake usage of future cserve2 strings functions
+ Rename all File_Entry to fe
+ Other costmetic changes
2013-10-28 15:47:12 +09:00
Jean-Philippe Andre afde0c892b evas/cserve2: Add CRIT() macro
For easy debugging
2013-10-28 15:47:12 +09:00
Carsten Haitzler 9f690ba390 evas - cover corner case for native surface shared refs on obj delete 2013-10-28 10:26:32 +09:00
Chris Michael 28fed3fdb7 Fix formatting
Signed-off-by: Chris Michael <devilhorns@comcast.net>
2013-10-27 15:44:31 +00:00
Chris Michael 2be84a6073 Fix compiler warning(s) about eina_hash_int64 being passed pointer
from integer

Signed-off-by: Chris Michael <devilhorns@comcast.net>
2013-10-27 15:43:18 +00:00
Doug Newgard b10243a5ea PKGBUILD cleanup
Summary:
Some of the files in the "efl" package (emotion engine and others IIRC) were linked to libs in the efl_x11 package. This created a circular dep requiring both to be installed. Should just be one package in that case.
LGPL2 is actually LGPL2.1.
Added 'custom' to license array to cover COPYING.SMALL.
There is no 'dbus-core' package, it's part of 'dbus' now.
Doesn't build without 'check' installed.
provides_efl doesn't work, changed to just provides.
Got rid of tabs in depends and provides, replaced with spaces.
No need to add default 'strip', 'docs', and 'zipman' options, if someone want to override them, there's no reason to stop them.
buildflags doesn't work as a variable, added them to CFLAGS and CXXFLAGS manually. -O2 and -g are already included by default, if someone wants to change them on their system, there's no reason to override them.
Add install script to update mime database.
Change shebang on eina-bench-cmp so it runs with python2, python is 3 on Arch.
make dist doesn't tar Makefile, so we need to check that it exists before running "make clean distclean". Otherwise the build just fails.
Building of docs should be done in the build function.
Quoted all uses of $pkgdir and $srcdir
Each package function gets it's own $pkgdir, so rm-ing them at the beginning of the function isn't needed.
Use cp -a instead of cp -r to make sure permissions are preserved.
Set correct pkgdesc, arch, license, depends, provides, and install for the doc package.

Reviewers: raster

Reviewed By: raster

CC: cedric

Differential Revision: https://phab.enlightenment.org/D240
2013-10-26 23:56:25 +09:00
Carsten Haitzler c4a45c75b1 evas gl engine related - fix elm image example 01 (T182).
this fixes https://phab.enlightenment.org/T182 as it is an issue with a
surface alloc overwriting an already allocated surface entirely inside
the general software image infra.
2013-10-26 21:09:17 +09:00
discomfitor 0b8d4e4bce fix ecore evas pointer warping 2013-10-25 17:14:43 +01:00
Cedric Bail fe5dd4bcda eina: add test for old ABI supported function, but not exposed anymore. 2013-10-25 20:16:10 +09:00
Cedric Bail 7f8665a266 eina: improve test coverage of Eina_File API. 2013-10-25 19:57:57 +09:00
Cedric Bail cae6b0b0e4 eina: improve test coverage of virtual file. 2013-10-25 19:50:14 +09:00
Cedric Bail 39931d295b eina: use Eina_Barrier to improve coverage and reduce race condition during testing.
This should hopefully solve the failing test on Jenkins. As I can't reproduce them
here, it is just an educated guess... We will see !
2013-10-25 15:12:28 +09:00
Sung W. Park 7dc102c55f EvasGL: Fixed direct rendering not clipping issue
Evas GL direct rendering mode didn't properly take into account
the image object's clipping information and clip the region that
it was directly rendering to. Hence there were issues with the
direct rendering region drawing over the objects that are sitting
on top of it.

Also, cleaned up the direct rendering coordinate computation code
and a nasty dependency with image object that should have been
removed a long time ago.  Basically the evas-gl engine was directly
accessing the image object data structure for its data when it
really should have just passed along necessary information.
2013-10-24 17:42:21 +09:00