Commit Graph

49787 Commits

Author SHA1 Message Date
Gustavo Sverzut Barbieri 24cb017626 fixup: http 2016-08-22 19:24:13 -03:00
Gustavo Sverzut Barbieri 5c778e2b15 fixup: http 2016-08-22 18:51:38 -03:00
Gustavo Sverzut Barbieri 535f111bfa fixup: efl-net 2016-08-22 18:51:19 -03:00
Gustavo Sverzut Barbieri b791c79ca0 WIP: efl.net: Introduce Efl.Net.Dialer.Http
This class implements the Efl.Net.Dialer interface using libcurl to
perform HTTP requests. That means it's an Efl.Net.Dialer,
Efl.Net.Socket, Efl.Io.Reader, Efl.Io.Writer and Efl.Io.Closer, thus
being usable with Efl.Io.Copier as demonstrated in the
efl_io_copier_example.c
2016-08-22 18:25:15 -03:00
Gustavo Sverzut Barbieri e7df1a7483 efl.net: socket, server and dialer for TCP.
Efl.Net.Server defines how to accept new connections, doing the
bind(), listen() and accept() for protocols such as TCP.

Efl.Net.Dialer defines to to reach a server.

Both are based on Efl.Net.Socket as communication interface that is
based on Efl.Io.Reader, Efl.Io.Writer and Efl.Io.Closer, thus being
usable with code such as Efl.Io.Copier.

The Server will emit an event "client,add" with the established
Socket, which is a child and can be closed by both the server or the
user.

The Dialer extends the Socket and allows for creating one given an
address, that will be resolved and connected.

TCP is the initial implementation so we an validate the
interfaces. UDP, Unix-Local and SSL will come later as derivate
classes.

The examples are documented and should cover the basic principles:

 - efl_io_copier_example can accept "tcp://IP:PORT" and will work as a
   "netcat", can send data from socket, file or stdin to a socket,
   file, stdout or stderr.

 - efl_net_server_example listens for connections and can either reply
   "Hello World!" and take some data or work as an echo-server,
   looping back all received data to the user.

More complex interactions that require a "chat" between client and
server will be covered with new classes later, such as a queue that
empties itself once data is read.
2016-08-22 18:25:14 -03:00
Gustavo Sverzut Barbieri 5d4688679e efl.io: introduce basic interfaces and classes.
These interfaces allows generic operations on objects that can store
or provide data, such as a file or a buffer.

With well defined interfaces and events we can create code such as
Efl.Io.Copier, that will link a source with a destination and
progressively copy data as they appear.
2016-08-22 18:25:14 -03:00
Gustavo Sverzut Barbieri 0d96ba9734 binbuf, strbuf and ustrbuf: add slice_get() and rw_slice_get(). 2016-08-22 18:25:14 -03:00
Gustavo Sverzut Barbieri 77faebde67 eina_stringshare: add slice_get() 2016-08-22 18:25:14 -03:00
Gustavo Sverzut Barbieri 9062bbd8e0 eina: introduce Eina_Slice and Eina_Rw_Slice.
A plain simple pointer + length describing a linear memory region.
2016-08-22 18:25:14 -03:00
Gustavo Sverzut Barbieri 8906461b48 eina_types.eot: expose Eina.Binbuf 2016-08-22 18:25:14 -03:00
Gustavo Sverzut Barbieri 76149efc8b eina_types.eot: expose Eina.Error 2016-08-22 18:25:14 -03:00
Gustavo Sverzut Barbieri 602a98c8b9 eina_error: provide a fallback when strerror_r() is not available. 2016-08-22 18:25:14 -03:00
Prateek Thakur 9348a84aa0 ecore_con: add '\0' termination to path.
Summary:
Copying from string 'buf' of length 4095 to '&socket_unix.sun_path[0]'
may form a non-terminated C string of size 108. So added null termination.

Signed-off-by: Prateek Thakur <prateek.th@samsung.com>

Reviewers: cedric, thiepha

Subscribers: jpeg

Differential Revision: https://phab.enlightenment.org/D4247

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2016-08-22 11:04:13 -07:00
Artem Popov d8cab9347a ecore_evas_ews: add proper clean up when quit the func
@fix

