Andrii Kroitor [Fri, 1 Nov 2013 02:30:23 +0000 (11:30 +0900)]
edje: make mouse_events, repeat_events, ignore_flags and scale setters return Eina_Bool.
Make the following function return Eina_Bool so the caller can detect errors :
edje_edit_part_mouse_events_set
edje_edit_part_repeat_events_set
edje_edit_part_ignore_flags_set
edje_edit_part_scale_set
Reviewers: cedric, seoz
Reviewed By: cedric
CC: reutskiy.v.v
Differential Revision: https://phab.enlightenment.org/D303
Signed-off-by: Cedric Bail <cedric.bail@samsung.com>
m.biliavskyi [Fri, 1 Nov 2013 02:17:24 +0000 (11:17 +0900)]
edje: make functions "edje_edit_state_fill/aspect/align..." return Eina_Bool
Make the following function return Eina_Bool so the caller can detect errors :
List of updated functions:
edje_edit_state_align_x_set
edje_edit_state_align_y_set
edje_edit_state_aspect_min_set
edje_edit_state_aspect_max_set
edje_edit_state_aspect_pref_set
edje_edit_state_fill_origin_relative_x_set
edje_edit_state_fill_origin_relative_y_set
edje_edit_state_fill_origin_offset_x_set
edje_edit_state_fill_origin_offset_y_set
edje_edit_state_fill_size_relative_x_set
edje_edit_state_fill_size_relative_y_set
edje_edit_state_fill_size_offset_x_set
edje_edit_state_fill_size_offset_y_set
Reviewers: cedric, seoz
Reviewed By: cedric
CC: reutskiy.v.v
Differential Revision: https://phab.enlightenment.org/D300
Signed-off-by: Cedric Bail <cedric.bail@samsung.com>
Cedric Bail [Fri, 1 Nov 2013 02:15:35 +0000 (11:15 +0900)]
ChangeLog: let's try to be more informative in our commit.
Would be good that everyone specify on which part there change did apply.
Some are really not obvious.
Youngbok Shin [Fri, 1 Nov 2013 02:09:58 +0000 (11:09 +0900)]
Evas: Fixed textblock rendering to properly set render operation on context.
Render operation are not well tested. It appears that it was never properly setted
on a textblock, this would lead to see it rendered with the render operation of another
object.
Test Plan:
Add some rectangle object with textblock object.
The textblock style should be set to "backing=on backing_color=#
ffffffff".
Set render operation to some rectangle with "evas_object_render_op_set(rect, EVAS_RENDER_COPY)".
Check the textblock.
Reviewers: woohyun, cedric, raster
Reviewed By: cedric
CC: cedric
Differential Revision: https://phab.enlightenment.org/D277
Signed-off-by: Cedric Bail <cedric.bail@samsung.com>
Andrii Kroitor [Fri, 1 Nov 2013 02:03:30 +0000 (11:03 +0900)]
edje: make functions return Eina_Bool and fix documentation.
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: https://phab.enlightenment.org/D304
Signed-off-by: Cedric Bail <cedric.bail@samsung.com>
Vorobiov Vitalii [Fri, 1 Nov 2013 02:01:37 +0000 (11:01 +0900)]
edje: make functions in edje_edit API return Eina_Bool.
Make the following functions return Eina_Bool so the caller can detect errors:
edje_edit_state_visible_set
edje_edit_state_color_class_set
Removed unnecessary check in edje_edit_state_image_border_fill_set.
Reviewers: cedric, seoz
Reviewed By: cedric
CC: reutskiy.v.v
Differential Revision: https://phab.enlightenment.org/D305
Signed-off-by: Cedric Bail <cedric.bail@samsung.com>
Cedric Bail [Fri, 1 Nov 2013 01:58:33 +0000 (10:58 +0900)]
edje: make it possible for all upper layer function to query the exact same file.
With Eina_File we now can pass an efficient handler accross library boundary. Edje
and all underlayer already use it to avoid race condition when setting an Edje object.
Elementary and Enlightenment are still exposed to some potential race condition when
an Edje file is modified underneath there feet. With the following set of function it
should now be possible to avoid those race condition to:
edje_mmap_data_get
edje_mmap_collection_list
edje_mmap_collection_list_free
edje_mmap_group_exists
Daniel Juyung Seo [Thu, 31 Oct 2013 23:42:54 +0000 (08:42 +0900)]
po: updated po files.
Rafael Antognolli [Thu, 31 Oct 2013 22:15:36 +0000 (20:15 -0200)]
ecore/wayland: Do not store "edges" in Ecore_Wl_Window.
This is a configure event info, so put it in the right place. Some
places adding edges info were also removed, which means that they were
redundant.
Tested with <Meta> + middle click resize, and with window border resize,
on all the edges. Apparently, nothing breaks.
Rafael Antognolli [Thu, 31 Oct 2013 22:02:40 +0000 (20:02 -0200)]
ecore/wayland: Do not use win->id directly.
Use a getter for it instead, so we don't need to expose the
Ecore_Wl_Window struct just because of it.
Rafael Antognolli [Thu, 31 Oct 2013 21:09:30 +0000 (19:09 -0200)]
ecore/wayland: Make Ecore_Wl_Input private.
It's mostly only used inside ecore_wayland library anyway.
The only bit needed outside of the library is the "seat" pointer, but a
new function was added to retrieve such pointer from Ecore_Wl_Input.
Rafael Antognolli [Thu, 31 Oct 2013 20:02:04 +0000 (18:02 -0200)]
ecore/wayland: Hide Ecore_Wl_Display.
This struct is only used inside ecore_wayland itself, so there's no real
reason to expose it. Apparently, hiding it doesn't break anything,
except for the ecore_imf wayland module, which was easily fixed.
If anyone notices a breakage, please let me know.
Chris Michael [Thu, 31 Oct 2013 17:21:33 +0000 (17:21 +0000)]
Ok, This actually fixes maximized state properly now :) Basically, we
still need to account for frame height, but not frame width when we
are maximizing.
Signed-off-by: Chris Michael <cp.michael@samsung.com>
Chris Michael [Thu, 31 Oct 2013 16:58:21 +0000 (16:58 +0000)]
Fix ecore_evas_wayland maximized support to function properly
Previously, a "maximize" of an efl client would not actually resize to
the provided size as it would account for framespace width & height.
This fixes that so now "maximize" is Actually maximized.
Signed-off-by: Chris Michael <cp.michael@samsung.com>
Chris Michael [Thu, 31 Oct 2013 11:47:53 +0000 (11:47 +0000)]
Implement ability to call the ecore_evas state_change function if
needed.
NB: Currently, this will only work for fullscreen or maximized states
as other ones like sticky, withdrawn, iconic, etc, etc are not
supported via wayland protocol yet.
Signed-off-by: Chris Michael <cp.michael@samsung.com>
Chris Michael [Thu, 31 Oct 2013 09:38:34 +0000 (09:38 +0000)]
whitespace--
Signed-off-by: Chris Michael <cp.michael@samsung.com>
Chris Michael [Thu, 31 Oct 2013 09:19:38 +0000 (09:19 +0000)]
Call _ecore_evas_mouse_move_process function on mouse_in and mouse_out
events.
Signed-off-by: Chris Michael <cp.michael@samsung.com>
Jérémy Zurcher [Thu, 31 Oct 2013 08:25:06 +0000 (09:25 +0100)]
configure.ac: fix --with-api err msg
ChunEon Park [Thu, 31 Oct 2013 08:01:41 +0000 (17:01 +0900)]
evas/proxy - decide the proxy updation in the main render process.
because the proxy updation is decided in the proxy rendering time,
it couldn't be updated at the time if the source is changed before.
Cedric Bail [Thu, 31 Oct 2013 07:05:38 +0000 (16:05 +0900)]
evil: let's try if we only use that macro.
Cedric Bail [Thu, 31 Oct 2013 06:39:12 +0000 (15:39 +0900)]
evil: let's try another combinaison of define.
Cedric Bail [Thu, 31 Oct 2013 05:39:21 +0000 (14:39 +0900)]
evil: add missing define specific to Windows build.
It is an optional flags that just shutdown useless warning at build time.
Vincent Torri [Tue, 29 Oct 2013 15:15:21 +0000 (16:15 +0100)]
evil: remove libgen and the GNU *printf code (both in mingw-w64).
This should reduce the code size of evil and reduce maintainance as
mingw does now take care of it.
Signed-off-by: Cedric Bail <cedric.bail@samsung.com>
Vorobiov Vitalii [Thu, 31 Oct 2013 02:05:42 +0000 (11:05 +0900)]
edje: make functions return Eina_Bool and fix documentation.
Make the following functions return Eina_Bool so the caller can detect errors:
edje_edit_state_font_set
edje_edit_part_effect_set
Also deleted duplicate of the "edje_edit_state_font_set" function in Edje_Edit.h
Moved some defines (EDJE_TEXT_EFFECT_MASK_BASIC, EDJE_TEXT_EFFECT_MASK_SHADOW_DIRECTION etc),
so doxygen generation was fixed.
Also added link (see also) in "edje_edit_part_effect_set" to the Edje_Text_Effect enum.
Reviewers: cedric, seoz
CC: reutskiy.v.v
Differential Revision: https://phab.enlightenment.org/D302
Signed-off-by: Cedric Bail <cedric.bail@samsung.com>
Vorobiov Vitalii [Thu, 31 Oct 2013 02:04:11 +0000 (11:04 +0900)]
edje: make functions in Text API return Eina_Bool.
Make the following functions return Eina_Bool so the caller can detect errors:
edje_edit_state_text_set
edje_edit_state_text_size_set
edje_edit_state_text_align_x_set
edje_edit_state_text_align_y_set
edje_edit_state_text_elipsis_set
edje_edit_state_text_fit_x_set
edje_edit_state_text_fit_y_set
edje_edit_state_text_min_x_set
edje_edit_state_text_min_y_set
edje_edit_state_text_max_x_set
edje_edit_state_text_max_y_set
Reviewers: cedric, seoz
CC: reutskiy.v.v
Differential Revision: https://phab.enlightenment.org/D301
Signed-off-by: Cedric Bail <cedric.bail@samsung.com>
Cedric Bail [Tue, 29 Oct 2013 08:00:48 +0000 (17:00 +0900)]
evas: fix uninitialized use of font instance when no font is selected.
Jérémy Zurcher [Wed, 30 Oct 2013 21:41:13 +0000 (22:41 +0100)]
fix raster's typo
Daniel Juyung Seo [Wed, 30 Oct 2013 16:04:24 +0000 (01:04 +0900)]
Ecore_Common.h: fixed documentations.
Cedric Bail [Wed, 30 Oct 2013 13:35:32 +0000 (22:35 +0900)]
AUTHORS: we have some new contributor around !
Andrii Kroitor [Wed, 30 Oct 2013 13:19:57 +0000 (22:19 +0900)]
edje: fix typos/miss merge with a wrong return in edje_edit_image_del.
Because of unconditional return in function, a huge part of its body was
skipped making this function useless. Looked like a typo or missed merge.
Reviewers: cedric, seoz
CC: seoz
Differential Revision: https://phab.enlightenment.org/D281
Signed-off-by: Cedric Bail <cedric.bail@free.fr>
Vorobiov Vitalii [Wed, 30 Oct 2013 13:14:42 +0000 (22:14 +0900)]
edje: make function "edje_edit_state_min/max..." return Eina_Bool.
Make the following function return Eina_Bool so the caller can detect errors :
List of updated functions:
edje_edit_state_min_h_set
edje_edit_state_min_w_set
edje_edit_state_max_h_set
edje_edit_state_max_w_set
Reviewers: cedric, seoz
CC: reutskiy.v.v
Differential Revision: https://phab.enlightenment.org/D299
Signed-off-by: Cedric Bail <cedric.bail@free.fr>
Andrii Kroitor [Wed, 30 Oct 2013 13:11:22 +0000 (22:11 +0900)]
edje: make edje_edit_group_*_*_set return Eina_Bool.
Make the following function return Eina_Bool so that the caller can detect errors :
edje_edit_group_min_w_set
edje_edit_group_min_h_set
edje_edit_group_max_w_set
edje_edit_group_max_h_set
Reviewers: cedric, seoz
CC: reutskiy.v.v
Differential Revision: https://phab.enlightenment.org/D291
Signed-off-by: Cedric Bail <cedric.bail@free.fr>
m.biliavskyi [Wed, 30 Oct 2013 13:04:57 +0000 (22:04 +0900)]
edje: make function which change style tag param's (name, value) and delete tag return Eina_Bool.
This patch make the following function return Eina_Bool so the caller can detect errors.
edje_edit_style_tag_value_set
edje_edit_style_tag_name_set
edje_edit_style_tag_del
Reviewers: cedric, seoz
Reviewed By: cedric
CC: reutskiy.v.v, seoz
Differential Revision: https://phab.enlightenment.org/D294
Signed-off-by: Cedric Bail <cedric.bail@free.fr>
Vorobiov Vitalii [Wed, 30 Oct 2013 13:00:11 +0000 (22:00 +0900)]
edje: make setters for "edje_edit_state_image_..." return Eina_Bool.
This patch make the following function return Eina_Bool so the caller can
detect errors.
edje_edit_state_image_set
edje_edit_state_image_border_set
edje_edit_state_image_border_fill_set
Reviewers: cedric, seoz
CC: reutskiy.v.v
Differential Revision: https://phab.enlightenment.org/D295
Signed-off-by: Cedric Bail <cedric.bail@free.fr>
Andrii Kroitor [Wed, 30 Oct 2013 12:54:23 +0000 (21:54 +0900)]
edje: make edje edit rel setters return Eina_Bool.
Make the following function return an Eina_Bool so the caller can detect
errors if it want :
edje_edit_state_rel1_relative_x_set
edje_edit_state_rel1_relative_y_set
edje_edit_state_rel2_relative_x_set
edje_edit_state_rel2_relative_y_set
edje_edit_state_rel1_offset_x_set
edje_edit_state_rel1_offset_y_set
edje_edit_state_rel2_offset_x_set
edje_edit_state_rel2_offset_y_set
edje_edit_state_rel1_to_x_set
edje_edit_state_rel1_to_y_set
edje_edit_state_rel2_to_x_set
edje_edit_state_rel2_to_y_set
Reviewers: cedric, seoz
CC: reutskiy.v.v
Differential Revision: https://phab.enlightenment.org/D296
Signed-off-by: Cedric Bail <cedric.bail@free.fr>
Vorobiov Vitalii [Wed, 30 Oct 2013 12:49:32 +0000 (21:49 +0900)]
edje: make setters for "edje_edit_state_color..." return Eina_Bool.
This patch start returning Eina_Bool for the following color setters to be
able to detect errors when calling them.
edje_edit_state_color_set
edje_edit_state_color2_set
edje_edit_state_color3_set
Reviewers: cedric, seoz
Reviewed By: cedric
CC: reutskiy.v.v
Differential Revision: https://phab.enlightenment.org/D297
Signed-off-by: Cedric Bail <cedric.bail@free.fr>
Vorobiov Vitalii [Wed, 30 Oct 2013 12:45:00 +0000 (21:45 +0900)]
edje: Make setters for "edje_edit_state_min/max..." return Eina_Bool
This patch start returning Eina_Bool for state's min and max value setters, so
we can now catch error when calling those function.
edje_edit_state_min_h_set
edje_edit_state_min_w_set
edje_edit_state_max_h_set
edje_edit_state_max_w_set
Reviewers: cedric, seoz
Reviewed By: cedric
CC: reutskiy.v.v
Differential Revision: https://phab.enlightenment.org/D298
Signed-off-by: Cedric Bail <cedric.bail@free.fr>
Jean-Philippe Andre [Wed, 30 Oct 2013 06:16:21 +0000 (15:16 +0900)]
evas/cserve2: Prevent another infinite loop (flush)
And add some error messages
Jean-Philippe Andre [Wed, 30 Oct 2013 05:57:52 +0000 (14:57 +0900)]
evas/cserve2: Prevent potential infinite loop (shutdown)
In shutdown, I've encountered an infinite loop.
It SHOULD NOT possibly happen, but somehow some image
was marked as delete_me=1 but still present in the LRU.
Jean-Philippe Andre [Tue, 29 Oct 2013 10:45:13 +0000 (19:45 +0900)]
evas/cserve2: Fix crash in server when an image file changes
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.
Jean-Philippe Andre [Tue, 29 Oct 2013 10:06:33 +0000 (19:06 +0900)]
evas/cserve2: Fix image preload with gl-x11 engine
Cserves supports only the SW (xlib) and GL (gl-x11) engines.
Also, improve cs2 support for some lesser used functions in the
gl_x11 engine.
Carsten Haitzler (Rasterman) [Wed, 30 Oct 2013 10:27:26 +0000 (19:27 +0900)]
compliance/licensing - clarify, fix formatting and point to tldrlegal.com
Carsten Haitzler (Rasterman) [Wed, 30 Oct 2013 09:16:09 +0000 (18:16 +0900)]
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.
Carsten Haitzler (Rasterman) [Wed, 30 Oct 2013 09:08:10 +0000 (18:08 +0900)]
evas - animated images. fix leak in not freeing the list of frames itself
Sung W. Park [Wed, 30 Oct 2013 01:47:52 +0000 (10:47 +0900)]
EvasGL: cleaning up unnecessary code.
Cleaning up unnecessary code.
m.biliavskyi [Tue, 29 Oct 2013 23:40:11 +0000 (08:40 +0900)]
Return Eina_Bool value for method which deleting style from edje_edit object.
Summary: This patch start returning Eina_Bool for deleting style from edje edit object to catch those error.
Reviewers: cedric
CC: reutskiy.v.v, seoz
Differential Revision: https://phab.enlightenment.org/D290
Albin Tonnerre [Tue, 29 Oct 2013 22:25:54 +0000 (23:25 +0100)]
ecore_x/xlib/ecore_x_vsync.c uses dlopen and dlsym, but configure.ac
only checks for this for the XCB variant. This results in linker errors
when using strict linker flags (-Wl,-z,defs)
Rafael Antognolli [Tue, 29 Oct 2013 21:32:00 +0000 (19:32 -0200)]
ecore/wayland: Using underscore on private functions.
Rafael Antognolli [Tue, 29 Oct 2013 21:14:59 +0000 (19:14 -0200)]
ecore/wayland: Oops, initialize member of malloc'ed struct.
Rafael Antognolli [Tue, 29 Oct 2013 20:40:33 +0000 (18:40 -0200)]
ecore/wayland: Add some getters.
This centralizes the place where we have to wait for the init to have
finished before first using the compositor. It's also part of the later
step of hiding Ecore_Wl_* private structs.
Chris Michael [Tue, 29 Oct 2013 08:41:48 +0000 (08:41 +0000)]
On a focus_in event, if the ecore_evas already has focus, don't resend
a focus in. Similar change for focus_out also.
Signed-off-by: Chris Michael <cp.michael@samsung.com>
Chris Michael [Tue, 29 Oct 2013 08:04:05 +0000 (08:04 +0000)]
If mouse is already inside the ecore_evas, then we don't need to call
the mouse_in function of the ecore_evas.
Signed-off-by: Chris Michael <cp.michael@samsung.com>
Chris Michael [Tue, 29 Oct 2013 08:01:41 +0000 (08:01 +0000)]
Don't send mouse_up or mouse_down events unless we have a focused
surface
Signed-off-by: Chris Michael <cp.michael@samsung.com>
Jean-Philippe Andre [Tue, 29 Oct 2013 06:12:58 +0000 (15:12 +0900)]
evas/cserve2: Fix error path in evas_cache2_image_writable()
Return NULL and check for nullity in the only calling function.
Fixes CID 1039461 (Logically dead code)
Jean-Philippe Andre [Tue, 29 Oct 2013 06:03:14 +0000 (15:03 +0900)]
evas/cserve2: Fix CID 1039286 (Resource leak)
Close socket in case of connection failure.
Jean-Philippe Andre [Tue, 29 Oct 2013 04:54:15 +0000 (13:54 +0900)]
evas/cserve2: Fix new Coverity issues
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)
m.biliavskyi [Tue, 29 Oct 2013 01:23:42 +0000 (10:23 +0900)]
edje: return Eina_Bool values in setters for dragable confine and event params in Edje_Edit API.
Many Edje_Edit API can fail and don't return any error information. This patch start returning
Eina_Bool for setters on dragable confine and event params to catch those error.
Reviewers: cedric
Reviewed By: cedric
CC: seoz
Differential Revision: https://phab.enlightenment.org/D274
Signed-off-by: Cedric Bail <cedric.bail@samsung.com>
Rafael Antognolli [Mon, 28 Oct 2013 16:07:25 +0000 (14:07 -0200)]
ecore/wayland: Use sync callback to report end of ecore_wl_init().
At the end of the ecore_wl_init() function, send a sync request to the
server, and add a callback listener to the "done" event. When this event
is received, we are sure that all the registry bind requests done so
far were processed already, and that the registry and globals are
available and can be used.
Now, on the functions that request interfaces or registry, we call
_ecore_wl_init_wait(), which will check if the callback was received
already (that means that all requests inside the init were processed).
If it was not yet, then we wait until receiving that callback, before
returning the requested data.
Rafael Antognolli [Mon, 28 Oct 2013 16:12:27 +0000 (14:12 -0200)]
ecore/wayland: Add info about other bound interfaces.
Add output, seat, data_device_manager and subcompositor as possible
bound interfaces, on the ECORE_WL_EVENT_INTERFACES_BOUND event info.
Rafael Antognolli [Mon, 28 Oct 2013 16:46:40 +0000 (14:46 -0200)]
Revert "change init done bindings."
This reverts commit
b87afd1b943b260c92f8493647b7d9cae327656e.
Wrong branch, wrong commit.
Rafael Antognolli [Mon, 28 Oct 2013 16:07:25 +0000 (14:07 -0200)]
change init done bindings.
Cedric Bail [Mon, 28 Oct 2013 10:47:40 +0000 (19:47 +0900)]
eina: long forgotten function in Eina_File for Windows.
Cedric Bail [Mon, 28 Oct 2013 10:45:46 +0000 (19:45 +0900)]
evas: fix leak of ellipsis object in Evas_Object_Text.
Cedric Bail [Mon, 28 Oct 2013 09:44:26 +0000 (18:44 +0900)]
evas: fix possible memory leak in the ellipsis code.
Cedric Bail [Mon, 28 Oct 2013 09:28:38 +0000 (18:28 +0900)]
eet: help the kernel to actually load the eet file in memory more efficiently.
When you open a theme, it is very likely that most of the data in it will be needed
at some point, that's why it is a good idea to tell it in advance to the kernel so
it could load them if it has some spare ressource.
We can't just blindly turn EINA_FILE_WILLNEED on any file or a wrong eet file would
be loaded in memory when we don't need it. So we shall keep the sequential load until
we are sure that the file is correct and then explicitely tell the kernel that the
rest of the data should be loaded in ram.
Cedric Bail [Mon, 28 Oct 2013 09:26:10 +0000 (18:26 +0900)]
eina: fix API as we don't and never will touch memory for write in that function.
Cedric Bail [Mon, 28 Oct 2013 09:23:02 +0000 (18:23 +0900)]
eina: avoid possible race condition when unreffing an Eina_File.
Jean-Philippe Andre [Mon, 28 Oct 2013 06:50:57 +0000 (15:50 +0900)]
Evas/cserve2: Merge branch 'devs/jpeg/cserve2'
Improve stability, performance and overall support of
evas cserve2.
In particular:
- Implement shared indexes and memory pools to share cserve's
internal state with all clients. Apps can then scan these
indexes and avoid waiting for socket responses when loading
resources.
- Implement crash resiliency in evas. If cserve2 crashes, apps
can safely reconnect and continue working as if nothing
happened.
- Implement support for the GL engine (very basic support so
far, "just works").
- Improve performance by reusing the scalecache logic.
Jean-Philippe Andre [Fri, 11 Oct 2013 08:18:42 +0000 (17:18 +0900)]
evas/cserve2: Merge Glyph_Data and mempool index
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.
Jean-Philippe Andre [Fri, 11 Oct 2013 06:36:11 +0000 (15:36 +0900)]
evas/cserve2: Add debug and reduce number of GLYPHS_USED messages
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.
Jean-Philippe Andre [Fri, 11 Oct 2013 05:47:07 +0000 (14:47 +0900)]
evas/cserve2: Use Eina_Refcount instead of int
Use the refcount macros instead of manually handling
integers. Not sure if it really helps since the refcounting
in cs2 client is a bit special :)
Jean-Philippe Andre [Fri, 11 Oct 2013 05:31:18 +0000 (14:31 +0900)]
evas/cserve2: prevent unwanted remap of strings table
In the client, string_get() can cause a remapping of the
strings index & mempool. This means that all pointers to
string data are invalid past that call.
Solution: add a safe_get() function that prevents remap
during search. It might prove faster also, but will
return NULL more often.
Jean-Philippe Andre [Fri, 11 Oct 2013 03:07:43 +0000 (12:07 +0900)]
evas/cserve2: catch only SIGINT from cserve2
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)
Jean-Philippe Andre [Thu, 10 Oct 2013 08:15:21 +0000 (17:15 +0900)]
evas/cserve2: Reduce repacking and resizing of SHM
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.
Jean-Philippe Andre [Thu, 10 Oct 2013 00:26:42 +0000 (09:26 +0900)]
evas/cserve2: Fix font reloading after cserve2 restart.
Well it LOOKS like it's working properly.
Clients can safely keep running after cserve2 crashed and
restarted.
Jean-Philippe Andre [Tue, 8 Oct 2013 08:06:33 +0000 (17:06 +0900)]
evas/cserve2: Add PID to shm filenames
This will help identify new memory pools in case cserve2
restarts and reloads the same glyphs for instance.
Jean-Philippe Andre [Mon, 7 Oct 2013 06:59:13 +0000 (15:59 +0900)]
evas/cserve2: Fix refcount for glyphs & glyph buffers
Maybe a little overkill on the iterations (ref/unref),
but at least we can really track down which glyphs are
currently being used.
Jean-Philippe Andre [Wed, 2 Oct 2013 11:23:14 +0000 (20:23 +0900)]
evas/cserve2: Reconnect to cserve2 in case of server crash
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.
Jean-Philippe Andre [Wed, 2 Oct 2013 06:07:25 +0000 (15:07 +0900)]
evas/cserve2: Implement support for GL engine
Simply call the appropriate cache2 functions when possible
and check for usage of cache2 whenever an evas_cache_ function
is called.
This effectively adds cserve2 image (data) load support for the
GL engines. Fonts were already working out-of-the-box.
Jean-Philippe Andre [Wed, 2 Oct 2013 06:05:44 +0000 (15:05 +0900)]
evas/cserve2: Fix CList usage
In some error cases, the list could become a cycle.
Foreach would then loop forever!
Jean-Philippe Andre [Tue, 1 Oct 2013 02:59:40 +0000 (11:59 +0900)]
evas/cserve2: Fix reload of image without load_opts
Problem: Images opened without load_opts are reopened
multiple times.
Solution: Use empty load opts when looking for the key.
Jean-Philippe Andre [Mon, 30 Sep 2013 09:46:49 +0000 (18:46 +0900)]
evas/cserve2: Fix scaling error (server side)
This causes crashes in the client also...
Jean-Philippe Andre [Fri, 27 Sep 2013 05:46:48 +0000 (14:46 +0900)]
evas/cserve2: Fix animated Gifs support with cs2
cserve2 does not support animated Gifs, as the animated icon
logic doesn't match cserve2 logic.
Also, there is probably no need to cache these into shared
buffers anyways :)
Solution: fallback to normal cache (and delete current entry in
the client)
Jean-Philippe Andre [Wed, 25 Sep 2013 09:57:04 +0000 (18:57 +0900)]
evas/cserve2: Fix invalid file referencing in client
Fixes elementary_test "Bg Image":
- Various load_opts (jpeg geometry) where not handled properly
by the client.
Jean-Philippe Andre [Tue, 24 Sep 2013 09:46:17 +0000 (18:46 +0900)]
evas/cserve2: Fix scaling options
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.
Jean-Philippe Andre [Tue, 24 Sep 2013 09:18:53 +0000 (18:18 +0900)]
evas/cserve2: Add alpha flag to Image_data
Jean-Philippe Andre [Mon, 23 Sep 2013 08:51:06 +0000 (17:51 +0900)]
evas/cserve2: Use scalecache with cserve2
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)
Jean-Philippe Andre [Mon, 9 Sep 2013 04:57:45 +0000 (13:57 +0900)]
evas/cserve2: Add cache hit count on image data
Jean-Philippe Andre [Fri, 6 Sep 2013 02:53:28 +0000 (11:53 +0900)]
evas/cserve2: Fix images indexing (File_Entry stuff)
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.
Jean-Philippe Andre [Thu, 5 Sep 2013 08:44:10 +0000 (17:44 +0900)]
evas/cserve2: Drop pre-emptive load of large images
When the image is too large, let's not preload it unless
specifically requested by the application.
Value 320x320 is completely arbitrary.
Jean-Philippe Andre [Wed, 4 Sep 2013 07:14:37 +0000 (16:14 +0900)]
evas/cserve2: Fallback to normal cache for animated gifs
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 :)
Jean-Philippe Andre [Tue, 3 Sep 2013 06:53:08 +0000 (15:53 +0900)]
evas: Fix potential crash after image preload
E17 crashed when running under cserve2.
Not sure about this commit. Also what about the other functions.
Jean-Philippe Andre [Tue, 3 Sep 2013 06:24:27 +0000 (15:24 +0900)]
evas/cserve2: Reuse file entries when possible
For some reason, a new File_Entry was created whenever
a new image is loaded, even if that file was already
opened by the client.
Jean-Philippe Andre [Tue, 3 Sep 2013 02:27:27 +0000 (11:27 +0900)]
evas/cserve2: Reduce debug logs (s/INF/DBG)
Jean-Philippe Andre [Mon, 2 Sep 2013 09:53:18 +0000 (18:53 +0900)]
evas/cserve2: Fallback to normal cache for mmap
cserve2 can't handle virtual files (mmap-only), by design.
Proper support can be added later on, but for now we might want
to just fallback to the normal cache functions.
Fixes photocam test
Jean-Philippe Andre [Mon, 2 Sep 2013 07:17:05 +0000 (16:17 +0900)]
evas/cserve2: Fix font hinting
cserve2 was not handling font hints properly in the server side
Add some consistency checks and separate glyphs per hinting value
Jean-Philippe Andre [Mon, 2 Sep 2013 01:10:02 +0000 (10:10 +0900)]
evas/cserve2: Reset pointers to NULL after close
Jean-Philippe Andre [Thu, 29 Aug 2013 07:46:25 +0000 (16:46 +0900)]
evas/cserve2: Add TIMEOUT macro for cs2 client
This will help debugging as we can disable the timeout on demand.
Jean-Philippe Andre [Tue, 27 Aug 2013 07:03:28 +0000 (16:03 +0900)]
evas/cserve2: Fix segfault in cserve2 slave
Slaves always crash when loading SVG images.
The svg module was simply not a dynamic module.
Jean-Philippe Andre [Tue, 27 Aug 2013 06:35:22 +0000 (15:35 +0900)]
evas/cserve2: Small performance fixes