|Age||Commit message (Collapse)||Author|
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
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:
- Invalid glyph data
- Infinite loop in _glyph_map_remap_check()
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.
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)
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.
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 :)
cserve2 was not handling font hints properly in the server side
Add some consistency checks and separate glyphs per hinting value
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).
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
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.
- 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
Also, change the internal structure of glyph listing:
- Use lists instead of inlists
Switch to use Glyph_Data instead of Glyph_Entry
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,
- 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
- 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()
When opening an image, OPEN and SETOPTS were always sent
consecutively. Merging these two messages may improve the
performance a bit (not measured), but also simplify the
Note: cserve2 debug tools have not been fixed yet.
Image_Data contained a similar struct to the standard Evas struct,
let's not duplicate it uselessly.
Most of the time, the SETOPT message is sent only
to carry 0 data. Let's add a flag to the OPEN message to
avoid useless socket calls.
Server-side: implement with message faking.
Also, fix image ID logic on client side:
- alloc data entry asap,
- assign image_id during call to OPEN
Signed-off-by: Cedric Bail <firstname.lastname@example.org>
Signed-off-by: Paulo Alcantara <email@example.com>
Patch by: Paulo Alcantara <firstname.lastname@example.org>
SVN revision: 79754
I've tested make -j 3 install and it works nicely
I've tested expedite with software and opengl xlib,
and it works. Not tested other engines, so please
report any problems (engines or other) on the ML.
TODO: examples and tests, I'll add them later
ISSUE: Eina_Unicode size check. It indirectly depends on
eina_config.h, which is created at the end of the
configure script. So its size is always 0. I don't
know how that size is used, so I can't do a lot,
SVN revision: 78895