Summary: add proper clean up when quit the func (as per Raster comment)

Reviewers: cedric, raster, jpeg, barbieri

Reviewed By: barbieri

Subscribers: raster, NikaWhite, myoungwoon, jpeg

Differential Revision: https://phab.enlightenment.org/D4175

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
2016-08-22 11:04:13 -07:00
Jean Guyomarc'h 26a26f2304 eina: fix use of strerror_r()
So, first, the wrong strerror_r() was detected on
Mac OS X. Instead of using a complex set of macros
to try to detect which strerror_r() to use, when
it is defined, let the autotools handle that clerverness
for us.
2016-08-22 20:02:02 +02:00
Jean Guyomarc'h 4285fc1dda edje: fix warning raised by clang
Clang was not happy with the initialization of
the structure.
2016-08-22 19:57:06 +02:00
Jean Guyomarc'h 84679d3173 evas-gl_cocoa: fix crashes at engine startup
Recently, the gl_cocoa engine started to crash at
startup. glGetIntegerv() in gl_common was called
without any gl context, and therefore segfaulted.

We now make sure it is called after a gl context
has been created and used.

Thanks jpeg for troubleshooting.

Fixes T4402
2016-08-22 19:56:08 +02:00
Derek Foreman a71b688b10 evas_engines: Update remaining enges for damage_region_set callback
I missed several engines when I changed this.

Make sure they all build.
2016-08-22 08:39:44 -05:00
Marcel Hollerbach ce89c06cb0 edje_cc: add snapshot to the lazedc symbols
there where comments and documentation about it, but no code.

This is some kind on follow up on a7fd98f8f6.

@fix
2016-08-22 09:24:18 +02:00
Carsten Haitzler 39e3a06fd5 edje - cut another 120k or so off memory usage by using direct hash add
so every collection we add to the eina has of collections... we just
did eina_hash_add - this isn't quite good. because we use eina_file
and mmap the edje file. we COULd use the strings straigh fromt he edje
filer dictionary and not actually allocate private heap memory - thus
sharing all those strings. this was silly, and this saves about
another 120k of memory with the default theme as it has about 1500 or
so collections in it... and these strings add up fast.

@optimize
2016-08-21 11:37:22 +09:00
Carsten Haitzler 419f84907b edje - fix missing vector field frees, copies, handling etc.
it seems vector type parts were not handled all that well. we had at
least one mem leak with the vector mempool never being freed... so i
filled in various missing points where vector parts were not being
handled right.

@fix
2016-08-21 11:30:45 +09:00
Carsten Haitzler 6139c7a3c6 edje - reduce anothr 400k or so of memory usage (esp hello world)
so edje was allocating 32 pointers per collection. this is per
collection inside an edje file even if we just use one collection from
that edje file. it consumes 32 pointers. on 64bit thats 256 bytes...
just for pointers to mempools so we can "optimize" freeing and
allocation of parts. this was simply rediculous. i moved it to a
sub-struct allocated on demand (so now only for collections we
actually use) and this nuked 400k of "base memory usage youcant get
rid of).

note that our current default theme has something like 1100 or so
images, 1500 or so collections in it. as theme gorws, memory footprint
goes up if we dont allocation only on demand (when needed/used) and we
aren't careful about the size of our data structs and their content.

@optimize
2016-08-21 11:14:28 +09:00
Davide Andreoli 3b02375290 FDO icon theme: correct Inherits value
This should have been done this way from the start...my bad
@fix
2016-08-20 15:13:45 +02:00
Jean Guyomarc'h 52295607e5 evas-engines: fix compiling of the fb engine
Build was broken after commit 0c21a926a3
which changed an internal API.
2016-08-20 14:06:27 +02:00
Derek Foreman 0774088c90 wayland_egl: Fix EGL_KHR_Partial_Update usage
Use the new damage region set callback to do partial updates that actually
work.  Fixes gl rendering on mali.

@fix
2016-08-19 16:26:32 -05:00
Derek Foreman 0c21a926a3 engines: Add a damage_region_set callback
To properly implement EGL_KHR_partial_update we need to know the buffer
damage before any drawing operations take place.  Add a new callback to
software_generic that takes place after combining of surface damage and
swap mode when we actually have this available.

