Commit Graph

49719 Commits

Author SHA1 Message Date
Jean-Philippe Andre c507f56110 ecore_x: Early check image bpp based on depth
This fixes argb windows transparency in E software compositor.

My current problem is that I have no idea what changed, why this
is needed now, and how things could actually work before.

Fixes T4389

@fix
2016-08-24 14:42:16 +09:00
Carsten Haitzler 510c093602 efreet - convert crash into NULL mimes when no mime db found
so ok - efreet crashed letting you know you have a missing mimedb...
return NULL instead fixes T4425 :) - rememebr to kill your efreetd's
to get a new mimedb - log out and in will do that.
2016-08-24 10:00:50 +09:00
Gustavo Sverzut Barbieri 27d428a6e1 efl_io_queue_example: use eina_slice_endswith().
make the code more readable and clear. Also document when the line may
miss a trailing line delimiter in the slice.
2016-08-23 21:30:18 -03:00
Gustavo Sverzut Barbieri 45c0002929 eina_slice: startswith and endswith.
these helpers around memcmp() make the code more readable.
2016-08-23 21:25:02 -03:00
Gustavo Sverzut Barbieri 86e87b2fd9 efl_io_queue: basic class to interact with Efl.Io interfaces.
The use of low-level interfaces such as Efl.Io.Reader and
Efl.Io.Writer are not that user-friendly as they can handle partial
data.

Classes such as Efl.Io.Copier makes them easy to use, but they need a
reader (source) or writer (destination) and in our examples we used
fixed buffers or some existing streams (stdin/stdout/stderr,
networking...).

However, if interactively we need to produce some data to be sent,
such as implementing some networking protocols, we'd have to write our
own Efl.Io.Reader and Efl.Io.Writer classes to handle the buffering.

Not anymore! With Efl.Io.Queue you can write stuff to it and it will
buffer to memory. Once stuff is read, it will automatically remove
those bytes from buffer.
2016-08-23 20:17:13 -03:00
Gustavo Sverzut Barbieri a1526169e7 efl_io_copier_example: set loop as parent for Efl.Net.Dialer.Tcp
although it was working, the correct way is to set a loop provider as
Efl.Net.Dialer.Tcp object.
2016-08-23 20:17:13 -03:00
Gustavo Sverzut Barbieri 220ef2eb21 efl_io_buffer: do not refer to sub-classes in its docs.
depending on the order of generation eolian was triggering some
errors. So stop refering to subclasses here.
2016-08-23 20:17:13 -03:00
Gustavo Sverzut Barbieri ba63432fdf efl.io.buffer: minor bugfix.
if no limit was set, do not resize buffer to 0.
2016-08-23 20:17:13 -03:00
Gustavo Sverzut Barbieri 9944c164bd eina_slice: fix multi-byte find function, add tests. 2016-08-23 20:17:13 -03:00
Derek Foreman ae83b96030 wayland_egl: Destroy gl context if engine info updated with NULL wl_surface
We set the wayland surface to NULL in engine info, then destroy the wayland
surface later.  The GL stack tries to render to the destroyed surface and
dies.

If we destroy the GL surface when we set the engine info (before we destroy
the wayland surface)it stops the GL stack from doing bad wayland calls.

This fixes a crash on exit, or when any window closes when using mali GL
drivers.  Surprisingly, Mesa was tolerant of this.
2016-08-23 15:27:06 -05:00
Jean Guyomarc'h 5d527fffc8 eina: remove references to win32 and winCE in threads 2016-08-23 21:15:25 +02:00
Jean Guyomarc'h d2e9704ea8 autotools: remove win32 threads artifacts
Commit 2cb0c1cadc removed
the use _efl_have_win32_threads, but some traces of it
were left.
2016-08-23 21:15:25 +02:00
Jean Guyomarc'h 180b24f2a0 eina: fixtures on OSX semaphores
So actually there is quite a big issue with semaphores
on OSX. We use (named) POSIX semaphores, but this was
a (my) mistake... I'll fix it later...
The real issue is that named semaphore are persistants:
when the program dies, it stays alive. This is pretty
bad with eina_debug_monitor because we create a semaphore
we never release, due to a wild thread...

This leak of semaphores went unnoticed before commit
4a40ff95de because the
name of the semaphore was unique per process, and
overriden when another process was launched. This
was very bad, but saved us from overflowing the
semaphore pool. It is now overflowed pretty fast when
building a lot EFL, because of Eolian that runs A LOT!

So that's one problem that still needs to be fixed,
by using OSX' own semaphores (see T4423).
Another big issue, which is now fixed is that the
buffer in which we generated the semaphore ID was
too small, and therefore we were reduced to one shared
semaphore for a whole process... This buffer has been
now set to 31 characters, which seems to be the maximum
length of a semaphore ID.