Note: This means the three copy pasta implementations of
EGL_KHR_partial_update scattered around the tree are all wrong.  bummer.
2016-08-19 16:26:20 -05:00
Derek Foreman 20f9acdf19 wayland_shm: Fix dmabuf orientation
So apparently when dmabuf support went into weston it went in with a
Y axis inversion that has since been corrected.

This updates our code to match.
2016-08-19 14:51:55 -05:00
Cedric BAIL 552db73ac4 eina_cxx: change strings to match new returned system string. 2016-08-19 10:17:15 -07:00
Daniel Kolesa 4d701bca2e docs: generate reference pages for codelink 2016-08-19 14:39:37 +01:00
Daniel Kolesa feafdb85a4 docs: generate keyword-link.txt for codelink 2016-08-19 14:19:09 +01:00
Daniel Kolesa 1e42cae8a2 docs: fix invalid links in class reference table 2016-08-19 13:59:55 +01:00
Jean-Philippe Andre 8dcd5207cc elm: Install elm test images in the right place
This moves g_layer images to their folder.
Some kind of dark magic managed to install the base images
in the proper folder already.

This fixes elementary_test -to "Gesture Layer 2"

@fix
2016-08-19 15:19:08 +09:00
jiin.moon c54bd44790 emile: fix jpeg loader broken with orientation
Summary:
After applying a patch regarding region, side-effect detected.

Fixes T4390

Test Plan: make check

Reviewers: jpeg, cedric, jypark

Maniphest Tasks: T4390

Differential Revision: https://phab.enlightenment.org/D4245
2016-08-19 15:19:08 +09:00
Carsten Haitzler 4a2f14638f efreetd - only open log file is env var is set to do so
set EFREETD_LOG to something to get efreetd to log. otherwise efretd
log files can end up rather larth and since they go in xdg_runtimedir
- thats mostly a ramdisk... they eat actual ram. so save a lot of
memory and only log if asked to.

@fix
2016-08-19 11:48:29 +09:00
Carsten Haitzler a739d4d7da evas software downscaler - get about 1.8x to 3x speedups for cases
this speeds up downscaling of images by somewhere between 1.8 to 3x
dpeending on case and cpu etc. - this is ONLY for downscaling of an
image buffer betweeb 50% width and/or height up to 100% of width and
height. it's a special case optimization that cuts down the complexity
of the full super sampling filter to just do a bilinear interpolation
which is actually strictly correct for this size range and shouldn't
drop quality. it uses fixed point (16.16) to do the sup pixel sampling.

no mmx/asse or neon, but we could actually easily use it as we do use
mmx/ee and neon in the bilinear upscaler to do interpolation so this
would work here too. it just requires time and effort to make yet 2x
more special cases and use the ASM to do the hard slog here.

@optimize
2016-08-19 11:08:55 +09:00
Gustavo Sverzut Barbieri e56811ed4d eina_error: allow errno.h codes.
we have some duplication of errors between Eina_Error and errno.h,
however we should use Eina_Error to extend the traditional errno.h
system.

then change eina_error_msg_register() and
eina_error_msg_static_register() to return a magic bit to state the
number was registered, and on other functions test this bit in order
to operate on registered values, otherwise fallback to errno.h, such
as strerror().

It also deprecates 2 clear duplicated errors:

- EINA_ERROR_OUT_OF_MEMORY -> ENOMEM

- EINA_ERROR_TIMEOUT -> ETIMEDOUT

There are two details when using strerror():

 - old behavior did not return strings for non-error, such as
   "Success" or "Unknown error ${N}"

 - thread-safety issues: since we must be thread safe, then use
   strerror_r() and eina_stringshare_add() that value, keeping a hash
   of cached values
2016-08-18 13:36:05 -03:00
Daniel Kolesa 8a74f38071 docs: add include flag verification 2016-08-18 15:12:24 +01:00
Daniel Kolesa 8ff134472e docs: add writer support for include plugin 2016-08-18 14:50:24 +01:00
Youngbok Shin 36d086ec42 Evas text: fix RTL text ellipsis issues
Summary:
Visual position of ellipsis item should be set according to
its bidi direction. But, by setting visual position in same way
as logical position, the end ellipsis could be put opposite side.
Also, start ellipsis must placed on left side of RTL text.
@fix T3187

Test Plan: Test an sample on T3187

Reviewers: tasn, woohyun, herdsman

Subscribers: raster, Blackmole, z-wony, cedric, jpeg, minudf

Maniphest Tasks: T3187

Differential Revision: https://phab.enlightenment.org/D3769
2016-08-18 14:39:41 +03:00
Youngbok Shin b915d29cd1 Elementary: Load image for image item with proper orientation
Summary:
Image files can have orientation information. Elm Entry have to
call evas_object_image_load_orientation_set() for showing image
with proper orientation.

Test Plan: N/A

Reviewers: herdsman, raster, jpeg

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D4244
2016-08-18 14:09:16 +03:00
Youngbok Shin 167d41e7b2 Evas Text: parse font string everytime for updating lang properly
Summary:
We can't assume the given font is same with current fdesc by comparing string.
Since Evas starts to supporting "auto" for language,
the given font string should be parsed once before comparing it.
@fix

Test Plan: N/A

Reviewers: tasn, raster, cedric, herdsman

Subscribers: jpeg, minudf, z-wony, Blackmole, woohyun

Differential Revision: https://phab.enlightenment.org/D4227
2016-08-18 13:33:08 +03:00
Carsten Haitzler 4be972c41c ejde - fix recalc single min n edje for h eval
this fixes a seemingly small typo that would only turn up with fixed
point, but not floats as we have by default whwere we had
  x = 999;
instead of
  x = FROM_INT(999);

shouldn't be visibule unless you disable float support and use fixed
point in edje.
2016-08-18 14:21:08 +09:00
Carsten Haitzler 6f9f361f3e edje - solve crash issues brought on by optimization of edje mem usage
this solves a crash brought on by 1d6a58cfc9
that optimized mem usage but seems to have created issues in empc.

fixes T4382
2016-08-18 14:21:08 +09:00
Gustavo Sverzut Barbieri c88b027dc1 efl_loop_user: error if parent is not a loop provider.
it was silently ignoring the parent, which led me to hours trying to
investigate why my code wasn't working just to realize my parent
wasn't being assigned and refcounts were screwed.
2016-08-18 02:13:32 -03:00
Gustavo Sverzut Barbieri e3e0a6bd65 eolian: gracefully handle incorrect case of inherit.
If you use "EFl" instead of "Efl", it will find the proper file, but
won't find the type... crashing.

Handle that case and hint the user about it.
2016-08-18 02:13:19 -03:00
Jihoon Kim 0e35f8454e edje_entry: Make a result of retrieve_surrounding_cb secure
Summary:
Regardless of the password mode of Entry,
_edje_entry_imf_retrieve_surrounding_cb alwalys passes plain_text
to any callers who register that callback.

This commit replace plain text with '*'
because current behavior could be a security hole in some case.

Reviewers: woohyun, id213sin, jihoon

Reviewed By: jihoon

Subscribers: cedric, jsuya, z-wony, jpeg

Differential Revision: https://phab.enlightenment.org/D4238
2016-08-18 10:40:24 +09:00
Lauro Moura 16986ffc7a eolian_cxx: Fix behavior with explicit void return
Only perform the single value/return type substitution on properties if the
void return type is implicit (i.e. NULL return from function_return_type_get),
following the eolian-C implementation as we use the generated headers.

Also update example after Eo-Efl changes.
2016-08-17 20:54:27 -03:00
Derek Foreman 7828d0e072 wayland_egl: Fix rendering on systems without buffer age
If buffer age isn't present we really want to return MODE_FULL, but we were
previously returning MODE_AUTO.

On recent mali drivers this resulted in accidental partial updates leading
to incorrect rendering.
2016-08-17 16:24:05 -05:00
Derek Foreman 6ce113791e wayland_egl: Remove swap_mode from engine info
This was never set anywhere and always defaulted to 0, or AUTO
2016-08-17 16:21:29 -05:00
Stefan Schmidt 53b6ac1d3a examples: evas: ensure filter example lua files land in tarball
These are needed for a make doc run and have been missing the tarball before.

@fix
2016-08-17 16:43:32 +02:00