So now things are better, but still with a deadly issue.
2016-08-23 21:15:25 +02:00
Jean Guyomarc'h 469cf26873 evas: handle thread queue creation failure
eina_thread_queue_create() might fail.
Actually it does fail on Mac OS X under
some circumstances.
2016-08-23 21:15:24 +02:00
Jean Guyomarc'h b3c8470024 eina: fix eina_btlog for older osx versions
Older Mac OS X deprecated the default atos.
This patch adds support for Mavericks (and
maybe Yosemite as well).
2016-08-23 21:15:24 +02:00
Jean Guyomarc'h 99d37838f3 ecore_con: use F_CLOEXEC instead of SOCK_CLOEXEC
Mac OS X does not provide SOCK_CLOEXEC. Instead, we can use
fcntl() with F_CLOEXEC.
Fixes Mac OS X build.
2016-08-23 21:15:16 +02:00
Jean Guyomarc'h 0ced470e39 ecore_con: fix compiling on OSX and BSD
TCP_CORK is Linux only. TCP_NOPUSH is supposed to
do the same thing than TCP_CORK, but on BSD (including
Mac OS X).

We now check for the existance of TCP_CORK or TCP_NOPUSH,
and use the right option. If none exist, cork_{set,get}
will just fail.
2016-08-23 20:28:44 +02:00
Jean Guyomarc'h 6de774455b autotools: add macro to easily check for defines in headers 2016-08-23 20:28:44 +02:00
Davide Andreoli a0e8a9aeaa FDO icons: correctly list the intl icons in theme description file
@fix
2016-08-23 19:04:25 +02:00
Gustavo Sverzut Barbieri db46d4c1a3 examples: add efl_io_copier_simple_example.c
a simpler example to be listed in wiki.
2016-08-23 12:05:37 -03:00
Tom Hacohen 2462f1d47b Efl object: Remove creation of event structure and passing it to eo.
This was never used and will probably never be used. It was just wasting
memory and making things more complicated.

Just to give some more concrete numbers, this change alone reduced the
number of dirty pages used by elementary by two. So quite significant.

BREAKS ABI

@feature
2016-08-23 14:49:53 +01:00
Tom Hacohen 199737add5 Eolian: Fix tests according to recent eolian changes. 2016-08-23 14:47:28 +01:00
Daniel Kolesa b24342e783 eolian gen: don't generate events in eo.c 2016-08-23 14:47:28 +01:00
Tom Hacohen a6f126af12 Efl object: Don't pass events to eo class creation.
This was never used and there is no plan to ever use it. I'm going to
soon add a different mechanism with which it will be possible to provide
them again to Eo if ever needed without breaking ABI. Though it's
unlikely it will ever be.
2016-08-23 14:47:28 +01:00
Gustavo Sverzut Barbieri 12850d4e25 remove EINA_ERROR_TIMEOUT
As pointed out in the mailing list, it was introduced in this release,
so it's better to remove the symbol instead of deprecating it.

People should use ETIMEDOUT directly.
2016-08-23 10:14:17 -03:00
Daniel Kolesa 1c78d2196b eolian: enforce no get/set as method/property name rule
Fixes T3849.
2016-08-23 13:44:18 +01:00
Daniel Kolesa df74455ec9 eolian gen: include return type in event docs
Fixes T4393.
2016-08-23 12:06:28 +01:00
Jihoon Kim c37da6dd42 elm_entry: Add more description about key event in return_key_type_set
Signed-off-by: Jihoon Kim <jihoon48.kim@samsung.com>
2016-08-23 17:11:01 +09:00
Jihoon Kim 9dee7cf359 ecore_imf: Add more description about key event in return_key_type_set
Signed-off-by: Jihoon Kim <jihoon48.kim@samsung.com>
2016-08-23 17:09:41 +09:00
Jihoon Kim 4675edfcf9 elput: Fix typo in doxygen
Signed-off-by: Jihoon Kim <jihoon48.kim@samsung.com>
2016-08-23 14:55:50 +09:00
Carsten Haitzler 561f8eaa8f efreet - save about 240-300k or so of memory used by efreet mime
so efreet mime was loading a bunch of mime type info files, parsing
them on startup and allocating memory to store all this mime info -
globs, mimetype strings and more. all a big waste of memory as its
allocated on the heap per process where its the SAME data files loaded
every time.

so make an efreet mime cache file and a tool to create it from mime
files. mmap this file with all the hashes/strings in it so all that
data is mmaped once in memory and shared between all processes and it
is only paged in on demand - as actually read/needed so if your
process doesnt need to know about mime stuff.. it wont touch it anyway.

this saves about 240-300k or so of memory in my tests. this has not
covered the mime MAGIC files which still consume memory and are on the
heap. this is more complex so it will take more time to come up with a
nice file format for the data that is nicely mmaped etc.

@optimize
2016-08-23 12:04:06 +09:00
Carsten Haitzler 56c52311e5 efreet - fix efreet_*_dir_get() to support the xdg env vars
these api's didnt respect the env vars xdg dictates should override
the xdg dirs for that process. this fixes this and uses them if set

@fix
2016-08-23 12:04:06 +09:00
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