[EGIT] [core/efl] efl-1.20 01/01: ecore: update buffer size before allocation, not after.

2017-09-14 Thread Cedric BAIL
cedric pushed a commit to branch efl-1.20.

http://git.enlightenment.org/core/efl.git/commit/?id=fca724bae2635718251f923cfa7db7063fb866a8

commit fca724bae2635718251f923cfa7db7063fb866a8
Author: Cedric BAIL <ced...@osg.samsung.com>
Date:   Thu Sep 14 11:35:35 2017 -0700

ecore: update buffer size before allocation, not after.

T6029
---
 src/lib/ecore/ecore_exe_posix.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/lib/ecore/ecore_exe_posix.c b/src/lib/ecore/ecore_exe_posix.c
index 4f5d125944..cf42371b91 100644
--- a/src/lib/ecore/ecore_exe_posix.c
+++ b/src/lib/ecore/ecore_exe_posix.c
@@ -707,20 +707,20 @@ _impl_ecore_exe_event_data_get(Ecore_Exe  *obj,
 if (count != 0) e->size = last;
 if (flags & ECORE_EXE_PIPE_READ)
 {
+   exe->read_data_size = i - last;
exe->read_data_buf = malloc(exe->read_data_size);
if (exe->read_data_buf)
  {
-exe->read_data_size = i - last;
 memcpy(exe->read_data_buf, c, exe->read_data_size);
  }
else ERR("Out of memory in allocating exe pipe data");
 }
 else
 {
+   exe->error_data_size = i - last;
exe->error_data_buf = malloc(exe->error_data_size);
if (exe->error_data_buf)
  {
-exe->error_data_size = i - last;
 memcpy(exe->error_data_buf, c, exe->error_data_size);
  }
else ERR("Out of memory in allocating exe pipe data");

-- 




[EGIT] [core/efl] master 01/01: ecore: update buffer size before allocation, not after.

2017-09-14 Thread Cedric BAIL
cedric pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=a10a1fa641260adbb9571d3899404b4474629b19

commit a10a1fa641260adbb9571d3899404b4474629b19
Author: Cedric BAIL <ced...@osg.samsung.com>
Date:   Thu Sep 14 11:35:35 2017 -0700

ecore: update buffer size before allocation, not after.
---
 src/lib/ecore/ecore_exe_posix.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/lib/ecore/ecore_exe_posix.c b/src/lib/ecore/ecore_exe_posix.c
index 2c4862fb80..46a97d1461 100644
--- a/src/lib/ecore/ecore_exe_posix.c
+++ b/src/lib/ecore/ecore_exe_posix.c
@@ -708,20 +708,20 @@ _impl_ecore_exe_event_data_get(Ecore_Exe  *obj,
 if (count != 0) e->size = last;
 if (flags & ECORE_EXE_PIPE_READ)
 {
+   exe->read_data_size = i - last;
exe->read_data_buf = malloc(exe->read_data_size);
if (exe->read_data_buf)
  {
-exe->read_data_size = i - last;
 memcpy(exe->read_data_buf, c, exe->read_data_size);
  }
else ERR("Out of memory in allocating exe pipe data");
 }
 else
 {
+   exe->error_data_size = i - last;
exe->error_data_buf = malloc(exe->error_data_size);
if (exe->error_data_buf)
  {
-exe->error_data_size = i - last;
 memcpy(exe->error_data_buf, c, exe->error_data_size);
  }
else ERR("Out of memory in allocating exe pipe data");

-- 




[EGIT] [core/efl] master 02/02: eina: move the test to the new future and use the new Eina_Value array iterator macro.

2017-09-14 Thread Cedric BAIL
cedric pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=fb31440f494d1810264a3c6ad408bd286dca8b76

commit fb31440f494d1810264a3c6ad408bd286dca8b76
Author: Cedric BAIL <ced...@osg.samsung.com>
Date:   Thu Sep 14 11:01:01 2017 -0700

eina: move the test to the new future and use the new Eina_Value array 
iterator macro.
---
 src/tests/eio/eio_test_manager_xattr.c | 55 +++---
 1 file changed, 31 insertions(+), 24 deletions(-)

diff --git a/src/tests/eio/eio_test_manager_xattr.c 
b/src/tests/eio/eio_test_manager_xattr.c
index 15615ebb81..261d2e2c8b 100644
--- a/src/tests/eio/eio_test_manager_xattr.c
+++ b/src/tests/eio/eio_test_manager_xattr.c
@@ -70,34 +70,44 @@ _done_cb(void *data, const Efl_Event *ev EINA_UNUSED)
 }
 
 static void
-_done_get_cb(void *data EINA_UNUSED, const Efl_Event *ev)
+_error_cb(void *data EINA_UNUSED, const Efl_Event *ev)
 {
-   Efl_Future_Event_Success *success = ev->info;
-   Eina_Accessor *ac = success->value;
-   int i = 0;
+   Efl_Future_Event_Failure *failure = ev->info;
+
+   fprintf(stderr, "Something has gone wrong:%s\n", 
eina_error_msg_get(failure->error));
+   abort();
+
+   ecore_main_loop_quit();
+}
+
+static Eina_Value
+_future_done_cb(void *data EINA_UNUSED,
+const Eina_Value array,
+const Eina_Future *dead EINA_UNUSED)
+{
+   Eina_Error err;
+   unsigned int i, len;
+   Eina_Value v = EINA_VALUE_EMPTY;
Eina_Binbuf *buf;
 
-   EINA_ACCESSOR_FOREACH(ac, i, buf)
+   if (array.type == EINA_VALUE_TYPE_ERROR)
  {
+eina_value_get(, );
+fprintf(stderr, "Something has gone wrong: %s\n", 
eina_error_msg_get(err));
+abort();
+ }
+   EINA_VALUE_ARRAY_FOREACH(, len, i, )
+ {
+buf = eina_value_to_binbuf();
 fail_if(!buf);
 fail_if(strcmp((const char*) eina_binbuf_string_get(buf),
attr_data[i]) != 0);
  }
 
-   fail_if(i != total_attributes);
-
-   ecore_main_loop_quit();
-}
-
-static void
-_error_cb(void *data EINA_UNUSED, const Efl_Event *ev)
-{
-   Efl_Future_Event_Failure *failure = ev->info;
-
-   fprintf(stderr, "Something has gone wrong:%s\n", 
eina_error_msg_get(failure->error));
-   abort();
+   fail_if((int) i != total_attributes);
 
ecore_main_loop_quit();
+   return array;
 }
 
 static Eina_Value
@@ -107,6 +117,7 @@ _future_all_cb(void *data,
 {
Eina_Error err;
unsigned int i, len;
+   Eina_Value v = EINA_VALUE_EMPTY;
int *num_of_attr = (int *)data;
 
if (array.type == EINA_VALUE_TYPE_ERROR)
@@ -115,12 +126,8 @@ _future_all_cb(void *data,
 fprintf(stderr, "Something has gone wrong: %s\n", 
eina_error_msg_get(err));
 abort();
  }
-   len = eina_value_array_count();
-   for (i = 0; i < len; i++)
+   EINA_VALUE_ARRAY_FOREACH(, len, i, )
  {
-Eina_Value v;
-
-eina_value_array_get(, i, );
 if (v.type == EINA_VALUE_TYPE_ERROR)
   {
  eina_value_get(, );
@@ -185,8 +192,8 @@ START_TEST(eio_test_job_xattr_set)
 futures[i] = efl_io_manager_xattr_get(job, test_file_path, 
attribute[i]);
  }
 
-   
efl_future_then(efl_future_iterator_all(eina_carray_iterator_new((void**)futures)),
-   _done_get_cb, _error_cb, NULL, _of_attr);
+   eina_future_then(eina_future_all_array(futures),
+   _future_done_cb, _of_attr);
 
ecore_main_loop_begin();
 

-- 




[EGIT] [core/efl] master 01/02: eina: add iterator macro for Eina_Value that contain an array.

2017-09-14 Thread Cedric BAIL
cedric pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=112777fc7a7c7f0bbdbe21ce70d2074367710a88

commit 112777fc7a7c7f0bbdbe21ce70d2074367710a88
Author: Cedric BAIL <ced...@osg.samsung.com>
Date:   Thu Sep 14 11:00:34 2017 -0700

eina: add iterator macro for Eina_Value that contain an array.
---
 src/lib/eina/eina_value.h | 46 ++
 1 file changed, 46 insertions(+)

diff --git a/src/lib/eina/eina_value.h b/src/lib/eina/eina_value.h
index 773de02119..1b85ac7d87 100644
--- a/src/lib/eina/eina_value.h
+++ b/src/lib/eina/eina_value.h
@@ -1780,6 +1780,52 @@ static inline Eina_Bool eina_value_array_value_get(const 
Eina_Value *src,
Eina_Value *dst) 
EINA_ARG_NONNULL(1, 3);
 
 /**
+ * @def EINA_VALUE_ARRAY_FOREACH
+ * @brief Definition for the macro to iterate over an array contained in an 
Eina_Value.
+ *
+ * @param array The list to iterate over.
+ * @param length Contain the length of the array
+ * @param it Contain the current position walked over
+ * @param value Contain the value at the current position.
+ *
+ * This macro iterates over @p array from the first element to
+ * the last. @p value is the data related to the current element.
+ *
+ * It can be used like in the following example:
+ *
+ * @code
+ * Eina_Value array;
+ * Eina_Error err;
+ * unsigned int i, len;
+ * Eina_Value v = EINA_VALUE_EMPTY;
+ *
+ * // array is already filled,
+ * // its elements are unknown,
+ * // EINA_VALUE_ARRAY_FOREACH will be used to check if there is no error
+ *
+ *
+ * EINA_VALUE_ARRAY_FOREACH(, len, i, )
+ *   {
+ *  if (v.type == EINA_VALUE_TYPE_ERROR)
+ *{
+ *   eina_value_get(, );
+ *   fprintf(stderr, "Something has gone wrong: %s at index: %i\n", 
eina_error_msg_get(err), i);
+ *   abort();
+ *}
+ *   }
+ * @endcode
+ *
+ * @warning @p array and v must be a pointer to an Eina_Value
+ */
+#define EINA_VALUE_ARRAY_FOREACH(Array, Length, It, Value) \
+  for (Length = eina_value_array_count(Array), \
+ It = 0,   \
+ eina_value_array_get(Array, It, Value);   \
+   It < Length;\
+   It++,   \
+ eina_value_array_get(Array, It, Value))
+
+/**
  * @}
  */
 

-- 




[EGIT] [admin/devs] master 01/01: illogict: make gaia key the default one.

2017-09-14 Thread Cedric BAIL
cedric pushed a commit to branch master.

http://git.enlightenment.org/admin/devs.git/commit/?id=8c8aa9209e96fe62b0bcafb19223b3ceaee37198

commit 8c8aa9209e96fe62b0bcafb19223b3ceaee37198
Author: Cedric BAIL <ced...@osg.samsung.com>
Date:   Thu Sep 14 10:42:48 2017 -0700

illogict: make gaia key the default one.
---
 developers/illogict/id_ed25519.pub | 1 +
 1 file changed, 1 insertion(+)

diff --git a/developers/illogict/id_ed25519.pub 
b/developers/illogict/id_ed25519.pub
new file mode 100644
index 000..4ec5d9b
--- /dev/null
+++ b/developers/illogict/id_ed25519.pub
@@ -0,0 +1 @@
+ssh-ed25519 
C3NzaC1lZDI1NTE5IBxhKghXXOtiZ/vaZYm5GnrKFG+9Y/CbHz4y3/cQOoW0 
chidambar@gaia

-- 




[EGIT] [core/efl] master 01/01: eio: move efl.io.manager.xattr.get to use the new Eina_Future.

2017-09-14 Thread Cedric BAIL
cedric pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=cba58203a32d4c586570cf2bb47cbcc048d803d4

commit cba58203a32d4c586570cf2bb47cbcc048d803d4
Author: Cedric Bail <ced...@osg.samsung.com>
Date:   Wed Sep 13 18:03:05 2017 -0700

eio: move efl.io.manager.xattr.get to use the new Eina_Future.
---
 src/lib/eio/efl_io_manager.c   | 54 ++
 src/lib/eio/efl_io_manager.eo  |  2 +-
 src/tests/eio/eio_test_manager_xattr.c | 19 +---
 3 files changed, 30 insertions(+), 45 deletions(-)

diff --git a/src/lib/eio/efl_io_manager.c b/src/lib/eio/efl_io_manager.c
index 6156abe853..b19f7e3476 100644
--- a/src/lib/eio/efl_io_manager.c
+++ b/src/lib/eio/efl_io_manager.c
@@ -89,22 +89,6 @@ EFL_CALLBACKS_ARRAY_DEFINE(promise_handling,
{ EFL_EVENT_DEL, _forced_shutdown });
 
 static void
-_file_done_data_cb(void *data, Eio_File *handler, const char *attr_data, 
unsigned int size)
-{
-   Efl_Promise *p = data;
-   Eina_Binbuf *buf;
-
-   efl_event_callback_array_del(p, promise_handling(), handler);
-
-   buf = eina_binbuf_new();
-   eina_binbuf_append_length(buf, (const unsigned char*) attr_data, size);
-
-   efl_promise_value_set(p, buf, EINA_FREE_CB(eina_binbuf_free));
-
-   efl_del(p);
-}
-
-static void
 _file_error_cb(void *data, Eio_File *handler, int error)
 {
Efl_Promise *p = data;
@@ -443,6 +427,23 @@ _future_file_done_cb(void *data, Eio_File *handler)
 }
 
 static void
+_future_file_done_data_cb(void *data, Eio_File *handler EINA_UNUSED, const 
char *attr_data, unsigned int size)
+{
+   Eina_Promise *p = data;
+   Eina_Value_Blob blob = { EINA_VALUE_BLOB_OPERATIONS_MALLOC, NULL, size };
+   Eina_Value v = EINA_VALUE_EMPTY;
+   char *tmp;
+
+   tmp = malloc(size);
+   memcpy(tmp, attr_data, size);
+   blob.memory = tmp;
+
+   eina_value_setup(, EINA_VALUE_TYPE_BLOB);
+   eina_value_set(, );
+   eina_promise_resolve(p, v);
+}
+
+static void
 _future_file_error_cb(void *data,
   Eio_File *handler EINA_UNUSED,
   int error)
@@ -491,31 +492,32 @@ _efl_io_manager_xattr_set(Eo *obj,
return future;
 }
 
-static Efl_Future *
+static Eina_Future *
 _efl_io_manager_xattr_get(Eo *obj,
   Efl_Io_Manager_Data *pd EINA_UNUSED,
   const char *path,
   const char *attribute)
 {
-   Efl_Promise *p;
+   Eina_Promise *p;
+   Eina_Future *future;
Eio_File *h;
 
-   Eo *loop = efl_loop_get(obj);
-   p = efl_add(EFL_PROMISE_CLASS, loop);
+   p = eina_promise_new(efl_loop_future_scheduler_get(obj),
+_efl_io_manager_future_cancel, NULL);
if (!p) return NULL;
+   future = eina_future_new(p);
 
h = eio_file_xattr_get(path, attribute,
-  _file_done_data_cb,
-  _file_error_cb,
+  _future_file_done_data_cb,
+  _future_file_error_cb,
   p);
if (!h) goto end;
+   eina_promise_data_set(p, h);
 
-   efl_event_callback_array_add(p, promise_handling(), h);
-   return efl_promise_future_get(p);
+   return efl_future_Eina_FutureXXX_then(obj, future);
 
  end:
-   efl_del(p);
-   return NULL;
+   return future;
 }
 
 static void
diff --git a/src/lib/eio/efl_io_manager.eo b/src/lib/eio/efl_io_manager.eo
index b1b5d85806..2d4abda082 100644
--- a/src/lib/eio/efl_io_manager.eo
+++ b/src/lib/eio/efl_io_manager.eo
@@ -66,7 +66,7 @@ class Efl.Io.Manager (Efl.Loop_User)
  return: own(ptr(Eina.Future)); [[Future for asynchronous set 
operation]]
   }
   get {
- return: future; [[Information]]
+ return: own(ptr(Eina.Future)); [[Information]]
   }
   keys {
  path: string; [[File path]]
diff --git a/src/tests/eio/eio_test_manager_xattr.c 
b/src/tests/eio/eio_test_manager_xattr.c
index bb2ddece02..15615ebb81 100644
--- a/src/tests/eio/eio_test_manager_xattr.c
+++ b/src/tests/eio/eio_test_manager_xattr.c
@@ -90,23 +90,6 @@ _done_get_cb(void *data EINA_UNUSED, const Efl_Event *ev)
 }
 
 static void
-_done_set_cb(void *data, const Efl_Event *ev)
-{
-   Efl_Future_Event_Success *success = ev->info;
-   Eina_Accessor *ac = success->value;
-   int *placeholder;
-   int *num_of_attr = data;
-   int i = 0;
-
-   EINA_ACCESSOR_FOREACH(ac, i, placeholder)
- *num_of_attr += 1;
-
-   fail_if(*num_of_attr != total_attributes);
-
-   ecore_main_loop_quit();
-}
-
-static void
 _error_cb(void *data EINA_UNUSED, const Efl_Event *ev)
 {
Efl_Future_Event_Failure *failure = ev->info;
@@ -146,7 +129,7 @@ _future_all_cb(void *data,
   }
  }
 
-   fail_if(*num_of_attr != len);
+   fail_if(*num_of_attr != (int) len);
return array;
 }
 

-- 




[EGIT] [core/efl] master 01/01: efl: silent warnings shown on solaris due to missing header files.

2017-09-14 Thread Cedric BAIL
cedric pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=024c6a9fc33c9fc0056f9e6b35dee64fb74cd225

commit 024c6a9fc33c9fc0056f9e6b35dee64fb74cd225
Author: Cedric BAIL <ced...@osg.samsung.com>
Date:   Thu Sep 14 09:59:02 2017 -0700

efl: silent warnings shown on solaris due to missing header files.
---
 src/bin/ecore_evas/ecore_evas_convert.c | 2 ++
 src/lib/ecore/ecore_exe_posix.c | 1 +
 src/lib/eina/eina_debug.c   | 1 +
 src/lib/eina/eina_inarray.c | 1 +
 src/tests/eina/eina_test_abi.c  | 1 +
 5 files changed, 6 insertions(+)

diff --git a/src/bin/ecore_evas/ecore_evas_convert.c 
b/src/bin/ecore_evas/ecore_evas_convert.c
index 6012d9a54f..0b87cae39a 100644
--- a/src/bin/ecore_evas/ecore_evas_convert.c
+++ b/src/bin/ecore_evas/ecore_evas_convert.c
@@ -14,6 +14,8 @@
 
 #if defined(_WIN32) || defined(EXOTIC_NO_SIGNAL)
 # define NO_SIGNAL
+#else
+# include 
 #endif
 
 #undef EINA_LOG_DOMAIN_DEFAULT
diff --git a/src/lib/ecore/ecore_exe_posix.c b/src/lib/ecore/ecore_exe_posix.c
index b8baea81fc..2c4862fb80 100644
--- a/src/lib/ecore/ecore_exe_posix.c
+++ b/src/lib/ecore/ecore_exe_posix.c
@@ -12,6 +12,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #ifdef HAVE_PRCTL
 # include 
diff --git a/src/lib/eina/eina_debug.c b/src/lib/eina/eina_debug.c
index 468ca439e5..b042a16e70 100644
--- a/src/lib/eina/eina_debug.c
+++ b/src/lib/eina/eina_debug.c
@@ -59,6 +59,7 @@
 # include 
 #endif
 
+#include "eina_alloca.h"
 #include "eina_debug.h"
 #include "eina_cpu.h"
 #include "eina_types.h"
diff --git a/src/lib/eina/eina_inarray.c b/src/lib/eina/eina_inarray.c
index a216f0291b..80bb3ea059 100644
--- a/src/lib/eina/eina_inarray.c
+++ b/src/lib/eina/eina_inarray.c
@@ -25,6 +25,7 @@
 
 #include "eina_config.h"
 #include "eina_private.h"
+#include "eina_alloca.h"
 #include "eina_log.h"
 
 /* undefs EINA_ARG_NONULL() so NULL checks are not compiled out! */
diff --git a/src/tests/eina/eina_test_abi.c b/src/tests/eina/eina_test_abi.c
index b75ddf9f91..c8b109c9a8 100644
--- a/src/tests/eina/eina_test_abi.c
+++ b/src/tests/eina/eina_test_abi.c
@@ -32,6 +32,7 @@ typedef uint32_t Eina_Unicode;
 
 #include "eina_config.h"
 #include "eina_private.h"
+#include "eina_alloca.h"
 #include "eina_main.h"
 #include "eina_safety_checks.h"
 

-- 




[EGIT] [core/efl] master 01/01: eio: don't flush value after giving ownership.

2017-09-14 Thread Cedric BAIL
cedric pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=6a4bc78eafe6ca637fa7cd332e969753ad9dbe0b

commit 6a4bc78eafe6ca637fa7cd332e969753ad9dbe0b
Author: Cedric BAIL <ced...@osg.samsung.com>
Date:   Thu Sep 14 09:36:33 2017 -0700

eio: don't flush value after giving ownership.
---
 src/lib/eio/efl_io_manager.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/src/lib/eio/efl_io_manager.c b/src/lib/eio/efl_io_manager.c
index 0b7fb3def9..6156abe853 100644
--- a/src/lib/eio/efl_io_manager.c
+++ b/src/lib/eio/efl_io_manager.c
@@ -527,7 +527,6 @@ _future_file_open_cb(void *data, Eio_File *handler 
EINA_UNUSED, Eina_File *file)
eina_value_setup(, EINA_VALUE_TYPE_FILE);
eina_value_set(, file);
eina_promise_resolve(p, v);
-   eina_value_flush();
 }
 
 static Eina_Future *

-- 




Re: [E-devel] [EGIT] [core/efl] master 02/03: eina: allow convertion to BLOB from Eina_File Eina_Value by mmap the file.

2017-09-14 Thread Cedric Bail
>  Original Message 
> Subject: Re: [E-devel] [EGIT] [core/efl] master 02/03: eina: allow convertion 
> to BLOB from Eina_File Eina_Value by mmap the file.
> Local Time: September 13, 2017 6:18 PM
> UTC Time: September 14, 2017 1:18 AM
> From: barbi...@gmail.com
> To: Enlightenment developer list <enlightenment-devel@lists.sourceforge.net>
>
> On Wed, Sep 13, 2017 at 2:41 PM, Cedric BAIL <cedric.b...@free.fr> wrote:
>> cedric pushed a commit to branch master.
>>
>> http://git.enlightenment.org/core/efl.git/commit/?id=430095d4f1aaad51ffbc30c7e323c200c896e926
>>
>> commit 430095d4f1aaad51ffbc30c7e323c200c896e926
>> Author: Cedric Bail <ced...@osg.samsung.com>
>> Date: Wed Sep 13 10:38:36 2017 -0700
>>
>> eina: allow convertion to BLOB from Eina_File Eina_Value by mmap the file.
>> ---
>> src/lib/eina/eina_value.c | 18 ++
>> 1 file changed, 18 insertions(+)
>>
>> diff --git a/src/lib/eina/eina_value.c b/src/lib/eina/eina_value.c
>> index 59d54d8799..6088d63695 100644
>> --- a/src/lib/eina/eina_value.c
>> +++ b/src/lib/eina/eina_value.c
>> @@ -4722,7 +4722,25 @@ _eina_value_type_file_convert_to(const 
>> Eina_Value_Type *type EINA_UNUSED, const
>> filename = eina_file_filename_get(f);
>> ret = eina_value_type_pset(convert, convert_mem, );
>> }
>> + else if (convert == EINA_VALUE_TYPE_BLOB)
>> + {
>> + Eina_Value_Blob *c = convert_mem;
>> + const void *m;
>> +
>> + m = eina_file_map_all((Eina_File*) f, EINA_FILE_WILLNEED);
>> + if (!m) goto end;
>> +
>> + c->ops = EINA_VALUE_BLOB_OPERATIONS_MALLOC;
>> + c->memory = malloc(eina_file_size_get(f));
>> + memcpy((void*)c->memory, m, eina_file_size_get(f));
>> + c->size = eina_file_size_get(f);
>> +
>> + eina_file_map_free((Eina_File*)f, (void*)m);
>
> do you dup the memory because of modifications? otherwise we could
> provide "ops" that would handle Eina_File, which we could
> eina_file_dup().

Yes, I was afraid of user of Eina_Value expecting to be able to mess with the 
memory directly (be accessing it or just copying the pointer and destroying the 
Eina_Value) and get a crash. If you think it won't be a problem, we could go 
with some optimisation and do the trick you described.
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


[EGIT] [core/efl] master 01/02: eina: add an ability to quickly convert from an Eina_Value to an Eina_Binbuf.

2017-09-13 Thread Cedric BAIL
cedric pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=8fbfab83e9c580a25537a2eefa6f63ef313f3089

commit 8fbfab83e9c580a25537a2eefa6f63ef313f3089
Author: Cedric Bail <ced...@osg.samsung.com>
Date:   Wed Sep 13 17:26:04 2017 -0700

eina: add an ability to quickly convert from an Eina_Value to an 
Eina_Binbuf.
---
 src/lib/eina/eina_binbuf.h |  1 +
 src/lib/eina/eina_value.c  | 29 +
 src/lib/eina/eina_value.h  | 18 ++
 3 files changed, 48 insertions(+)

diff --git a/src/lib/eina/eina_binbuf.h b/src/lib/eina/eina_binbuf.h
index 0aa0e1a117..e84453731e 100644
--- a/src/lib/eina/eina_binbuf.h
+++ b/src/lib/eina/eina_binbuf.h
@@ -5,6 +5,7 @@
 #include 
 
 #include "eina_types.h"
+#include "eina_slice.h"
 
 /**
  * @addtogroup Eina_Binary_Buffer_Group Binary Buffer
diff --git a/src/lib/eina/eina_value.c b/src/lib/eina/eina_value.c
index d3a9d6dec6..f22718b147 100644
--- a/src/lib/eina/eina_value.c
+++ b/src/lib/eina/eina_value.c
@@ -37,6 +37,7 @@
 #include "eina_lock.h"
 #include "eina_file.h"
 #include "eina_rectangle.h"
+#include "eina_binbuf.h"
 
 /* undefs EINA_ARG_NONULL() so NULL checks are not compiled out! */
 #include "eina_safety_checks.h"
@@ -5572,6 +5573,34 @@ eina_value_to_string(const Eina_Value *value)
return tmp.value.ptr; /* steal value */
 }
 
+EAPI Eina_Binbuf *
+eina_value_to_binbuf(Eina_Value *value)
+{
+   Eina_Value tmp = EINA_VALUE_EMPTY;
+   Eina_Value_Blob out;
+   Eina_Binbuf *buf;
+
+   if (value->type != EINA_VALUE_TYPE_BLOB)
+ {
+eina_value_setup(, EINA_VALUE_TYPE_BLOB);
+
+if (!eina_value_convert(value, ))
+  return NULL;
+
+value = 
+ }
+
+   eina_value_get(value, );
+   if (!out.memory) return NULL;
+
+   buf = eina_binbuf_new();
+   eina_binbuf_append_length(buf, out.memory, out.size);
+
+   eina_value_flush();
+
+   return buf;
+}
+
 EAPI Eina_Value *
 eina_value_array_new(const Eina_Value_Type *subtype, unsigned int step)
 {
diff --git a/src/lib/eina/eina_value.h b/src/lib/eina/eina_value.h
index 305d378548..773de02119 100644
--- a/src/lib/eina/eina_value.h
+++ b/src/lib/eina/eina_value.h
@@ -27,6 +27,7 @@
 #include "eina_list.h"
 #include "eina_hash.h"
 #include "eina_rectangle.h"
+#include "eina_binbuf.h"
 
 /**
  * @page eina_value_example_01_page Eina_Value usage
@@ -1070,6 +1071,22 @@ static inline Eina_Bool eina_value_pget(const Eina_Value 
*value,
 EAPI Eina_Bool eina_value_convert(const Eina_Value *value,
   Eina_Value *convert) EINA_ARG_NONNULL(1, 2);
 
+/**
+ * @brief Converts one value to Eina_Binbuf.
+ * @param value Source value object.
+ * @return @c NULL if it failed to get a memory content, a valid Eina_Binbuf 
otherwise.
+ *
+ * Converts one value to EINA_TYPE_VALUE_BLOB if necessary by calling
+ * @c eina_value_convert() function.
+ *
+ * @note You are responsible for destroying the Eina_Binbuf returned.
+ *
+ * @see eina_value_to_string()
+ * @see eina_value_convert()
+ *
+ * @since 1.20
+ */
+EAPI Eina_Binbuf *eina_value_to_binbuf(Eina_Value *value);
 
 /**
  * @brief Converts value to string.
@@ -1077,6 +1094,7 @@ EAPI Eina_Bool eina_value_convert(const Eina_Value *value,
  * @return newly allocated memory or @c NULL on failure.
  *
  * @see eina_value_convert()
+ * @see eina_value_to_binbuf()
  * @since 1.2
  */
 EAPI char *eina_value_to_string(const Eina_Value *value) EINA_ARG_NONNULL(1);

-- 




[EGIT] [core/efl] master 02/02: eina: add tests for eina_value_to_binbuf.

2017-09-13 Thread Cedric BAIL
cedric pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=cacd374e4121f5e91db51cf7b228f243d04d3193

commit cacd374e4121f5e91db51cf7b228f243d04d3193
Author: Cedric Bail <ced...@osg.samsung.com>
Date:   Wed Sep 13 17:26:26 2017 -0700

eina: add tests for eina_value_to_binbuf.
---
 src/tests/eina/eina_test_value.c | 65 
 1 file changed, 65 insertions(+)

diff --git a/src/tests/eina/eina_test_value.c b/src/tests/eina/eina_test_value.c
index 9bdcc4c120..15cf35888e 100644
--- a/src/tests/eina/eina_test_value.c
+++ b/src/tests/eina/eina_test_value.c
@@ -799,6 +799,70 @@ START_TEST(eina_value_test_to_string)
 }
 END_TEST
 
+START_TEST(eina_value_test_to_binbuf)
+{
+   Eina_Value *value;
+   char c, in_c;
+   const char *str, *in_str;
+   Eina_Binbuf *bin;
+   const char *out;
+   char buf[256];
+
+   eina_init();
+
+   value = eina_value_new(EINA_VALUE_TYPE_CHAR);
+   fail_unless(value != NULL);
+   in_c = 'x';
+   fail_unless(eina_value_pset(value, _c));
+   fail_unless(eina_value_pget(value, ));
+   fail_unless(c == 'x');
+   snprintf(buf, sizeof(buf), "%c", in_c);
+   bin = eina_value_to_binbuf(value);
+   out = (char *) eina_binbuf_string_get(bin);
+   fail_unless(out != NULL);
+   ck_assert_str_eq(buf, out);
+   eina_binbuf_free(bin);
+   eina_value_flush(value);
+
+   fail_unless(eina_value_setup(value, EINA_VALUE_TYPE_STRING));
+   in_str = "hello world!";
+   fail_unless(eina_value_pset(value, _str));
+   fail_unless(eina_value_pget(value, ));
+   ck_assert_str_eq(str, "hello world!");
+   bin = eina_value_to_binbuf(value);
+   out = (char *) eina_binbuf_string_get(bin);
+   fail_unless(out != NULL);
+   ck_assert_str_eq(in_str, out);
+   eina_binbuf_free(bin);
+
+   in_str = "eina-value";
+   fail_unless(eina_value_pset(value, _str));
+   fail_unless(eina_value_pget(value, ));
+   ck_assert_str_eq(str, "eina-value");
+   bin = eina_value_to_binbuf(value);
+   out = (char *) eina_binbuf_string_get(bin);
+   fail_unless(out != NULL);
+   ck_assert_str_eq(in_str, out);
+   eina_binbuf_free(bin);
+
+   eina_value_flush(value);
+   fail_unless(eina_value_setup(value, EINA_VALUE_TYPE_STRING));
+
+   in_str = "profusion";
+   fail_unless(eina_value_pset(value, _str));
+   fail_unless(eina_value_pget(value, ));
+   ck_assert_str_eq(str, "profusion");
+   bin = eina_value_to_binbuf(value);
+   out = (char *) eina_binbuf_string_get(bin);
+   fail_unless(out != NULL);
+   ck_assert_str_eq(in_str, out);
+   eina_binbuf_free(bin);
+
+   eina_value_free(value);
+   eina_shutdown();
+}
+END_TEST
+
 START_TEST(eina_value_test_convert_char)
 {
Eina_Value *value, conv;
@@ -2948,6 +3012,7 @@ eina_test_value(TCase *tc)
tcase_add_test(tc, eina_value_test_pvariant);
tcase_add_test(tc, eina_value_test_compare);
tcase_add_test(tc, eina_value_test_to_string);
+   tcase_add_test(tc, eina_value_test_to_binbuf);
tcase_add_test(tc, eina_value_test_convert_char);
tcase_add_test(tc, eina_value_test_convert_uchar);
tcase_add_test(tc, eina_value_test_convert_short);

-- 




[EGIT] [core/efl] master 02/02: eio: migrate efl.io.manager.open to use Eina_Future.

2017-09-13 Thread Cedric BAIL
cedric pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=b9ef9af74a4cc401c02468f20a68659b9b2a1235

commit b9ef9af74a4cc401c02468f20a68659b9b2a1235
Author: Cedric Bail <ced...@osg.samsung.com>
Date:   Wed Sep 13 15:52:40 2017 -0700

eio: migrate efl.io.manager.open to use Eina_Future.
---
 src/lib/eio/efl_io_manager.c   | 36 +-
 src/lib/eio/efl_io_manager.eo  |  2 +-
 src/tests/eio/eio_test_manager.c   | 32 --
 src/tests/eio/eio_test_manager_xattr.c |  2 +-
 4 files changed, 42 insertions(+), 30 deletions(-)

diff --git a/src/lib/eio/efl_io_manager.c b/src/lib/eio/efl_io_manager.c
index 75fa2289b0..0b7fb3def9 100644
--- a/src/lib/eio/efl_io_manager.c
+++ b/src/lib/eio/efl_io_manager.c
@@ -519,43 +519,43 @@ _efl_io_manager_xattr_get(Eo *obj,
 }
 
 static void
-_file_open_cb(void *data, Eio_File *handler, Eina_File *file)
+_future_file_open_cb(void *data, Eio_File *handler EINA_UNUSED, Eina_File 
*file)
 {
-   Efl_Promise *p = data;
-
-   efl_event_callback_array_del(p, promise_handling(), handler);
-
-   efl_promise_value_set(p, eina_file_dup(file), 
EINA_FREE_CB(eina_file_close));
+   Eina_Promise *p = data;
+   Eina_Value v = EINA_VALUE_EMPTY;
 
-   efl_del(p);
+   eina_value_setup(, EINA_VALUE_TYPE_FILE);
+   eina_value_set(, file);
+   eina_promise_resolve(p, v);
+   eina_value_flush();
 }
 
-static Efl_Future *
+static Eina_Future *
 _efl_io_manager_open(Eo *obj,
  Efl_Io_Manager_Data *pd EINA_UNUSED,
  const char *path,
  Eina_Bool shared)
 {
-   Efl_Promise *p;
+   Eina_Promise *p;
+   Eina_Future *future;
Eio_File *h;
 
-   Eo *loop = efl_loop_get(obj);
-   p = efl_add(EFL_PROMISE_CLASS, loop);
+   p = eina_promise_new(efl_loop_future_scheduler_get(obj),
+_efl_io_manager_future_cancel, NULL);
if (!p) return NULL;
+   future = eina_future_new(p);
 
h = eio_file_open(path, shared,
- _file_open_cb,
- _file_error_cb,
+ _future_file_open_cb,
+ _future_file_error_cb,
  p);
-
if (!h) goto end;
+   eina_promise_data_set(p, h);
 
-   efl_event_callback_array_add(p, promise_handling(), h);
-   return efl_promise_future_get(p);
+   return efl_future_Eina_FutureXXX_then(obj, future);
 
  end:
-   efl_del(p);
-   return NULL;
+   return future;
 }
 
 static Eina_Future *
diff --git a/src/lib/eio/efl_io_manager.eo b/src/lib/eio/efl_io_manager.eo
index a4e8aaddc5..b1b5d85806 100644
--- a/src/lib/eio/efl_io_manager.eo
+++ b/src/lib/eio/efl_io_manager.eo
@@ -83,7 +83,7 @@ class Efl.Io.Manager (Efl.Loop_User)
 @in path: string; [[Path to file]]
 @in shared: bool; [[$true if the file can be accessed by others, 
$false otherwise]]
   }
-  return: future; [[Eina file handle]]
+  return: own(ptr(Eina.Future)); [[Eina file handle]]
 }
 close {
   [[Closes an open Eina.File.]]
diff --git a/src/tests/eio/eio_test_manager.c b/src/tests/eio/eio_test_manager.c
index ebfcc9edf7..e97310276c 100644
--- a/src/tests/eio/eio_test_manager.c
+++ b/src/tests/eio/eio_test_manager.c
@@ -51,16 +51,28 @@ _error_cb(void *data EINA_UNUSED, const Efl_Event *ev)
ecore_main_loop_quit();
 }
 
-static void
-_open_done_cb(void *data, const Efl_Event *ev)
+static Eina_Value
+_open_done_cb(void *data,
+  const Eina_Value file,
+  const Eina_Future *dead EINA_UNUSED)
 {
-   Efl_Future_Event_Success *success = ev->info;
-   Eina_Bool *opened = (Eina_Bool *)data;
-   Eina_File* file = eina_file_dup(success->value);
-   eina_file_close(file);
-
-   *opened = EINA_TRUE;
+   if (file.type == EINA_VALUE_TYPE_ERROR)
+ {
+Eina_Error err;
+
+eina_value_get(, );
+fprintf(stderr, "Something has gone wrong: %s\n", 
eina_error_msg_get(err));
+abort();
+ }
+   if (file.type == EINA_VALUE_TYPE_FILE)
+ {
+Eina_Bool *opened = (Eina_Bool *)data;
+
+*opened = EINA_TRUE;
+ }
ecore_main_loop_quit();
+
+   return file;
 }
 
 static void
@@ -221,7 +233,7 @@ START_TEST(efl_io_manager_test_open)
Eina_Tmpstr *nested_dirname;
Eina_Tmpstr *nested_filename;
Efl_Io_Manager *job;
-   Efl_Future *f;
+   Eina_Future *f;
Eina_Bool opened_file = EINA_FALSE;
int ret;
 
@@ -241,7 +253,7 @@ START_TEST(efl_io_manager_test_open)
job = efl_add(EFL_IO_MANAGER_CLASS, ecore_main_loop_get());
 
f = efl_io_manager_open(job, nested_filename, EINA_FALSE);
-   efl_future_then(f, &_open_done_cb, &_error_cb, NULL, _file);
+   eina_future_then(f, _open_done_cb, _file);
ecore_main_loop_begin();
 
fail_if(!opened_file);
diff --git a/src/tests/eio/eio_test_manager_xattr.c 
b/src/tests/eio/eio_test_manager_xattr.c
index 3d41316f20..bb2ddece02 100644
--- a/src/tests/eio/eio_test_manag

[EGIT] [core/efl] master 01/02: ecore: allow efl_loop_future_scheduler_get on all Efl.Loop.User.

2017-09-13 Thread Cedric BAIL
cedric pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=ba34b998eb6920fe0dbccd1037e8344c028754ec

commit ba34b998eb6920fe0dbccd1037e8344c028754ec
Author: Cedric Bail <ced...@osg.samsung.com>
Date:   Wed Sep 13 15:51:49 2017 -0700

ecore: allow efl_loop_future_scheduler_get on all Efl.Loop.User.
---
 src/lib/ecore/efl_loop_user.c  |  6 ++
 src/lib/ecore/efl_loop_user.eo | 12 
 2 files changed, 18 insertions(+)

diff --git a/src/lib/ecore/efl_loop_user.c b/src/lib/ecore/efl_loop_user.c
index 530772fc64..4bcfaad41d 100644
--- a/src/lib/ecore/efl_loop_user.c
+++ b/src/lib/ecore/efl_loop_user.c
@@ -29,4 +29,10 @@ _efl_loop_user_efl_object_parent_set(Eo *obj, 
Efl_Loop_User_Data *pd EINA_UNUSED
efl_parent_set(efl_super(obj, EFL_LOOP_USER_CLASS), parent);
 }
 
+static Eina_Future_Scheduler *
+_efl_loop_user_future_scheduler_get(Eo *obj, Efl_Loop_User_Data *pd 
EINA_UNUSED)
+{
+   return efl_loop_future_scheduler_get(efl_loop_get(obj));
+}
+
 #include "efl_loop_user.eo.c"
diff --git a/src/lib/ecore/efl_loop_user.eo b/src/lib/ecore/efl_loop_user.eo
index 04bbca..67cc9b3e7d 100644
--- a/src/lib/ecore/efl_loop_user.eo
+++ b/src/lib/ecore/efl_loop_user.eo
@@ -14,6 +14,18 @@ class Efl.Loop_User (Efl.Object)
 loop: Efl.Loop; [[Efl loop]]
  }
   }
+  @property future_scheduler {
+ [[Gets the Eina_Future_Scheduler for a given mainloop.
+
+   The Eina_Future_Scheduler returned by this function
+   should be used for creating promises (eina_promise_new())
+   so then can properly schedule resolve/reject events.
+ ]]
+ get {}
+ values {
+scheduler: ptr(Eina.Future.Scheduler); [[The scheduler.]]
+ }
+  }
}
implements {
   Efl.Object.parent { set; }

-- 




[EGIT] [core/efl] master 02/03: eina: allow convertion to BLOB from Eina_File Eina_Value by mmap the file.

2017-09-13 Thread Cedric BAIL
cedric pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=430095d4f1aaad51ffbc30c7e323c200c896e926

commit 430095d4f1aaad51ffbc30c7e323c200c896e926
Author: Cedric Bail <ced...@osg.samsung.com>
Date:   Wed Sep 13 10:38:36 2017 -0700

eina: allow convertion to BLOB from Eina_File Eina_Value by mmap the file.
---
 src/lib/eina/eina_value.c | 18 ++
 1 file changed, 18 insertions(+)

diff --git a/src/lib/eina/eina_value.c b/src/lib/eina/eina_value.c
index 59d54d8799..6088d63695 100644
--- a/src/lib/eina/eina_value.c
+++ b/src/lib/eina/eina_value.c
@@ -4722,7 +4722,25 @@ _eina_value_type_file_convert_to(const Eina_Value_Type 
*type EINA_UNUSED, const
 filename = eina_file_filename_get(f);
 ret = eina_value_type_pset(convert, convert_mem, );
  }
+   else if (convert == EINA_VALUE_TYPE_BLOB)
+ {
+Eina_Value_Blob *c = convert_mem;
+const void *m;
+
+m = eina_file_map_all((Eina_File*) f, EINA_FILE_WILLNEED);
+if (!m) goto end;
+
+c->ops = EINA_VALUE_BLOB_OPERATIONS_MALLOC;
+c->memory = malloc(eina_file_size_get(f));
+memcpy((void*)c->memory, m, eina_file_size_get(f));
+c->size = eina_file_size_get(f);
+
+eina_file_map_free((Eina_File*)f, (void*)m);
+
+ret = EINA_TRUE;
+ }
 
+ end:
return ret;
 }
 

-- 




[EGIT] [core/efl] master 03/03: eina: fix Eina_Rectangle support in Eina_Value.

2017-09-13 Thread Cedric BAIL
cedric pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=f5487c5d3e2de4ed85b16d1d65ed409f0ee06244

commit f5487c5d3e2de4ed85b16d1d65ed409f0ee06244
Author: Cedric Bail <ced...@osg.samsung.com>
Date:   Wed Sep 13 10:39:31 2017 -0700

eina: fix Eina_Rectangle support in Eina_Value.

Thanks for the review Gustavo.
---
 src/lib/eina/eina_value.c | 20 +---
 src/lib/eina/eina_value.h |  2 +-
 2 files changed, 10 insertions(+), 12 deletions(-)

diff --git a/src/lib/eina/eina_value.c b/src/lib/eina/eina_value.c
index 6088d63695..d3a9d6dec6 100644
--- a/src/lib/eina/eina_value.c
+++ b/src/lib/eina/eina_value.c
@@ -4842,14 +4842,11 @@ _eina_value_type_rectangle_convert_to(const 
Eina_Value_Type *type EINA_UNUSED, c
if ((convert == EINA_VALUE_TYPE_STRING) ||
(convert == EINA_VALUE_TYPE_STRINGSHARE))
  {
-Eina_Strbuf *buf;
-const char *str;
+char str[1024];
 
-buf = eina_strbuf_new();
-eina_strbuf_append_printf(buf, "[ %i, %i, %i, %i ]",
-  tr->x, tr->y, tr->w, tr->h);
-str = eina_strbuf_string_get(buf);
-ret = eina_value_type_pset(convert, convert_mem, );
+snprintf(str, 1024, "[ %i, %i, %i, %i ]",
+ tr->x, tr->y, tr->w, tr->h);
+ret = eina_value_type_pset(convert, convert_mem, str);
  }
 
return ret;
@@ -4889,23 +4886,24 @@ _eina_value_type_rectangle_pset(const Eina_Value_Type 
*type EINA_UNUSED, void *m
 static Eina_Bool
 _eina_value_type_rectangle_vset(const Eina_Value_Type *type, void *mem, 
va_list args)
 {
-   const Eina_Rectangle *r = va_arg(args, Eina_Rectangle *);
-   return _eina_value_type_rectangle_pset(type, mem, r);
+   const Eina_Rectangle r = va_arg(args, Eina_Rectangle);
+   return _eina_value_type_rectangle_pset(type, mem, );
 }
 
 static Eina_Bool
 _eina_value_type_rectangle_pget(const Eina_Value_Type *type EINA_UNUSED, const 
void *mem, void *ptr)
 {
const Eina_Rectangle *tr = mem;
+   Eina_Rectangle *r = ptr;
 
-   memcpy(ptr, , sizeof (void*));
+   *r = *tr;
return EINA_TRUE;
 }
 
 EAPI const Eina_Value_Type _EINA_VALUE_TYPE_RECTANGLE = {
   EINA_VALUE_TYPE_VERSION,
   sizeof (Eina_Rectangle),
-  "Eina_Value_Rectangle",
+  "Eina_Rectangle",
   _eina_value_type_rectangle_setup,
   _eina_value_type_rectangle_flush,
   _eina_value_type_rectangle_copy,
diff --git a/src/lib/eina/eina_value.h b/src/lib/eina/eina_value.h
index 09706a..305d378548 100644
--- a/src/lib/eina/eina_value.h
+++ b/src/lib/eina/eina_value.h
@@ -3679,7 +3679,7 @@ EAPI extern const Eina_Value_Type *EINA_VALUE_TYPE_FILE;
 
 /**
  * @var EINA_VALUE_TYPE_RECTANGLE
- * manages optional type.
+ * manages Eina_Rectangle type.
  *
  * @since 1.21
  */

-- 




[EGIT] [core/efl] master 01/03: eina: improve Eina_File support in Eina_Value.

2017-09-13 Thread Cedric BAIL
cedric pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=af452c439d10286e7dcdedb89163c2071eda8d0c

commit af452c439d10286e7dcdedb89163c2071eda8d0c
Author: Cedric Bail <ced...@osg.samsung.com>
Date:   Wed Sep 13 10:36:05 2017 -0700

eina: improve Eina_File support in Eina_Value.

Thanks Gustavo.
---
 src/lib/eina/eina_value.c | 4 ++--
 src/lib/eina/eina_value.h | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/lib/eina/eina_value.c b/src/lib/eina/eina_value.c
index 1fa84de231..59d54d8799 100644
--- a/src/lib/eina/eina_value.c
+++ b/src/lib/eina/eina_value.c
@@ -4682,7 +4682,7 @@ _eina_value_type_file_flush(const Eina_Value_Type *type 
EINA_UNUSED, void *mem)
 {
Eina_File *f = *(Eina_File **)mem;
 
-   eina_file_close(f);
+   if (f) eina_file_close(f);
return EINA_TRUE;
 }
 
@@ -4771,7 +4771,7 @@ _eina_value_type_file_pget(const Eina_Value_Type *type 
EINA_UNUSED, const void *
 EAPI const Eina_Value_Type _EINA_VALUE_TYPE_FILE = {
   EINA_VALUE_TYPE_VERSION,
   sizeof (Eina_File *),
-  "Eina_Value_File",
+  "Eina_File",
   _eina_value_type_file_setup,
   _eina_value_type_file_flush,
   _eina_value_type_file_copy,
diff --git a/src/lib/eina/eina_value.h b/src/lib/eina/eina_value.h
index d698043463..09706a 100644
--- a/src/lib/eina/eina_value.h
+++ b/src/lib/eina/eina_value.h
@@ -3671,7 +3671,7 @@ static inline const Eina_Value_Type 
*eina_value_optional_type_get(Eina_Value *va
 
 /**
  * @var EINA_VALUE_TYPE_FILE
- * manages optional type.
+ * manages Eina_File type.
  *
  * @since 1.21
  */

-- 




[EGIT] [core/efl] master 02/04: eina: add an Eina_Value helper for Eina_File.

2017-09-12 Thread Cedric BAIL
cedric pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=95dd799715e6ba7574dbc1fc1c244b91bf3a4927

commit 95dd799715e6ba7574dbc1fc1c244b91bf3a4927
Author: Cedric BAIL <ced...@osg.samsung.com>
Date:   Tue Sep 12 15:40:42 2017 -0700

eina: add an Eina_Value helper for Eina_File.
---
 src/lib/eina/eina_value.c | 118 +-
 src/lib/eina/eina_value.h |   8 
 2 files changed, 125 insertions(+), 1 deletion(-)

diff --git a/src/lib/eina/eina_value.c b/src/lib/eina/eina_value.c
index cdc237d202..22b3f506e0 100644
--- a/src/lib/eina/eina_value.c
+++ b/src/lib/eina/eina_value.c
@@ -35,6 +35,7 @@
 #include "eina_strbuf.h"
 #include "eina_mempool.h"
 #include "eina_lock.h"
+#include "eina_file.h"
 
 /* undefs EINA_ARG_NONULL() so NULL checks are not compiled out! */
 #include "eina_safety_checks.h"
@@ -4668,6 +4669,119 @@ EAPI const Eina_Value_Type _EINA_VALUE_TYPE_OPTIONAL = {
   _eina_value_type_optional_pget
 };
 
+static Eina_Bool
+_eina_value_type_file_setup(const Eina_Value_Type *type EINA_UNUSED, void *mem)
+{
+   memset(mem, 0, sizeof(Eina_File *));
+   return EINA_TRUE;
+}
+
+static Eina_Bool
+_eina_value_type_file_flush(const Eina_Value_Type *type EINA_UNUSED, void *mem)
+{
+   Eina_File *f = *(Eina_File **)mem;
+
+   eina_file_close(f);
+   return EINA_TRUE;
+}
+
+static Eina_Bool
+_eina_value_type_file_copy(const Eina_Value_Type *type EINA_UNUSED, const void 
*src, void *dst)
+{
+   const Eina_File *f = *(const Eina_File **)src;
+   Eina_File **d = dst;
+
+   *d = eina_file_dup(f);
+   return !!(*d);
+}
+
+static int
+_eina_value_type_file_compare(const Eina_Value_Type *type EINA_UNUSED, const 
void *a, const void *b)
+{
+   const Eina_File *ta = *(const Eina_File **)a;
+   const Eina_File *tb = *(const Eina_File **)b;
+
+   if (ta == tb) return 0;
+   if (!ta) return -1;
+   if (!tb) return 1;
+   return -1;
+}
+
+static Eina_Bool
+_eina_value_type_file_convert_to(const Eina_Value_Type *type EINA_UNUSED, 
const Eina_Value_Type *convert, const void *type_mem, void *convert_mem)
+{
+   const Eina_File *f = *(const Eina_File **) type_mem;
+   Eina_Bool ret = EINA_FALSE;
+
+   if ((convert == EINA_VALUE_TYPE_STRING) ||
+   (convert == EINA_VALUE_TYPE_STRINGSHARE))
+ {
+const char *filename;
+
+filename = eina_file_filename_get(f);
+ret = eina_value_type_pset(convert, convert_mem, );
+ }
+
+   return ret;
+}
+
+static Eina_Bool
+_eina_value_type_file_convert_from(const Eina_Value_Type *type EINA_UNUSED, 
const Eina_Value_Type *convert, void *type_mem, const void *convert_mem)
+{
+   Eina_File **f = type_mem;
+
+   if ((convert == EINA_VALUE_TYPE_STRING) ||
+   (convert == EINA_VALUE_TYPE_STRINGSHARE))
+ {
+const char *filename = *(const char **)convert_mem;
+
+if (!filename) return EINA_FALSE;
+*f = eina_file_open(filename, EINA_FALSE);
+return !!(*f);
+ }
+
+   return EINA_FALSE;
+}
+
+static Eina_Bool
+_eina_value_type_file_pset(const Eina_Value_Type *type EINA_UNUSED, void *mem, 
const void *ptr)
+{
+   Eina_File **d = mem;
+   const Eina_File *s = ptr;
+
+   *d = eina_file_dup(s);
+   return EINA_TRUE;
+}
+
+static Eina_Bool
+_eina_value_type_file_vset(const Eina_Value_Type *type, void *mem, va_list 
args)
+{
+   const Eina_File *f = va_arg(args, Eina_File *);
+   return _eina_value_type_file_pset(type, mem, f);
+}
+
+static Eina_Bool
+_eina_value_type_file_pget(const Eina_Value_Type *type EINA_UNUSED, const void 
*mem, void *ptr)
+{
+   memcpy(ptr, mem, sizeof (Eina_File*));
+   return EINA_TRUE;
+}
+
+EAPI const Eina_Value_Type _EINA_VALUE_TYPE_FILE = {
+  EINA_VALUE_TYPE_VERSION,
+  sizeof (Eina_File *),
+  "Eina_Value_File",
+  _eina_value_type_file_setup,
+  _eina_value_type_file_flush,
+  _eina_value_type_file_copy,
+  _eina_value_type_file_compare,
+  _eina_value_type_file_convert_to,
+  _eina_value_type_file_convert_from,
+  _eina_value_type_file_vset,
+  _eina_value_type_file_pset,
+  _eina_value_type_file_pget
+};
+
 /* keep all basic types inlined in an array so we can compare if it's
  * a basic type using pointer arithmetic.
  *
@@ -5120,7 +5234,8 @@ eina_value_init(void)
EINA_VALUE_TYPE_BLOB = &_EINA_VALUE_TYPE_BLOB;
EINA_VALUE_TYPE_STRUCT = &_EINA_VALUE_TYPE_STRUCT;
 
-   EINA_VALUE_TYPE_OPTIONAL   = &_EINA_VALUE_TYPE_OPTIONAL;
+   EINA_VALUE_TYPE_OPTIONAL = &_EINA_VALUE_TYPE_OPTIONAL;
+   EINA_VALUE_TYPE_FILE = &_EINA_VALUE_TYPE_FILE;
 
EINA_VALUE_BLOB_OPERATIONS_MALLOC = &_EINA_VALUE_BLOB_OPERATIONS_MALLOC;
 
@@ -5209,6 +5324,7 @@ EAPI const Eina_Value_Type *EINA_VALUE_TYPE_TIMEVAL = 
NULL;
 EAPI const Eina_Value_Type *EINA_VALUE_TYPE_BLOB = NULL;
 EAPI const Eina_Value_Type *EINA_VALUE_TYPE_STRUCT = NULL;
 EAPI const Eina_Value_Type *EINA_VALUE_TYPE_OPTIONAL = NULL;
+EAPI const Eina_Value_Type *EINA_VALUE_TYPE_FILE = N

[EGIT] [core/efl] master 01/04: eio: move efl.io.manager.close to use the new future.

2017-09-12 Thread Cedric BAIL
cedric pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=de106a29733daf398d318eae2aa6e1c1c8581970

commit de106a29733daf398d318eae2aa6e1c1c8581970
Author: Cedric BAIL <ced...@osg.samsung.com>
Date:   Tue Sep 12 14:08:40 2017 -0700

eio: move efl.io.manager.close to use the new future.
---
 src/lib/eio/efl_io_manager.c  | 21 +++--
 src/lib/eio/efl_io_manager.eo |  2 +-
 2 files changed, 12 insertions(+), 11 deletions(-)

diff --git a/src/lib/eio/efl_io_manager.c b/src/lib/eio/efl_io_manager.c
index e4100810af..75fa2289b0 100644
--- a/src/lib/eio/efl_io_manager.c
+++ b/src/lib/eio/efl_io_manager.c
@@ -558,30 +558,31 @@ _efl_io_manager_open(Eo *obj,
return NULL;
 }
 
-static Efl_Future *
+static Eina_Future *
 _efl_io_manager_close(Eo *obj,
   Efl_Io_Manager_Data *pd EINA_UNUSED,
   Eina_File *file)
 {
-   Efl_Promise *p;
+   Eina_Promise *p;
+   Eina_Future *future;
Eio_File *h;
 
-   Eo *loop = efl_loop_get(obj);
-   p = efl_add(EFL_PROMISE_CLASS, loop);
+   p = eina_promise_new(efl_loop_future_scheduler_get(obj),
+_efl_io_manager_future_cancel, NULL);
if (!p) return NULL;
+   future = eina_future_new(p);
 
h = eio_file_close(file,
-  _file_done_cb,
-  _file_error_cb,
+  _future_file_done_cb,
+  _future_file_error_cb,
   p);
if (!h) goto end;
+   eina_promise_data_set(p, h);
 
-   efl_event_callback_array_add(p, promise_handling(), h);
-   return efl_promise_future_get(p);
+   return efl_future_Eina_FutureXXX_then(obj, future);
 
  end:
-   efl_del(p);
-   return NULL;
+   return future;
 }
 
 #include "efl_io_manager.eo.c"
diff --git a/src/lib/eio/efl_io_manager.eo b/src/lib/eio/efl_io_manager.eo
index 34e70d985c..a4e8aaddc5 100644
--- a/src/lib/eio/efl_io_manager.eo
+++ b/src/lib/eio/efl_io_manager.eo
@@ -91,7 +91,7 @@ class Efl.Io.Manager (Efl.Loop_User)
 @in file: ptr(Eina.File); [[Eina file handle]]
 // Here we're just interested whether the promise was fullfilled or 
not. No value needed.
   }
-  return: future; [[Close return code]]
+  return: own(ptr(Eina.Future)); [[Close return code]]
 }
   }
 }

-- 




[EGIT] [core/efl] master 01/02: eina: cleanup documentation for promise.

2017-09-12 Thread Cedric BAIL
cedric pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=19e0f35d1c3fc088291ffad590598c599cdc1409

commit 19e0f35d1c3fc088291ffad590598c599cdc1409
Author: Cedric BAIL <ced...@osg.samsung.com>
Date:   Tue Sep 12 10:16:44 2017 -0700

eina: cleanup documentation for promise.
---
 src/lib/eina/eina_promise.h | 8 ++--
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/src/lib/eina/eina_promise.h b/src/lib/eina/eina_promise.h
index caca9574a9..323dee3288 100644
--- a/src/lib/eina/eina_promise.h
+++ b/src/lib/eina/eina_promise.h
@@ -547,9 +547,7 @@ EAPI Eina_Promise *eina_promise_new(Eina_Future_Scheduler 
*scheduler, Eina_Promi
  *
  * @return The data passed to eina_promise_new() or @c NULL on error.
  * @see eina_promise_new()
- * @see eina_promise_resolve()
- * @see eina_promise_reject()
- * @see eina_promise_as_value()
+ * @see eina_promise_data_set()
  */
 EAPI void *eina_promise_data_get(const Eina_Promise *p) EINA_ARG_NONNULL(1);
 
@@ -558,9 +556,7 @@ EAPI void *eina_promise_data_get(const Eina_Promise *p) 
EINA_ARG_NONNULL(1);
  *
  * Set the data passed to eina_promise_new().
  * @see eina_promise_new()
- * @see eina_promise_resolve()
- * @see eina_promise_reject()
- * @see eina_promise_as_value()
+ * @see eina_promise_data_get()
  */
 EAPI void eina_promise_data_set(Eina_Promise *p, void *data) 
EINA_ARG_NONNULL(1);
 

-- 




[EGIT] [core/efl] master 02/02: eio: simplify promise use.

2017-09-12 Thread Cedric BAIL
cedric pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=2e4d357a26950864f6edf03c3b664fcad8b0d036

commit 2e4d357a26950864f6edf03c3b664fcad8b0d036
Author: Cedric BAIL <ced...@osg.samsung.com>
Date:   Tue Sep 12 10:22:21 2017 -0700

eio: simplify promise use.
---
 src/lib/eio/efl_io_manager.c | 10 ++
 1 file changed, 2 insertions(+), 8 deletions(-)

diff --git a/src/lib/eio/efl_io_manager.c b/src/lib/eio/efl_io_manager.c
index dc7b243ecf..e4100810af 100644
--- a/src/lib/eio/efl_io_manager.c
+++ b/src/lib/eio/efl_io_manager.c
@@ -438,11 +438,8 @@ static void
 _future_file_done_cb(void *data, Eio_File *handler)
 {
Eina_Promise *p = data;
-   Eina_Value v = EINA_VALUE_EMPTY;
 
-   eina_value_setup(, EINA_VALUE_TYPE_UINT64);
-   eina_value_set(, handler->length);
-   eina_promise_resolve(p, v);
+   eina_promise_resolve(p, eina_value_uint64_init(handler->length));
 }
 
 static void
@@ -451,11 +448,8 @@ _future_file_error_cb(void *data,
   int error)
 {
Eina_Promise *p = data;
-   Eina_Value v = EINA_VALUE_EMPTY;
 
-   eina_value_setup(, EINA_VALUE_TYPE_ERROR);
-   eina_value_set(, error);
-   eina_promise_resolve(p, v);
+   eina_promise_reject(p, error);
 }
 
 static void

-- 




[EGIT] [core/efl] efl-1.20 01/01: eo: only return NULL when the object is destructed.

2017-09-12 Thread Cedric BAIL
jpeg pushed a commit to branch efl-1.20.

http://git.enlightenment.org/core/efl.git/commit/?id=760ee99306928246169f1081904d58198aa8ac2d

commit 760ee99306928246169f1081904d58198aa8ac2d
Author: Cedric Bail <ced...@osg.samsung.com>
Date:   Sun Aug 13 13:14:31 2017 -0700

eo: only return NULL when the object is destructed.

There is a problem with the previous version. The object can still be
alive due to the use of manual_free in evas. So you wouldn't be able
for example to remove a callback from an object that hasn't been
destroyed yet. If that callback is triggered by the destruction
of the object, you would end up with an unexpected and impossible to
prevent effect of access after free on a callback that you had removed.

Not sure if that still solve the original problem that the code was
trying to prevent in Ecore_Evas.

Signed-off-by: Jean-Philippe Andre <jp.an...@samsung.com>

Fixes T5968

@fix
---
 src/lib/eo/eo.c | 5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/lib/eo/eo.c b/src/lib/eo/eo.c
index 26532b90c7..b759f38429 100644
--- a/src/lib/eo/eo.c
+++ b/src/lib/eo/eo.c
@@ -2015,7 +2015,10 @@ efl_data_scope_safe_get(const Eo *obj_id, const 
Efl_Class *klass_id)
if (!obj_id) return NULL;
EO_OBJ_POINTER_RETURN_VAL(obj_id, obj, NULL);
EO_CLASS_POINTER_GOTO(klass_id, klass, err_klass);
-   if (obj->user_refcount <= 0) goto err_klass;
+   if (obj->destructed)
+ {
+goto err_klass;
+ }
 
if (_eo_class_mro_has(obj->klass, klass))
  ret = _efl_data_scope_safe_get(obj, klass);

-- 




[EGIT] [core/efl] master 02/03: eina: add eina_promise_data_set symetric to eina_promise_data_get.

2017-09-11 Thread Cedric BAIL
cedric pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=fa9acf8b356b4e6d5ae899770b64f98e1f1a67f0

commit fa9acf8b356b4e6d5ae899770b64f98e1f1a67f0
Author: Cedric BAIL <ced...@osg.samsung.com>
Date:   Mon Sep 11 16:09:43 2017 -0700

eina: add eina_promise_data_set symetric to eina_promise_data_get.
---
 src/lib/eina/eina_promise.c |  9 +
 src/lib/eina/eina_promise.h | 11 +++
 2 files changed, 20 insertions(+)

diff --git a/src/lib/eina/eina_promise.c b/src/lib/eina/eina_promise.c
index 1cbc9f274f..1fbac60f65 100644
--- a/src/lib/eina/eina_promise.c
+++ b/src/lib/eina/eina_promise.c
@@ -998,6 +998,15 @@ eina_promise_data_get(const Eina_Promise *p)
return (void *)p->data;
 }
 
+EAPI void
+eina_promise_data_set(Eina_Promise *p,
+  void *data)
+{
+   EINA_SAFETY_ON_NULL_RETURN(p);
+   p->data = data;
+}
+
+
 static Eina_Value
 _eina_future_cb_easy(void *data, const Eina_Value value,
  const Eina_Future *dead_future)
diff --git a/src/lib/eina/eina_promise.h b/src/lib/eina/eina_promise.h
index 9c8fc3a8a2..caca9574a9 100644
--- a/src/lib/eina/eina_promise.h
+++ b/src/lib/eina/eina_promise.h
@@ -554,6 +554,17 @@ EAPI Eina_Promise *eina_promise_new(Eina_Future_Scheduler 
*scheduler, Eina_Promi
 EAPI void *eina_promise_data_get(const Eina_Promise *p) EINA_ARG_NONNULL(1);
 
 /**
+ * Sets the data attached to the promise.
+ *
+ * Set the data passed to eina_promise_new().
+ * @see eina_promise_new()
+ * @see eina_promise_resolve()
+ * @see eina_promise_reject()
+ * @see eina_promise_as_value()
+ */
+EAPI void eina_promise_data_set(Eina_Promise *p, void *data) 
EINA_ARG_NONNULL(1);
+
+/**
  * Resolves a promise.
  *
  *

-- 




[EGIT] [core/efl] master 01/03: eina: fix typos in eina_promise_all_array documentation.

2017-09-11 Thread Cedric BAIL
cedric pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=54083a7835af895d32b230d3f8d4c70aa2798773

commit 54083a7835af895d32b230d3f8d4c70aa2798773
Author: Cedric BAIL <ced...@osg.samsung.com>
Date:   Mon Sep 11 16:08:23 2017 -0700

eina: fix typos in eina_promise_all_array documentation.
---
 src/lib/eina/eina_promise.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/lib/eina/eina_promise.h b/src/lib/eina/eina_promise.h
index db6b6432bd..9c8fc3a8a2 100644
--- a/src/lib/eina/eina_promise.h
+++ b/src/lib/eina/eina_promise.h
@@ -1206,9 +1206,9 @@ EAPI Eina_Future_Desc eina_future_cb_easy_from_desc(const 
Eina_Future_Cb_Easy_De
  * _all_cb(const void *data EINA_UNUSED, const Eina_Value array, const 
Eina_Future *dead EINA_UNUSED)
  * {
  *Eina_Error err;
- *unsined int i, len;
+ *unsigned int i, len;
  *
- *if (v.type == EINA_VALUE_TYPE_ERROR)
+ *if (array.type == EINA_VALUE_TYPE_ERROR)
  * {
  *   eina_value_get(, );
  *   fprintf(stderr, "Could not complete all operations. Reason: %s\n", 
eina_error_msg_get(err));
@@ -1221,7 +1221,7 @@ EAPI Eina_Future_Desc eina_future_cb_easy_from_desc(const 
Eina_Future_Cb_Easy_De
  *   eina_value_array_get(, i, );
  *   if (v.type == EINA_VALUE_TYPE_ERROR)
  *{
- *  eina_value_get(, );
+ *  eina_value_get(, );
  *  fprintf(stderr, "Could not complete operation '%s'. Reason: %s\n", 
_get_operation_name_by_index(i), eina_error_msg_get(err));
  *  continue;
  *}

-- 




[EGIT] [core/efl] master 03/03: eio: first convertion to new future/promise.

2017-09-11 Thread Cedric BAIL
cedric pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=e33d0d99963f16038d33f8d95cf5427e2ed29390

commit e33d0d99963f16038d33f8d95cf5427e2ed29390
Author: Cedric BAIL <ced...@osg.samsung.com>
Date:   Mon Sep 11 16:10:46 2017 -0700

eio: first convertion to new future/promise.
---
 src/lib/eio/efl_io_manager.c   | 51 +++---
 src/lib/eio/efl_io_manager.eo  |  2 +-
 src/tests/eio/eio_test_manager_xattr.c | 43 
 3 files changed, 80 insertions(+), 16 deletions(-)

diff --git a/src/lib/eio/efl_io_manager.c b/src/lib/eio/efl_io_manager.c
index 51043f88c8..dc7b243ecf 100644
--- a/src/lib/eio/efl_io_manager.c
+++ b/src/lib/eio/efl_io_manager.c
@@ -434,7 +434,37 @@ _efl_io_manager_xattr_ls(Eo *obj,
return NULL;
 }
 
-static Efl_Future *
+static void
+_future_file_done_cb(void *data, Eio_File *handler)
+{
+   Eina_Promise *p = data;
+   Eina_Value v = EINA_VALUE_EMPTY;
+
+   eina_value_setup(, EINA_VALUE_TYPE_UINT64);
+   eina_value_set(, handler->length);
+   eina_promise_resolve(p, v);
+}
+
+static void
+_future_file_error_cb(void *data,
+  Eio_File *handler EINA_UNUSED,
+  int error)
+{
+   Eina_Promise *p = data;
+   Eina_Value v = EINA_VALUE_EMPTY;
+
+   eina_value_setup(, EINA_VALUE_TYPE_ERROR);
+   eina_value_set(, error);
+   eina_promise_resolve(p, v);
+}
+
+static void
+_efl_io_manager_future_cancel(void *data, const Eina_Promise *dead_ptr 
EINA_UNUSED)
+{
+   eio_file_cancel(data);
+}
+
+static Eina_Future *
 _efl_io_manager_xattr_set(Eo *obj,
   Efl_Io_Manager_Data *pd EINA_UNUSED,
   const char *path,
@@ -442,28 +472,29 @@ _efl_io_manager_xattr_set(Eo *obj,
   Eina_Binbuf *data,
   Eina_Xattr_Flags flags)
 {
-   Efl_Promise *p;
+   Eina_Promise *p;
+   Eina_Future *future;
Eio_File *h;
 
-   Eo *loop = efl_loop_get(obj);
-   p = efl_add(EFL_PROMISE_CLASS, loop);
+   p = eina_promise_new(efl_loop_future_scheduler_get(obj),
+_efl_io_manager_future_cancel, NULL);
if (!p) return NULL;
+   future = eina_future_new(p);
 
h = eio_file_xattr_set(path, attribute,
   (const char *) eina_binbuf_string_get(data),
   eina_binbuf_length_get(data),
   flags,
-  _file_done_cb,
-  _file_error_cb,
+  _future_file_done_cb,
+  _future_file_error_cb,
   p);
if (!h) goto end;
+   eina_promise_data_set(p, h);
 
-   efl_event_callback_array_add(p, promise_handling(), h);
-   return efl_promise_future_get(p);
+   return efl_future_Eina_FutureXXX_then(obj, future);
 
  end:
-   efl_del(p);
-   return NULL;
+   return future;
 }
 
 static Efl_Future *
diff --git a/src/lib/eio/efl_io_manager.eo b/src/lib/eio/efl_io_manager.eo
index 4e7961aacb..34e70d985c 100644
--- a/src/lib/eio/efl_io_manager.eo
+++ b/src/lib/eio/efl_io_manager.eo
@@ -63,7 +63,7 @@ class Efl.Io.Manager (Efl.Loop_User)
 data: ptr(Eina.Binbuf); [[Data to set as information]]
 flags: Eina.Xattr.Flags; [[Extended attributes flags]]
  }
- return: future; [[Future for asynchronous set operation]]
+ return: own(ptr(Eina.Future)); [[Future for asynchronous set 
operation]]
   }
   get {
  return: future; [[Information]]
diff --git a/src/tests/eio/eio_test_manager_xattr.c 
b/src/tests/eio/eio_test_manager_xattr.c
index b858de6534..3d41316f20 100644
--- a/src/tests/eio/eio_test_manager_xattr.c
+++ b/src/tests/eio/eio_test_manager_xattr.c
@@ -117,6 +117,39 @@ _error_cb(void *data EINA_UNUSED, const Efl_Event *ev)
ecore_main_loop_quit();
 }
 
+static Eina_Value
+_future_all_cb(const void *data,
+   const Eina_Value array,
+   const Eina_Future *dead EINA_UNUSED)
+{
+   Eina_Error err;
+   unsigned int i, len;
+   int *num_of_attr = (int *)data;
+
+   if (array.type == EINA_VALUE_TYPE_ERROR)
+ {
+eina_value_get(, );
+fprintf(stderr, "Something has gone wrong: %s\n", 
eina_error_msg_get(err));
+abort();
+ }
+   len = eina_value_array_count();
+   for (i = 0; i < len; i++)
+ {
+Eina_Value v;
+
+eina_value_array_get(, i, );
+if (v.type == EINA_VALUE_TYPE_ERROR)
+  {
+ eina_value_get(, );
+ fprintf(stderr, "Something has gone wrong: %s\n", 
eina_error_msg_get(err));
+ abort();
+  }
+ }
+
+   fail_if(*num_of_attr != len);
+   return array;
+}
+
 START_TEST(eio_test_job_xattr_set)
 {
char *filename = "eio-tmpfile";
@@ -125,7 +158,7 @@ START_TEST(eio_test_job_xattr_set)
unsigned int i;
Eo *job;
Efl_Future *ls = NULL;
-   Efl_Future **future

[EGIT] [core/efl] master 01/01: evas: actually output might not be initialized until later.

2017-09-11 Thread Cedric BAIL
cedric pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=4cfc8f12fccd6d62228092468ded74a7481ba202

commit 4cfc8f12fccd6d62228092468ded74a7481ba202
Author: Cedric BAIL <ced...@osg.samsung.com>
Date:   Mon Sep 11 11:31:50 2017 -0700

evas: actually output might not be initialized until later.
---
 src/lib/evas/canvas/evas_render.c | 15 +--
 1 file changed, 13 insertions(+), 2 deletions(-)

diff --git a/src/lib/evas/canvas/evas_render.c 
b/src/lib/evas/canvas/evas_render.c
index 481acf2117..a5e0b8031f 100644
--- a/src/lib/evas/canvas/evas_render.c
+++ b/src/lib/evas/canvas/evas_render.c
@@ -3317,6 +3317,9 @@ evas_render_updates_internal(Evas *eo_e,
 
EINA_LIST_FOREACH(e->outputs, l, out)
  {
+// Avoid processing not ready output until they are
+if (!out->output) continue ;
+
 /* phase 6. Initialize output */
 if (out->changed)
   {
@@ -3374,6 +3377,7 @@ evas_render_updates_internal(Evas *eo_e,
/* Find the output the object was in */
EINA_LIST_FOREACH(e->outputs, lo, output)
  {
+if (!output->output) continue ;
 if (!eina_list_data_find(output->planes, obj2)) continue ;
 _evas_object_image_plane_release(eo_obj2, obj2, output);
 break;
@@ -3536,7 +3540,8 @@ evas_render_updates_internal(Evas *eo_e,
 }
   _cb_always_call(eo_e, EVAS_CALLBACK_RENDER_FLUSH_PRE, NULL);
   EINA_LIST_FOREACH(e->outputs, l, out)
-ENFN->output_flush(ENC, out->output, 
EVAS_RENDER_MODE_SYNC);
+if (out->output)
+  ENFN->output_flush(ENC, out->output, 
EVAS_RENDER_MODE_SYNC);
   _cb_always_call(eo_e, EVAS_CALLBACK_RENDER_FLUSH_POST, NULL);
   eina_evlog("-render_output_flush", eo_e, 0.0, NULL);
}
@@ -3550,7 +3555,8 @@ evas_render_updates_internal(Evas *eo_e,
  {
 /* clear redraws */
 EINA_LIST_FOREACH(e->outputs, l, out)
-  ENFN->output_redraws_clear(ENC, out->output);
+  if (out->output)
+ENFN->output_redraws_clear(ENC, out->output);
  }
eina_evlog("-render_clear", eo_e, 0.0, NULL);
 
@@ -3674,6 +3680,7 @@ evas_render_updates_internal(Evas *eo_e,
 post.updated_area = NULL;
 EINA_LIST_FOREACH(e->outputs, l1, out)
   {
+ if (!out->output) continue ;
  EINA_LIST_FOREACH(out->updates, l2, ru)
{
   post.updated_area = eina_list_append(post.updated_area, 
ru->area);
@@ -3733,6 +3740,7 @@ evas_render_wakeup(Evas *eo_e)
eina_spinlock_take(&(evas->render.lock));
EINA_LIST_FOREACH(evas->outputs, l, out)
  {
+if (!out->output) continue ;
 EINA_LIST_FREE(out->updates, ru)
   {
  ret_updates = eina_list_append(ret_updates, ru->area);
@@ -3757,6 +3765,7 @@ evas_render_wakeup(Evas *eo_e)
/* clear redraws */
EINA_LIST_FOREACH(evas->outputs, l, out)
  {
+if (!out->output) continue ;
 ENFN->output_redraws_clear(ENC, out->output);
  }
 
@@ -3827,6 +3836,7 @@ evas_render_pipe_wakeup(void *data)
eina_spinlock_take(&(evas->render.lock));
EINA_LIST_FOREACH(evas->outputs, ll, out)
  {
+if (!out->output) continue ;
 EINA_LIST_FOREACH(out->updates, l, ru)
   {
  eina_evlog("+render_push", evas->evas, 0.0, NULL);
@@ -3910,6 +3920,7 @@ evas_render_updates_internal_wait(Evas *eo_e,
eina_spinlock_take(&(e->render.lock));
EINA_LIST_FOREACH(e->outputs, l, out)
  {
+if (!out->output) continue ;
 ret = eina_list_merge(ret, out->updates);
 out->updates = NULL;
  }

-- 




Re: [E-devel] Proposal: automatic Event->Promise/Future

2017-09-06 Thread Cedric Bail
>  Original Message 
> Subject: [E-devel] Proposal: automatic Event->Promise/Future
> Local Time: September 5, 2017 6:20 AM
> UTC Time: September 5, 2017 1:20 PM
> From: barbi...@gmail.com
> To: edevel 
>
> In many cases we use events as a single shot event, then we
> efl_event_callback_add(), wait for the callback, then
> efl_event_callback_del()...
>
> With the introduction of Promise/Future pair it would be nice to have
> that automated, for example Efl.Io.Copier produces an event "done".
> Most of the times when you"re using Efl.Io.Copier you only want to
> know when it was finished or when it produced an error (event:
> "error").
>
> Then it would improve usability to do something like:
>
> Eina_Future *f = efl_future_event(copier,
> EFL_IO_COPIER_EVENT_DONE, /* success event */
> EFL_IO_COPIER_EVENT_ERROR); /* error event */
> eina_future_chain(f, do_something, do_something_else, on_error);
>
> and all would be handled for you: add/del callbacks, resolve the
> promise and all.

Just a potential idea here, why not reverse the problem. Instead of 
implementing this future on top of this events, why not have a future and have 
this events automatically create a future when someone register a callback on 
it. This avoid completely the problem of dealing with the void* and seems 
really simple to me.

> This is doable, EXCEPT events are "void *" and may go away when the
> event callback returns. However eina_promise_resolve() will postpone
> the future chain to another mainloop iteration -- thus needs a COPY.
> How to copy "void *"?

Filling the Eina_Value_Type from the eolian type seems quite complex to me. It 
would require to give a function to do the copy and destruction of the 
structure in eolian most likely. Also I am not sure it would work in all case, 
some object that we put in the structure are really build to only be alive for 
the duration of the callback (I am thinking about input event here).

Cedric
--
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


[EGIT] [core/efl] master 01/01: eina: properly mark memory for valgrind before accessing it in one_big mempool.

2017-09-05 Thread Cedric BAIL
cedric pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=743c80ad8b86155dd47c711a05ceaab66d90dfc0

commit 743c80ad8b86155dd47c711a05ceaab66d90dfc0
Author: Cedric Bail <ced...@osg.samsung.com>
Date:   Tue Sep 5 17:01:03 2017 -0700

eina: properly mark memory for valgrind before accessing it in one_big 
mempool.
---
 src/modules/eina/mp/one_big/eina_one_big.c | 17 +++--
 1 file changed, 15 insertions(+), 2 deletions(-)

diff --git a/src/modules/eina/mp/one_big/eina_one_big.c 
b/src/modules/eina/mp/one_big/eina_one_big.c
index f3d2e4c29e..c816970621 100644
--- a/src/modules/eina/mp/one_big/eina_one_big.c
+++ b/src/modules/eina/mp/one_big/eina_one_big.c
@@ -162,7 +162,7 @@ eina_one_big_free(void *data, void *ptr)
 pool->usage--;
 
 #ifndef NVALGRIND
-VALGRIND_MEMPOOL_FREE(pool, ptr);
+VALGRIND_MAKE_MEM_NOACCESS(ptr, pool->item_size);
 #endif
  }
else
@@ -210,6 +210,9 @@ eina_one_big_from(void *data, void *ptr)
&& ptr < (void *)(pool->base + (pool->max * pool->item_size)))
  {
 Eina_Trash *t;
+#ifndef NVALGRIND
+Eina_Trash *last = NULL;
+#endif
 // Part of the bigger area
 
 // Check if it is a properly aligned element
@@ -224,7 +227,17 @@ eina_one_big_from(void *data, void *ptr)
 
 // Check if the pointer was freed
 for (t = pool->empty; t != NULL; t = t->next)
-  if (t == ptr) goto end;
+  {
+#ifndef NVALGRIND
+ VALGRIND_MAKE_MEM_DEFINED(t, pool->item_size);
+ if (last) VALGRIND_MAKE_MEM_NOACCESS(last, pool->item_size);
+ last = t;
+#endif
+ if (t == ptr) goto end;
+  }
+#ifndef NVALGRIND
+if (last) VALGRIND_MAKE_MEM_NOACCESS(last, pool->item_size);
+#endif
 
 // Everything seems correct
 r = EINA_TRUE;

-- 




[EGIT] [core/efl] master 01/01: eina: properly track valgrind use of the mempool.

2017-09-04 Thread Cedric BAIL
cedric pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=c9a0237770a7fb0f1d94c9f99b7cab68399a922f

commit c9a0237770a7fb0f1d94c9f99b7cab68399a922f
Author: Cedric Bail <ced...@osg.samsung.com>
Date:   Mon Sep 4 03:08:33 2017 -0700

eina: properly track valgrind use of the mempool.

T5966
---
 .../eina/mp/chained_pool/eina_chained_mempool.c| 18 --
 1 file changed, 16 insertions(+), 2 deletions(-)

diff --git a/src/modules/eina/mp/chained_pool/eina_chained_mempool.c 
b/src/modules/eina/mp/chained_pool/eina_chained_mempool.c
index ec24b3a69f..5913f87d76 100644
--- a/src/modules/eina/mp/chained_pool/eina_chained_mempool.c
+++ b/src/modules/eina/mp/chained_pool/eina_chained_mempool.c
@@ -378,6 +378,9 @@ eina_chained_mempool_from(void *data, void *ptr)
Eina_Rbtree *r;
Chained_Pool *p;
Eina_Trash *t;
+#ifndef NVALGRIND
+   Eina_Trash *last;
+#endif
void *pmem;
Eina_Bool ret = EINA_FALSE;
 
@@ -420,8 +423,19 @@ eina_chained_mempool_from(void *data, void *ptr)
  }
 
// Check if the pointer was freed
-   for (t = p->base; t != NULL; t = t->next)
- if (t == ptr) goto end;
+   for (t = p->base, last = NULL; t != NULL; t = t->next)
+ {
+#ifndef NVALGRIND
+VALGRIND_MAKE_MEM_DEFINED(t, pool->item_alloc);
+if (last) VALGRIND_MAKE_MEM_NOACCESS(last, pool->item_alloc);
+last = t;
+#endif
+
+if (t == ptr) goto end;
+ }
+#ifndef NVALGRIND
+ if (last) VALGRIND_MAKE_MEM_NOACCESS(last, pool->item_alloc);
+#endif
 
// Seems like we have a valid pointer actually
ret = EINA_TRUE;

-- 




[EGIT] [core/efl] master 01/01: evas: we always do use the common backend, so always init.

2017-08-30 Thread Cedric BAIL
cedric pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=4406d7098cb37dc8597589c1254adf8f3b3197a4

commit 4406d7098cb37dc8597589c1254adf8f3b3197a4
Author: Cedric Bail <ced...@osg.samsung.com>
Date:   Wed Aug 30 10:01:17 2017 -0700

evas: we always do use the common backend, so always init.
---
 src/lib/evas/canvas/evas_main.c | 10 --
 src/lib/evas/canvas/evas_out.c  |  6 --
 src/lib/evas/include/evas_private.h |  1 -
 3 files changed, 4 insertions(+), 13 deletions(-)

diff --git a/src/lib/evas/canvas/evas_main.c b/src/lib/evas/canvas/evas_main.c
index cb01effbd8..2b07d3e53c 100644
--- a/src/lib/evas/canvas/evas_main.c
+++ b/src/lib/evas/canvas/evas_main.c
@@ -88,6 +88,8 @@ evas_init(void)
if (!evas_thread_init())
  goto shutdown_filter;
 
+   evas_common_init();
+
eina_log_timing(_evas_log_dom_global,
   EINA_LOG_STATE_STOP,
   EINA_LOG_STATE_INIT);
@@ -138,6 +140,8 @@ evas_shutdown(void)
EINA_LOG_STATE_START,
EINA_LOG_STATE_SHUTDOWN);
 
+   evas_common_shutdown();
+
 #ifdef EVAS_CSERVE2
if (evas_cserve2_use_get())
  evas_cserve2_shutdown();
@@ -405,12 +409,6 @@ next_zombie:
EINA_LIST_FREE(e->outputs, evo) efl_canvas_output_del(evo);
e->engine.func->engine_free(e->backend);
 
-   if (e->common_init)
- {
-e->common_init = 0;
-evas_common_shutdown();
- }
-
for (i = 0; i < e->modifiers.mod.count; i++)
  free(e->modifiers.mod.list[i]);
if (e->modifiers.mod.list) free(e->modifiers.mod.list);
diff --git a/src/lib/evas/canvas/evas_out.c b/src/lib/evas/canvas/evas_out.c
index c5687de4b2..cd7fbaf2d8 100644
--- a/src/lib/evas/canvas/evas_out.c
+++ b/src/lib/evas/canvas/evas_out.c
@@ -152,12 +152,6 @@ efl_canvas_output_engine_info_set(Efl_Canvas_Output 
*output,
  }
else
  {
-if (!e->common_init)
-  {
- e->common_init = 1;
- evas_common_init();
-  }
-
  setup:
 output->output = e->engine.func->output_setup(_evas_engine_context(e), 
info,
   output->geometry.w, 
output->geometry.h);
diff --git a/src/lib/evas/include/evas_private.h 
b/src/lib/evas/include/evas_private.h
index 862e950e14..4364cd6259 100644
--- a/src/lib/evas/include/evas_private.h
+++ b/src/lib/evas/include/evas_private.h
@@ -976,7 +976,6 @@ struct _Evas_Public_Data
Eina_Bool  is_frozen : 1;
Eina_Bool  rendering : 1;
Eina_Bool  render2 : 1;
-   Eina_Bool  common_init : 1;
Eina_Bool  inside_post_render : 1;
Eina_Bool  devices_modified : 1;
 };

-- 




[EGIT] [core/efl] master 01/01: evas: fix color set on Efl.Canvas.Group.

2017-08-29 Thread Cedric BAIL
cedric pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=84cfde45f66383661cab0805bdcbab13c589a449

commit 84cfde45f66383661cab0805bdcbab13c589a449
Author: Cedric BAIL <ced...@osg.samsung.com>
Date:   Tue Aug 29 16:01:10 2017 -0700

evas: fix color set on Efl.Canvas.Group.
---
 src/lib/evas/canvas/evas_object_main.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/lib/evas/canvas/evas_object_main.c 
b/src/lib/evas/canvas/evas_object_main.c
index ea824aca86..2134998e27 100644
--- a/src/lib/evas/canvas/evas_object_main.c
+++ b/src/lib/evas/canvas/evas_object_main.c
@@ -1926,7 +1926,8 @@ _efl_canvas_object_efl_gfx_color_set(Eo *eo_obj, 
Evas_Object_Protected_Data *obj
  }
EINA_COW_STATE_WRITE_END(obj, state_write, cur);
 
-   if (obj->is_smart && obj->smart.smart->smart_class &&
+   if (obj->is_smart && obj->smart.smart &&
+   obj->smart.smart->smart_class &&
obj->smart.smart->smart_class->color_set)
  {
 obj->smart.smart->smart_class->color_set(eo_obj, r, g, b, a);

-- 




[EGIT] [core/efl] efl-1.20 01/01: evas: fix color set on Efl.Canvas.Group.

2017-08-29 Thread Cedric BAIL
cedric pushed a commit to branch efl-1.20.

http://git.enlightenment.org/core/efl.git/commit/?id=6bb5ea076bb07bdc09e4b488a0c849ab867b6617

commit 6bb5ea076bb07bdc09e4b488a0c849ab867b6617
Author: Cedric BAIL <ced...@osg.samsung.com>
Date:   Tue Aug 29 16:01:10 2017 -0700

evas: fix color set on Efl.Canvas.Group.
---
 src/lib/evas/canvas/evas_object_main.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/lib/evas/canvas/evas_object_main.c 
b/src/lib/evas/canvas/evas_object_main.c
index 621d0b5224..543646391e 100644
--- a/src/lib/evas/canvas/evas_object_main.c
+++ b/src/lib/evas/canvas/evas_object_main.c
@@ -1881,7 +1881,8 @@ _efl_canvas_object_efl_gfx_color_set(Eo *eo_obj, 
Evas_Object_Protected_Data *obj
  }
EINA_COW_STATE_WRITE_END(obj, state_write, cur);
 
-   if (obj->is_smart && obj->smart.smart->smart_class &&
+   if (obj->is_smart && obj->smart.smart &&
+   obj->smart.smart->smart_class &&
obj->smart.smart->smart_class->color_set)
  {
 obj->smart.smart->smart_class->color_set(eo_obj, r, g, b, a);

-- 




[EGIT] [core/efl] master 01/01: evas: handle new API use correctly for gl_drm backend.

2017-08-28 Thread Cedric BAIL
cedric pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=5e935a8ca93d3a28c054505802e426624a844711

commit 5e935a8ca93d3a28c054505802e426624a844711
Author: Cedric Bail <ced...@osg.samsung.com>
Date:   Mon Aug 28 11:32:13 2017 -0700

evas: handle new API use correctly for gl_drm backend.
---
 src/modules/evas/engines/gl_drm/evas_engine.c | 6 +-
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/src/modules/evas/engines/gl_drm/evas_engine.c 
b/src/modules/evas/engines/gl_drm/evas_engine.c
index 1993a98449..8f030a9aa1 100644
--- a/src/modules/evas/engines/gl_drm/evas_engine.c
+++ b/src/modules/evas/engines/gl_drm/evas_engine.c
@@ -1114,7 +1114,6 @@ eng_image_native_shutdown(void *engine EINA_UNUSED, 
Evas_Native_Surface_Type typ
 static void *
 eng_image_native_set(void *engine, void *image, void *native)
 {
-   Render_Engine *re;
Outbuf *ob;
Native *n;
Evas_Native_Surface *ns;
@@ -1123,10 +1122,7 @@ eng_image_native_set(void *engine, void *image, void 
*native)
uint32_t texid;
void *wlid, *wl_buf = NULL;
 
-   re = (Render_Engine *)engine;
-   if (!re) return NULL;
-
-   ob = eng_get_ob(re);
+   ob = gl_generic_any_output_get(engine);
if (!ob) return NULL;
 
ns = native;

-- 




[EGIT] [core/efl] master 01/01: evas: fixup warning.

2017-08-28 Thread Cedric BAIL
cedric pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=2ac0a755e108e55411bc5f3da13766f2f0df1d31

commit 2ac0a755e108e55411bc5f3da13766f2f0df1d31
Author: Cedric Bail <ced...@osg.samsung.com>
Date:   Mon Aug 28 11:13:40 2017 -0700

evas: fixup warning.
---
 src/modules/evas/engines/gl_generic/evas_engine.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/modules/evas/engines/gl_generic/evas_engine.c 
b/src/modules/evas/engines/gl_generic/evas_engine.c
index dab17381c5..3bb4ddea9e 100644
--- a/src/modules/evas/engines/gl_generic/evas_engine.c
+++ b/src/modules/evas/engines/gl_generic/evas_engine.c
@@ -1553,7 +1553,7 @@ static int
 eng_gl_surface_destroy(void *engine, void *surface)
 {
EVGL_Surface  *sfc = (EVGL_Surface *)surface;
-   Render_Engine_GL_Generic *e;
+   Render_Engine_GL_Generic *e = engine;
 
EVGLINIT(0);
if (e->current == re) e->current = NULL;

-- 




[EGIT] [core/efl] master 01/01: evas: fix build with egl.

2017-08-25 Thread Cedric BAIL
cedric pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=6d1d47d50d4b7d2cf5c86f3e339dd2e9c9482132

commit 6d1d47d50d4b7d2cf5c86f3e339dd2e9c9482132
Author: Cedric BAIL <ced...@osg.samsung.com>
Date:   Fri Aug 25 15:44:19 2017 -0700

evas: fix build with egl.
---
 src/modules/evas/engines/gl_generic/evas_engine.c  | 21 ++---
 src/modules/evas/engines/wayland_egl/evas_engine.c |  4 ++--
 2 files changed, 20 insertions(+), 5 deletions(-)

diff --git a/src/modules/evas/engines/gl_generic/evas_engine.c 
b/src/modules/evas/engines/gl_generic/evas_engine.c
index 6872fe4007..dab17381c5 100644
--- a/src/modules/evas/engines/gl_generic/evas_engine.c
+++ b/src/modules/evas/engines/gl_generic/evas_engine.c
@@ -137,6 +137,21 @@ _context_stored_reset(void *data EINA_UNUSED, void 
*surface)
 #define CONTEXT_STORE(data, surface, context) _context_store(data, surface, 
context)
 #define CONTEXT_STORED_RESET(data, surface) _context_stored_reset(data, 
surface)
 
+#ifdef GL_GLES
+static void *
+egl_display_get(Render_Engine_GL_Generic *engine)
+{
+   Render_Output_GL_Generic *output;
+   Eina_List *l;
+
+   EINA_LIST_FOREACH(engine->software.outputs, l, output)
+ if (output->software.ob)
+   return output->window_egl_display_get(output->software.ob);
+
+   return NULL;
+}
+#endif
+
 static void *
 eng_engine_new(void)
 {
@@ -796,7 +811,7 @@ eng_image_data_get(void *engine, void *image, int to_write, 
DATA32 **image_data,
   }
 else if ((im->gc->shared->info.sec_image_map) && 
(secsym_eglMapImageSEC))
   {
- void *disp = re->window_egl_display_get(re->software.ob);
+ void *disp = egl_display_get(engine);
  *image_data = im->tex->pt->dyn.data = secsym_eglMapImageSEC(disp,
  
im->tex->pt->dyn.img,
  
EGL_MAP_GL_TEXTURE_DEVICE_CPU_SEC,
@@ -1000,7 +1015,7 @@ eng_image_data_put(void *engine, void *image, DATA32 
*image_data)
 }
   else if (im->gc->shared->info.sec_image_map)
 {
-   void *disp = disp = 
re->window_egl_display_get(re->software.ob);
+   void *disp = disp = egl_display_get(engine);
secsym_eglUnmapImageSEC(disp, im->tex->pt->dyn.img, 
EGL_MAP_GL_TEXTURE_DEVICE_CPU_SEC);
 }
}
@@ -1869,7 +1884,7 @@ eng_gl_surface_query(void *eng, void *surface, int attr, 
void *value)
 Eina_Bool ok;
 void *disp;
 
-disp = re->window_egl_display_get(re->software.ob);
+disp = egl_display_get(engine);
 ok = eglQuerySurface(disp, sfc->pbuffer.native_surface, attr, );
 if (!ok) return EINA_FALSE;
 switch (attr)
diff --git a/src/modules/evas/engines/wayland_egl/evas_engine.c 
b/src/modules/evas/engines/wayland_egl/evas_engine.c
index be5095256e..c640f6ccd0 100644
--- a/src/modules/evas/engines/wayland_egl/evas_engine.c
+++ b/src/modules/evas/engines/wayland_egl/evas_engine.c
@@ -505,9 +505,9 @@ static const EVGL_Interface evgl_funcs =
 static void
 eng_output_info_setup(void *info)
 {
-   Evas_Engine_Info_Wayland *info = info;
+   Evas_Engine_Info_Wayland *in = info;
 
-   info->render_mode = EVAS_RENDER_MODE_BLOCKING;
+   in->render_mode = EVAS_RENDER_MODE_BLOCKING;
 }
 
 static Render_Output_Swap_Mode

-- 




[EGIT] [core/efl] master 47/67: evas: make all window GLES3 or none.

2017-08-25 Thread Cedric BAIL
cedric pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=39d4e343b0ab8ef93c1240454fba75c287e64a07

commit 39d4e343b0ab8ef93c1240454fba75c287e64a07
Author: Cedric BAIL <ced...@osg.samsung.com>
Date:   Fri Aug 25 10:51:59 2017 -0700

evas: make all window GLES3 or none.
---
 src/modules/evas/engines/gl_x11/evas_engine.c |  6 +++---
 src/modules/evas/engines/gl_x11/evas_engine.h |  3 ++-
 src/modules/evas/engines/gl_x11/evas_x_main.c | 17 +
 3 files changed, 14 insertions(+), 12 deletions(-)

diff --git a/src/modules/evas/engines/gl_x11/evas_engine.c 
b/src/modules/evas/engines/gl_x11/evas_engine.c
index c88535304a..0a9a69ce00 100644
--- a/src/modules/evas/engines/gl_x11/evas_engine.c
+++ b/src/modules/evas/engines/gl_x11/evas_engine.c
@@ -503,7 +503,7 @@ evgl_eng_context_create(void *data, void *share_ctx, 
Evas_GL_Context_Version ver
 * But this leads to some issues, namely that the list of extensions is
 * different, and MSAA surfaces also work differently.
 */
-   if (eng_get_ob(re)->gles3 && (version >= EVAS_GL_GLES_2_X))
+   if (gles3_supported && (version >= EVAS_GL_GLES_2_X))
  version = 3;
 
context_attrs[0] = EGL_CONTEXT_CLIENT_VERSION;
@@ -718,7 +718,7 @@ evgl_eng_pbuffer_surface_create(void *data, EVGL_Surface 
*sfc,
  }
 
config_attrs[i++] = EGL_RENDERABLE_TYPE;
-   if (eng_get_ob(re)->gles3)
+   if (gles3_supported)
  config_attrs[i++] = EGL_OPENGL_ES3_BIT_KHR;
else
  config_attrs[i++] = EGL_OPENGL_ES2_BIT;
@@ -2511,7 +2511,7 @@ eng_image_native_set(void *engine, void *image, void 
*native)
  config_attrs[i++] = EGL_STENCIL_SIZE;
  config_attrs[i++] = 0;
  config_attrs[i++] = EGL_RENDERABLE_TYPE;
- if (eng_get_ob(re)->gles3)
+ if (gles3_supported)
config_attrs[i++] = EGL_OPENGL_ES3_BIT_KHR;
  else
config_attrs[i++] = EGL_OPENGL_ES2_BIT;
diff --git a/src/modules/evas/engines/gl_x11/evas_engine.h 
b/src/modules/evas/engines/gl_x11/evas_engine.h
index a37fb6fff9..29c8a190d6 100644
--- a/src/modules/evas/engines/gl_x11/evas_engine.h
+++ b/src/modules/evas/engines/gl_x11/evas_engine.h
@@ -65,7 +65,6 @@ struct _Outbuf
EGLSurface   egl_surface;
EGLConfigegl_config;
EGLDisplay   egl_disp;
-   Eina_Boolgles3 : 1;
 #else
GLXContext   context;
GLXWindowglxwin;
@@ -227,4 +226,6 @@ Eina_Bool __glXMakeContextCurrent(Display *disp, 
GLXDrawable glxwin,
   GLXContext context);
 #endif
 
+extern Eina_Bool gles3_supported;
+
 #endif
diff --git a/src/modules/evas/engines/gl_x11/evas_x_main.c 
b/src/modules/evas/engines/gl_x11/evas_x_main.c
index da38d3e8c9..b9d733e3ed 100644
--- a/src/modules/evas/engines/gl_x11/evas_x_main.c
+++ b/src/modules/evas/engines/gl_x11/evas_x_main.c
@@ -10,10 +10,12 @@ static Eina_TLS _context_key = 0;
 typedef void (*glsym_func_void) ();
 glsym_func_void glsym_evas_gl_common_context_restore_set = NULL;
 
+Eina_Bool gles3_supported = EINA_FALSE;
+
 #ifdef GL_GLES
 typedef EGLContext GLContext;
 typedef EGLConfig GLConfig;
-static int gles3_supported = -1;
+static Eina_Bool gles3_probed = EINA_FALSE;
 #else
 // FIXME: this will only work for 1 display connection (glx land can have > 1)
 typedef GLXContext GLContext;
@@ -239,7 +241,6 @@ eng_window_new(Evas_Engine_Info_GL_X11 *info,
 
 // EGL / GLES
 #ifdef GL_GLES
-   gw->gles3 = gles3_supported;
gw->egl_disp = _x11_eglGetDisplay(gw->disp);
if (!gw->egl_disp)
  {
@@ -277,7 +278,7 @@ eng_window_new(Evas_Engine_Info_GL_X11 *info,
 
 try_gles2:
context_attrs[0] = EGL_CONTEXT_CLIENT_VERSION;
-   context_attrs[1] = gw->gles3 ? 3 : 2;
+   context_attrs[1] = gles3_supported ? 3 : 2;
context_attrs[2] = EGL_NONE;
 
context = _tls_context_get();
@@ -286,11 +287,11 @@ try_gles2:
if (gw->egl_context == EGL_NO_CONTEXT)
  {
 ERR("eglCreateContext() fail. code=%#x", eglGetError());
-if (gw->gles3)
+if (gles3_supported)
   {
  /* Note: this shouldn't happen */
  ERR("Trying again with an Open GL ES 2 context (fallback).");
- gw->gles3 = EINA_FALSE;
+ gles3_supported = EINA_FALSE;
  goto try_gles2;
   }
 eng_window_free(gw);
@@ -873,9 +874,9 @@ eng_best_visual_get(Evas_Engine_Info_GL_X11 *einfo)
  }
 
/* detect GLES 3.x support */
-   if (gles3_supported == -1)
+   if (gles3_probed == EINA_FALSE)
  {
-gles3_supported = EINA_FALSE;
+gles3_probed = EINA_TRUE;
 eglexts = eglQueryString(egl_disp, EGL_EXTENSIONS);
 if (eglexts && strstr(eglexts, "EGL_KHR_create_context"))
   {
@@ -1299,7 +1300,7 @@ eng_gl_context_new(Outbuf *win)
if (!ctx) return

[EGIT] [core/efl] master 40/67: evas: all context function use already ENC.

2017-08-25 Thread Cedric BAIL
cedric pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=3da75d74e3ca3ead9ac2fbcf80ee69b272db47e4

commit 3da75d74e3ca3ead9ac2fbcf80ee69b272db47e4
Author: Cedric BAIL <ced...@osg.samsung.com>
Date:   Fri Aug 25 10:51:31 2017 -0700

evas: all context function use already ENC.
---
 src/lib/evas/canvas/evas_object_image.c   | 14 +-
 src/lib/evas/filters/evas_filter.c| 44 +++
 src/lib/evas/filters/evas_filter_parser.c | 18 ++---
 3 files changed, 38 insertions(+), 38 deletions(-)

diff --git a/src/lib/evas/canvas/evas_object_image.c 
b/src/lib/evas/canvas/evas_object_image.c
index 9ad1d68291..b3bd955820 100644
--- a/src/lib/evas/canvas/evas_object_image.c
+++ b/src/lib/evas/canvas/evas_object_image.c
@@ -140,25 +140,25 @@ evas_object_image_render_prepare(Evas_Object *eo_obj 
EINA_UNUSED, Evas_Object_Pr
  prep = ENFN->image_surface_noscale_new
  (ENC, obj->cur->geometry.w, obj->cur->geometry.h,
  o->cur->has_alpha);
- ctx = ENFN->context_new(ENDT);
- ENFN->context_clip_set(ENDT, ctx, 0, 0,
+ ctx = ENFN->context_new(ENC);
+ ENFN->context_clip_set(ENC, ctx, 0, 0,
 obj->cur->geometry.w,
 obj->cur->geometry.h);
  if (o->cur->has_alpha)
{
-  ENFN->context_render_op_set(ENDT, ctx, EVAS_RENDER_COPY);
-  ENFN->context_color_set(ENDT, ctx, 0, 0, 0, 0);
-  ENFN->rectangle_draw(ENDT, ctx, prep, 0, 0,
+  ENFN->context_render_op_set(ENC, ctx, EVAS_RENDER_COPY);
+  ENFN->context_color_set(ENC, ctx, 0, 0, 0, 0);
+  ENFN->rectangle_draw(ENC, ENDT, ctx, prep, 0, 0,
obj->cur->geometry.w,
obj->cur->geometry.h, do_async);
}
- ENFN->context_render_op_set(ENDT, ctx, EVAS_RENDER_BLEND);
+ ENFN->context_render_op_set(ENC, ctx, EVAS_RENDER_BLEND);
  evas_object_image_render(eo_obj, obj, obj->private_data, ENDT,
   ctx, prep,
   -obj->cur->geometry.x,
   -obj->cur->geometry.y,
   do_async);
- ENFN->context_free(ENDT, ctx);
+ ENFN->context_free(ENC, ctx);
  o->engine_data_prep = prep;
   }
  }
diff --git a/src/lib/evas/filters/evas_filter.c 
b/src/lib/evas/filters/evas_filter.c
index 18969ecaaa..ca03b5dbbe 100644
--- a/src/lib/evas/filters/evas_filter.c
+++ b/src/lib/evas/filters/evas_filter.c
@@ -698,10 +698,10 @@ evas_filter_command_fill_add(Evas_Filter_Context *ctx, 
void *draw_context,
cmd = _command_new(ctx, EVAS_FILTER_MODE_FILL, buf, NULL, buf);
if (!cmd) return NULL;
 
-   ENFN->context_color_get(ENDT, draw_context, , , , );
+   ENFN->context_color_get(ENC, draw_context, , , , );
DRAW_COLOR_SET(R, G, B, A);
 
-   ENFN->context_clip_get(ENDT, draw_context, , , , );
+   ENFN->context_clip_get(ENC, draw_context, , , , );
DRAW_CLIP_SET(cx, cy, cw, ch);
 
XDBG("Add fill %d with color(%d,%d,%d,%d)", buf->id, R, G, B, A);
@@ -896,7 +896,7 @@ evas_filter_command_blur_add(Evas_Filter_Context *ctx, void 
*drawctx,
out = _filter_buffer_get(ctx, outbuf);
EINA_SAFETY_ON_FALSE_GOTO(out, fail);
 
-   ENFN->context_color_get(ENDT, drawctx, , , , );
+   ENFN->context_color_get(ENC, drawctx, , , , );
color = ARGB_JOIN(A, R, G, B);
if (!color)
  {
@@ -914,7 +914,7 @@ evas_filter_command_blur_add(Evas_Filter_Context *ctx, void 
*drawctx,
 
if (in == out) out->dirty = EINA_FALSE;
 
-   render_op = ENFN->context_render_op_get(ENDT, drawctx);
+   render_op = ENFN->context_render_op_get(ENC, drawctx);
override = (render_op == EVAS_RENDER_COPY);
 
switch (type)
@@ -960,12 +960,12 @@ evas_filter_command_blur_add(Evas_Filter_Context *ctx, 
void *drawctx,
 else
   type = EVAS_FILTER_BLUR_BOX;
 
-if (dy) ENFN->context_color_set(ENDT, drawctx, 255, 255, 255, 
255);
+if (dy) ENFN->context_color_set(ENC, drawctx, 255, 255, 255, 
255);
 cmd = evas_filter_command_blur_add(ctx, drawctx, inbuf, 
tmp_out,
type, dx, 0, tmp_ox, 
tmp_oy, 0);
 if (!cmd) goto fail;
 cmd->blur.auto_count = EINA_TRUE;
-if (dy) ENFN->context_color_set(ENDT, drawctx, R, G, B, A);
+if (dy) ENFN->context_color_set(ENC, drawctx, R, G, B, A);
  }
 
// Y box blur
@@ -

[EGIT] [core/efl] master 61/67: evas: make Evas_GL work with multi output.

2017-08-25 Thread Cedric BAIL
cedric pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=545c1a70f4d09a147949b00b06f4bc15a572bce0

commit 545c1a70f4d09a147949b00b06f4bc15a572bce0
Author: Cedric BAIL <ced...@osg.samsung.com>
Date:   Fri Aug 25 10:54:19 2017 -0700

evas: make Evas_GL work with multi output.
---
 src/lib/evas/canvas/evas_object_image.c|  10 +-
 src/lib/evas/canvas/evas_render.c  |   9 ++
 src/lib/evas/include/evas_private.h|   5 +-
 .../engines/gl_generic/Evas_Engine_GL_Generic.h|   8 +-
 src/modules/evas/engines/gl_generic/evas_engine.c  | 174 -
 .../evas/engines/software_generic/evas_engine.c|   1 +
 6 files changed, 160 insertions(+), 47 deletions(-)

diff --git a/src/lib/evas/canvas/evas_object_image.c 
b/src/lib/evas/canvas/evas_object_image.c
index 6d23f1a212..097fb9de5f 100644
--- a/src/lib/evas/canvas/evas_object_image.c
+++ b/src/lib/evas/canvas/evas_object_image.c
@@ -1647,10 +1647,10 @@ evas_process_dirty_pixels(Evas_Object *eo_obj, 
Evas_Object_Protected_Data *obj,
  if (!o->direct_render)
{
   if (ENFN->gl_get_pixels_pre)
-ENFN->gl_get_pixels_pre(output);
+ENFN->gl_get_pixels_pre(engine, output);
   o->pixels->func.get_pixels(o->pixels->func.get_pixels_data, 
eo_obj);
   if (ENFN->gl_get_pixels_post)
-ENFN->gl_get_pixels_post(output);
+ENFN->gl_get_pixels_post(engine, output);
}
 
  if (!(obj->cur->geometry.x == x &&
@@ -1674,6 +1674,8 @@ evas_process_dirty_pixels(Evas_Object *eo_obj, 
Evas_Object_Protected_Data *obj,
   {
  Evas_Native_Surface *ns;
  ns = ENFN->image_native_get(engine, o->engine_data);
+ fprintf(stderr, "direct render\n");
+
  if (ENFN->gl_direct_override_get)
ENFN->gl_direct_override_get(engine, _override, 
_force_off);
  if (ENFN->gl_surface_direct_renderable_get)
@@ -1691,10 +1693,10 @@ evas_process_dirty_pixels(Evas_Object *eo_obj, 
Evas_Object_Protected_Data *obj,
{
   // Auto-fallback to FBO rendering (for perf & power 
consumption)
   if (ENFN->gl_get_pixels_pre)
-ENFN->gl_get_pixels_pre(engine);
+ENFN->gl_get_pixels_pre(engine, output);
   o->pixels->func.get_pixels(o->pixels->func.get_pixels_data, 
obj->object);
   if (ENFN->gl_get_pixels_post)
-ENFN->gl_get_pixels_post(engine);
+ENFN->gl_get_pixels_post(engine, output);
   o->direct_render = EINA_FALSE;
}
   }
diff --git a/src/lib/evas/canvas/evas_render.c 
b/src/lib/evas/canvas/evas_render.c
index 653158874b..1dd914148d 100644
--- a/src/lib/evas/canvas/evas_render.c
+++ b/src/lib/evas/canvas/evas_render.c
@@ -3331,6 +3331,10 @@ evas_render_updates_internal(Evas *eo_e,
  }
eina_evlog("-render_phase5", eo_e, 0.0, NULL);
 
+   /* Define the output for Evas_GL operation */
+   if (ENFN->gl_output_set)
+ ENFN->gl_output_set(ENC, ENDT);
+
/* phase 6. check if video surface should be inlined or stay in their 
hardware plane */
eina_evlog("+render_phase6", eo_e, 0.0, NULL);
alpha = ENFN->canvas_alpha_get(ENDT);
@@ -3571,6 +3575,7 @@ evas_render_updates_internal(Evas *eo_e,
else if (obj->delete_me != 0) obj->delete_me++;
  */
  }
+
for (i = 0; i < e->snapshot_objects.count; i++)
  {
 Evas_Object_Protected_Data *snap;
@@ -3582,6 +3587,10 @@ evas_render_updates_internal(Evas *eo_e,
eina_evlog("-render_post", eo_e, 0.0, NULL);
IFRD(e->active_objects.len, 0, "  ---]\n");
 
+   /* Set back Evas_GL output to NULL */
+   /* if (ENFN->gl_output_set) */
+   /*   ENFN->gl_output_set(ENC, NULL); */
+
/* free our obscuring object list */
OBJS_ARRAY_CLEAN(>obscuring_objects);
 
diff --git a/src/lib/evas/include/evas_private.h 
b/src/lib/evas/include/evas_private.h
index 849a7d5917..146238b5f8 100644
--- a/src/lib/evas/include/evas_private.h
+++ b/src/lib/evas/include/evas_private.h
@@ -1539,6 +1539,7 @@ struct _Evas_Func
int  (*font_right_inset_get)(void *engine, Evas_Font_Set *font, 
const Evas_Text_Props *text_props);
 
/* EFL-GL Glue Layer */
+   void *(*gl_output_set)(void *engine, void *output);
void *(*gl_surface_create)(void *engine, void *config, int w, 
int h);
void *(*gl_pbuffer_surface_create)(void *engine, void *config, int w, 
int h, int const *attrib_list);
int  (*gl_surface_destroy)(void *engine, void *surface);

[EGIT] [core/efl] master 38/67: evas: switch font backend function to rely on engine instead of output.

2017-08-25 Thread Cedric BAIL
cedric pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=ef55155e0e429c810fd2b7d138597389e7fe0be6

commit ef55155e0e429c810fd2b7d138597389e7fe0be6
Author: Cedric BAIL <ced...@osg.samsung.com>
Date:   Fri Aug 25 10:51:24 2017 -0700

evas: switch font backend function to rely on engine instead of output.
---
 src/lib/evas/canvas/evas_object_text.c| 40 +++
 src/lib/evas/canvas/evas_object_textblock.c   | 40 +++
 src/lib/evas/canvas/evas_object_textgrid.c|  4 +--
 src/modules/evas/engines/gl_generic/evas_engine.c |  6 ++--
 4 files changed, 45 insertions(+), 45 deletions(-)

diff --git a/src/lib/evas/canvas/evas_object_text.c 
b/src/lib/evas/canvas/evas_object_text.c
index 42ca752cb4..fc30c74e90 100644
--- a/src/lib/evas/canvas/evas_object_text.c
+++ b/src/lib/evas/canvas/evas_object_text.c
@@ -163,7 +163,7 @@ _evas_object_text_char_coords_get(const Evas_Object *eo_obj,
   (pos < (it->text_pos + it->text_props.text_len)))
   {
  int ret;
- ret = ENFN->font_char_coords_get(ENDT, o->font,
+ ret = ENFN->font_char_coords_get(ENC, o->font,
>text_props, pos - it->text_pos, x, y, w, h);
  if (x) *x += it->x;
  return ret;
@@ -304,7 +304,7 @@ _evas_object_text_last_up_to_pos(const Evas_Object *eo_obj,
   {
  if ((x <= cx) && (cx < x + it->adv))
{
-  pos = it->text_pos + ENFN->font_last_up_to_pos(ENDT,
+  pos = it->text_pos + ENFN->font_last_up_to_pos(ENC,
 o->font,
 >text_props,
 cx - x,
@@ -322,7 +322,7 @@ _evas_object_text_last_up_to_pos(const Evas_Object *eo_obj,
   {
  if ((it->x <= cx) && (cx < it->x + it->adv))
{
-  return it->text_pos + ENFN->font_last_up_to_pos(ENDT,
+  return it->text_pos + ENFN->font_last_up_to_pos(ENC,
 o->font,
 >text_props,
 cx - it->x,
@@ -345,7 +345,7 @@ _evas_object_text_char_at_coords(const Evas_Object *eo_obj,
  {
 if ((it->x <= cx) && (cx < it->x + it->adv))
   {
- return it->text_pos + ENFN->font_char_at_coords_get(ENDT,
+ return it->text_pos + ENFN->font_char_at_coords_get(ENC,
o->font,
>text_props,
cx - it->x,
@@ -504,11 +504,11 @@ _evas_text_efl_text_properties_font_get(Eo *eo_obj 
EINA_UNUSED, Evas_Text_Data *
 static void
 _evas_object_text_item_update_sizes(Evas_Object_Protected_Data *obj, 
Evas_Text_Data *o, Evas_Object_Text_Item *it)
 {
-   ENFN->font_string_size_get(ENDT,
+   ENFN->font_string_size_get(ENC,
  o->font,
  >text_props,
  >w, >h);
-   it->adv = ENFN->font_h_advance_get(ENDT, o->font,
+   it->adv = ENFN->font_h_advance_get(ENC, o->font,
  >text_props);
 }
 
@@ -538,7 +538,7 @@ _evas_object_text_item_new(Evas_Object_Protected_Data *obj,
 
if (fi)
  {
-ENFN->font_text_props_info_create(ENDT,
+ENFN->font_text_props_info_create(ENC,
   fi, str + pos, >text_props,
   o->bidi_par_props, it->text_pos, len, EVAS_TEXT_PROPS_MODE_SHAPE,
   o->cur.fdesc->lang);
@@ -619,7 +619,7 @@ _layout_ellipsis_item_new(Evas_Object_Protected_Data *obj, 
Evas_Text_Data *o)
 
if (o->font)
  {
-(void) ENFN->font_run_end_get(ENDT, o->font, _fi, _fi,
+(void) ENFN->font_run_end_get(ENC, o->font, _fi, _fi,
   script, _ellip_str, 1);
  ellip_ti = _evas_object_text_item_new(obj, o, cur_fi,
_ellip_str, script, 0, 0, len);
@@ -780,7 +780,7 @@ _evas_object_text_layout(Evas_Object *eo_obj, 
Evas_Text_Data *o, Eina_Unicode *t
   if (o->font)
 {
run_len = ENFN->font_run_end_get
- (ENDT, o->font, _fi, _fi,
+ (ENC, o->font, _fi, _fi,
   script, text + pos, script_len);
 }
 #ifdef BIDI_SUPPORT
@@ -887,7 +887,7 @@ _evas_object_text_layout(Evas_Object *eo_obj, 
Evas_Text_Data *o, Eina_Unicode *t
}
  if (itr && (itr != start_ellip_it))
{
-  int cut = ENFN->font_last_up_to_pos(ENDT,
+  int cut = ENFN->font_last_up_to_pos(ENC,
 o->font,
 >text_props,
 ellipsis_coord -

[EGIT] [core/efl] master 54/67: evas: remove unused engine data from error set/get code.

2017-08-25 Thread Cedric BAIL
cedric pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=84c6d3332e2243b6074c995c05c8b50e29cefb4d

commit 84c6d3332e2243b6074c995c05c8b50e29cefb4d
Author: Cedric BAIL <ced...@osg.samsung.com>
Date:   Fri Aug 25 10:52:26 2017 -0700

evas: remove unused engine data from error set/get code.
---
 src/modules/evas/engines/gl_common/evas_gl_api.c   |  2 +-
 .../evas/engines/gl_common/evas_gl_api_ext.c   | 10 ++--
 .../evas/engines/gl_common/evas_gl_api_gles1.c |  4 +-
 .../evas/engines/gl_common/evas_gl_common.h|  4 +-
 src/modules/evas/engines/gl_common/evas_gl_core.c  | 50 
 src/modules/evas/engines/gl_generic/evas_engine.c  |  2 +-
 src/modules/evas/engines/gl_x11/evas_engine.c  | 70 +++---
 7 files changed, 71 insertions(+), 71 deletions(-)

diff --git a/src/modules/evas/engines/gl_common/evas_gl_api.c 
b/src/modules/evas/engines/gl_common/evas_gl_api.c
index 25d5d6aed4..ceaab2bc9f 100644
--- a/src/modules/evas/engines/gl_common/evas_gl_api.c
+++ b/src/modules/evas/engines/gl_common/evas_gl_api.c
@@ -1357,7 +1357,7 @@ _evgl_glGetString(GLenum name)
  {
 ERR("Current context is NULL, not calling glGetString");
 // This sets evas_gl_error_get instead of eglGetError...
-evas_gl_common_error_set(NULL, EVAS_GL_BAD_CONTEXT);
+evas_gl_common_error_set(EVAS_GL_BAD_CONTEXT);
 return NULL;
  }
 
diff --git a/src/modules/evas/engines/gl_common/evas_gl_api_ext.c 
b/src/modules/evas/engines/gl_common/evas_gl_api_ext.c
index 1169e79922..4c63761ae5 100644
--- a/src/modules/evas/engines/gl_common/evas_gl_api_ext.c
+++ b/src/modules/evas/engines/gl_common/evas_gl_api_ext.c
@@ -139,7 +139,7 @@ _evgl_egl_display_get(const char *function, Evas_GL *evgl)
if (!evgl_engine || !evgl_engine->funcs || !evgl_engine->funcs->display_get)
  {
 ERR("%s: Invalid Engine... (Can't acccess EGL Display)\n", function);
-evas_gl_common_error_set(NULL, EVAS_GL_BAD_DISPLAY);
+evas_gl_common_error_set(EVAS_GL_BAD_DISPLAY);
 return EGL_NO_DISPLAY;
  }
 
@@ -147,7 +147,7 @@ _evgl_egl_display_get(const char *function, Evas_GL *evgl)
  {
 if (evgl) goto fallback;
 ERR("%s: Unable to execute GL command. Error retrieving tls", 
function);
-evas_gl_common_error_set(NULL, EVAS_GL_NOT_INITIALIZED);
+evas_gl_common_error_set(EVAS_GL_NOT_INITIALIZED);
 return EGL_NO_DISPLAY;
  }
 
@@ -155,7 +155,7 @@ _evgl_egl_display_get(const char *function, Evas_GL *evgl)
  {
 if (evgl) goto fallback;
 ERR("%s: no current engine set; ensure you've called 
evas_gl_make_current()", function);
-evas_gl_common_error_set(NULL, EVAS_GL_NOT_INITIALIZED);
+evas_gl_common_error_set(EVAS_GL_NOT_INITIALIZED);
 return EGL_NO_DISPLAY;
  }
 
@@ -238,7 +238,7 @@ _evgl_evasglCreateImageForContext(Evas_GL *evasgl, 
Evas_GL_Context *evasctx,
if (!dpy || !evasgl)
  {
 ERR("Evas_GL can not be NULL here.");
-evas_gl_common_error_set(NULL, EVAS_GL_BAD_DISPLAY);
+evas_gl_common_error_set(EVAS_GL_BAD_DISPLAY);
 return NULL;
  }
 
@@ -254,7 +254,7 @@ _evgl_evasglDestroyImage(EvasGLImage image)
if (!img)
  {
 ERR("EvasGLImage is NULL.");
-evas_gl_common_error_set(NULL, EVAS_GL_BAD_PARAMETER);
+evas_gl_common_error_set(EVAS_GL_BAD_PARAMETER);
 return;
  }
 
diff --git a/src/modules/evas/engines/gl_common/evas_gl_api_gles1.c 
b/src/modules/evas/engines/gl_common/evas_gl_api_gles1.c
index 0619c037ea..7117751156 100644
--- a/src/modules/evas/engines/gl_common/evas_gl_api_gles1.c
+++ b/src/modules/evas/engines/gl_common/evas_gl_api_gles1.c
@@ -1120,14 +1120,14 @@ _evgl_gles1_glGetString(GLenum name)
  {
 ERR("Current context is NULL, not calling glGetString");
 // This sets evas_gl_error_get instead of glGetError...
-evas_gl_common_error_set(NULL, EVAS_GL_BAD_CONTEXT);
+evas_gl_common_error_set(EVAS_GL_BAD_CONTEXT);
 return NULL;
  }
 
if (rsc->current_ctx->version != EVAS_GL_GLES_1_X)
  {
 ERR("Invalid context version %d", (int) rsc->current_ctx->version);
-evas_gl_common_error_set(NULL, EVAS_GL_BAD_MATCH);
+evas_gl_common_error_set(EVAS_GL_BAD_MATCH);
 return NULL;
  }
 
diff --git a/src/modules/evas/engines/gl_common/evas_gl_common.h 
b/src/modules/evas/engines/gl_common/evas_gl_common.h
index d9deb990de..6124cf8da0 100644
--- a/src/modules/evas/engines/gl_common/evas_gl_common.h
+++ b/src/modules/evas/engines/gl_common/evas_gl_common.h
@@ -564,8 +564,8 @@ EAPI void 
evas_gl_preload_render_unlock(evas_gl_make_current_cb make_cur
 EAPI void evas_gl_preload_render_relax(evas_gl_make_current_cb 
make_current, void *engine_data);

[EGIT] [core/efl] master 07/67: evas: Render_Engine_GL_Generic is actually an output.

2017-08-25 Thread Cedric BAIL
cedric pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=6f3980f55e50c06a80507fee23b26538f9c21758

commit 6f3980f55e50c06a80507fee23b26538f9c21758
Author: Cedric BAIL <ced...@osg.samsung.com>
Date:   Fri Aug 25 10:48:00 2017 -0700

evas: Render_Engine_GL_Generic is actually an output.
---
 src/modules/evas/engines/eglfs/evas_engine.c   |   2 +-
 src/modules/evas/engines/gl_cocoa/evas_engine.h|   2 +-
 src/modules/evas/engines/gl_drm/evas_engine.h  |   2 +-
 .../engines/gl_generic/Evas_Engine_GL_Generic.h|   8 +-
 .../evas/engines/gl_generic/evas_ector_gl_buffer.c |   4 +-
 .../gl_generic/evas_ector_gl_image_buffer.c|   4 +-
 src/modules/evas/engines/gl_generic/evas_engine.c  | 102 ++---
 .../engines/gl_generic/filters/gl_engine_filter.h  |  16 ++--
 .../engines/gl_generic/filters/gl_filter_blend.c   |   4 +-
 .../engines/gl_generic/filters/gl_filter_blur.c|   4 +-
 .../engines/gl_generic/filters/gl_filter_curve.c   |   4 +-
 .../gl_generic/filters/gl_filter_displace.c|   4 +-
 .../engines/gl_generic/filters/gl_filter_fill.c|   4 +-
 .../engines/gl_generic/filters/gl_filter_mask.c|   4 +-
 src/modules/evas/engines/gl_sdl/evas_engine.h  |   2 +-
 src/modules/evas/engines/gl_x11/evas_engine.c  |   6 +-
 src/modules/evas/engines/wayland_egl/evas_engine.c |   2 +-
 17 files changed, 87 insertions(+), 87 deletions(-)

diff --git a/src/modules/evas/engines/eglfs/evas_engine.c 
b/src/modules/evas/engines/eglfs/evas_engine.c
index 6147775b5c..b1f3f3cf98 100644
--- a/src/modules/evas/engines/eglfs/evas_engine.c
+++ b/src/modules/evas/engines/eglfs/evas_engine.c
@@ -33,7 +33,7 @@ static int gl_wins = 0;
 typedef struct _Render_Engine Render_Engine;
 struct _Render_Engine
 {
-   Render_Engine_GL_Generic generic;
+   Render_Output_GL_Generic generic;
 };
 
 typedef struct _Native Native;
diff --git a/src/modules/evas/engines/gl_cocoa/evas_engine.h 
b/src/modules/evas/engines/gl_cocoa/evas_engine.h
index 2af2d6adbb..d7eafb06ec 100644
--- a/src/modules/evas/engines/gl_cocoa/evas_engine.h
+++ b/src/modules/evas/engines/gl_cocoa/evas_engine.h
@@ -43,7 +43,7 @@ typedef struct _Render_Engine Render_Engine;
 
 struct _Render_Engine
 {
-   Render_Engine_GL_Generic generic;
+   Render_Output_GL_Generic generic;
 
Outbuf *win;
 };
diff --git a/src/modules/evas/engines/gl_drm/evas_engine.h 
b/src/modules/evas/engines/gl_drm/evas_engine.h
index 1a888d2e8e..e6a77bf3f6 100644
--- a/src/modules/evas/engines/gl_drm/evas_engine.h
+++ b/src/modules/evas/engines/gl_drm/evas_engine.h
@@ -68,7 +68,7 @@ extern Evas_GL_Preload_Render_Call 
glsym_evas_gl_preload_render_unlock;
 typedef struct _Render_Engine Render_Engine;
 struct _Render_Engine
 {
-   Render_Engine_GL_Generic generic;
+   Render_Output_GL_Generic generic;
 
Ecore_Drm2_Device *dev;
 };
diff --git a/src/modules/evas/engines/gl_generic/Evas_Engine_GL_Generic.h 
b/src/modules/evas/engines/gl_generic/Evas_Engine_GL_Generic.h
index d236a22130..89bcbf6b8a 100644
--- a/src/modules/evas/engines/gl_generic/Evas_Engine_GL_Generic.h
+++ b/src/modules/evas/engines/gl_generic/Evas_Engine_GL_Generic.h
@@ -8,7 +8,7 @@
 #include "../gl_common/evas_gl_core.h"
 #include "../gl_common/evas_gl_core_private.h"
 
-typedef struct _Render_Engine_GL_Generic Render_Engine_GL_Generic;
+typedef struct _Render_Output_GL_Generic Render_Output_GL_Generic;
 typedef struct _Context_3D Context_3D;
 
 typedef void (*Window_Use)(Outbuf *ob);
@@ -17,7 +17,7 @@ typedef void *(*Window_EGL_Display_Get)(Outbuf *ob);
 typedef Context_3D *(*Window_GL_Context_New)(Outbuf *ob);
 typedef void (*Window_GL_Context_Use)(Context_3D *ctx);
 
-struct _Render_Engine_GL_Generic
+struct _Render_Output_GL_Generic
 {
Render_Output_Software_Generic software;
 
@@ -41,7 +41,7 @@ struct _Render_Engine_GL_Generic
 };
 
 static inline Eina_Bool
-evas_render_engine_gl_generic_init(Render_Engine_GL_Generic *re,
+evas_render_engine_gl_generic_init(Render_Output_GL_Generic *re,
Outbuf *ob,
Outbuf_Swap_Mode_Get outbuf_swap_mode_get,
Outbuf_Get_Rot outbuf_get_rot,
@@ -100,7 +100,7 @@ evas_render_engine_gl_generic_init(Render_Engine_GL_Generic 
*re,
 }
 
 static inline void
-evas_render_engine_software_gl_get_pixels_set(Render_Engine_GL_Generic *re,
+evas_render_engine_software_gl_get_pixels_set(Render_Output_GL_Generic *re,
   Evas_Object_Image_Pixels_Get_Cb 
get_pixels,
   void *get_pixels_data,
   Evas_Object *obj)
diff --git a/src/modules/evas/engines/gl_generic/evas_ector_gl_buffer.c 
b/src/modules/evas/engines/gl_generic/evas_ector_gl_buffer.c
index bf32548e8c..84087a5657 100644
--- a/src/modules/evas/engines/gl_generic/evas_ector_gl_buffer.c
+++ 

[EGIT] [core/efl] master 52/67: evas: no more use of ENDT outside of evas_render.

2017-08-25 Thread Cedric BAIL
cedric pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=dcfebcd2d9e672db5f7cf7fd59dad0a2b26bea11

commit dcfebcd2d9e672db5f7cf7fd59dad0a2b26bea11
Author: Cedric BAIL <ced...@osg.samsung.com>
Date:   Fri Aug 25 10:52:18 2017 -0700

evas: no more use of ENDT outside of evas_render.
---
 src/lib/evas/include/evas_private.h | 1 -
 1 file changed, 1 deletion(-)

diff --git a/src/lib/evas/include/evas_private.h 
b/src/lib/evas/include/evas_private.h
index c0cdd12ac8..5d40c32b5a 100644
--- a/src/lib/evas/include/evas_private.h
+++ b/src/lib/evas/include/evas_private.h
@@ -48,7 +48,6 @@
 
 /* save typing */
 #define ENFN obj->layer->evas->engine.func
-#define ENDT _evas_default_output_get(obj->layer->evas)
 #define ENC  _evas_engine_context(obj->layer->evas)
 
 #include "canvas/evas_text.eo.h"

-- 




[EGIT] [core/efl] master 36/67: evas: convert evas backend cache function call to use Engine context.

2017-08-25 Thread Cedric BAIL
cedric pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=d8871109d392eb35cf97487976816d61e81c954c

commit d8871109d392eb35cf97487976816d61e81c954c
Author: Cedric BAIL <ced...@osg.samsung.com>
Date:   Fri Aug 25 10:51:17 2017 -0700

evas: convert evas backend cache function call to use Engine context.
---
 src/modules/evas/engines/gl_generic/evas_engine.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/modules/evas/engines/gl_generic/evas_engine.c 
b/src/modules/evas/engines/gl_generic/evas_engine.c
index 125528ef64..e7d73dca0f 100644
--- a/src/modules/evas/engines/gl_generic/evas_engine.c
+++ b/src/modules/evas/engines/gl_generic/evas_engine.c
@@ -1344,7 +1344,7 @@ eng_image_cache_flush(void *engine)
Evas_Engine_GL_Context *gl_context;
int tmp_size;
 
-   gl_context = gl_generic_context_get(engine);
+   gl_context = gl_generic_context_find(engine);
if (!gl_context) return;
 
tmp_size = evas_common_image_get_cache();
@@ -1359,7 +1359,7 @@ eng_image_cache_set(void *engine, int bytes)
 {
Evas_Engine_GL_Context *gl_context;
 
-   gl_context = gl_generic_context_get(engine);
+   gl_context = gl_generic_context_find(engine);
 
evas_common_image_set_cache(bytes);
evas_common_rgba_image_scalecache_size_set(bytes);

-- 




[EGIT] [core/efl] master 63/67: evas gl: fix glview by avoiding make current

2017-08-25 Thread Cedric BAIL
cedric pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=7453980ccf2acf755c37846285af01e1301b1f44

commit 7453980ccf2acf755c37846285af01e1301b1f44
Author: Cedric BAIL <ced...@osg.samsung.com>
Date:   Fri Aug 25 10:54:55 2017 -0700

evas gl: fix glview by avoiding make current

gl_generic_context_find() returns the gl shared context struct but
this is not just a read-only operation. It in turn calls window_use
which may call make_current. This can invalidate the work of evas gl
when the API tried to switch to a specific context.

This fixes evas gl with multiple outputs.

Signed-off-by: Cedric BAIL <ced...@osg.samsung.com>
---
 .../engines/gl_generic/Evas_Engine_GL_Generic.h|  8 +--
 src/modules/evas/engines/gl_generic/evas_engine.c  | 60 +++---
 src/modules/evas/engines/gl_x11/evas_engine.c  |  2 +-
 3 files changed, 34 insertions(+), 36 deletions(-)

diff --git a/src/modules/evas/engines/gl_generic/Evas_Engine_GL_Generic.h 
b/src/modules/evas/engines/gl_generic/Evas_Engine_GL_Generic.h
index 7fdea3021b..a7effafde0 100644
--- a/src/modules/evas/engines/gl_generic/Evas_Engine_GL_Generic.h
+++ b/src/modules/evas/engines/gl_generic/Evas_Engine_GL_Generic.h
@@ -104,10 +104,10 @@ 
evas_render_engine_gl_generic_init(Render_Engine_Software_Generic *engine,
 }
 
 static inline Evas_Engine_GL_Context *
-gl_generic_context_get(Render_Output_GL_Generic *output)
+gl_generic_context_get(Render_Output_GL_Generic *output, Eina_Bool use)
 {
if (!output->software.ob) return NULL;
-   output->window_use(output->software.ob);
+   if (use) output->window_use(output->software.ob);
return output->window_gl_context_get(output->software.ob);
 
 }
@@ -121,7 +121,7 @@ gl_generic_window_use(void *engine)
 }
 
 static inline Evas_Engine_GL_Context *
-gl_generic_context_find(Render_Engine_GL_Generic *engine)
+gl_generic_context_find(Render_Engine_GL_Generic *engine, Eina_Bool use)
 {
Render_Output_GL_Generic *output;
Evas_Engine_GL_Context *r = NULL;
@@ -129,7 +129,7 @@ gl_generic_context_find(Render_Engine_GL_Generic *engine)
 
EINA_LIST_FOREACH(engine->software.outputs, l, output)
  {
-r = gl_generic_context_get(output);
+r = gl_generic_context_get(output, use);
 if (r) return r;
  }
 
diff --git a/src/modules/evas/engines/gl_generic/evas_engine.c 
b/src/modules/evas/engines/gl_generic/evas_engine.c
index 60f65ef264..6872fe4007 100644
--- a/src/modules/evas/engines/gl_generic/evas_engine.c
+++ b/src/modules/evas/engines/gl_generic/evas_engine.c
@@ -165,7 +165,7 @@ eng_rectangle_draw(void *engine EINA_UNUSED, void *data, 
void *context, void *su
Evas_Engine_GL_Context *gl_context;
Render_Output_GL_Generic *re = data;
 
-   gl_context = gl_generic_context_get(re);
+   gl_context = gl_generic_context_get(re, 1);
evas_gl_common_context_target_surface_set(gl_context, surface);
gl_context->dc = context;
evas_gl_common_rect_draw(gl_context, x, y, w, h);
@@ -177,7 +177,7 @@ eng_line_draw(void *engine EINA_UNUSED, void *data, void 
*context, void *surface
Evas_Engine_GL_Context *gl_context;
Render_Output_GL_Generic *re = data;
 
-   gl_context = gl_generic_context_get(re);
+   gl_context = gl_generic_context_get(re, 1);
evas_gl_common_context_target_surface_set(gl_context, surface);
gl_context->dc = context;
evas_gl_common_line_draw(gl_context, p1x, p1y, p2x, p2y);
@@ -201,7 +201,7 @@ eng_polygon_draw(void *engine EINA_UNUSED, void *data, void 
*context, void *surf
Evas_Engine_GL_Context *gl_context;
Render_Output_GL_Generic *re = data;
 
-   gl_context = gl_generic_context_get(re);
+   gl_context = gl_generic_context_get(re, 1);
evas_gl_common_context_target_surface_set(gl_context, surface);
gl_context->dc = context;
evas_gl_common_poly_draw(gl_context, polygon, x, y);
@@ -432,7 +432,7 @@ eng_image_native_set(void *engine, void *image, void 
*native)
   unsigned int tex = 0;
   unsigned int fbo = 0;
 
-  gl_context = gl_generic_context_find(engine);
+  gl_context = gl_generic_context_find(engine, 1);
 
   if (!im)
 {
@@ -549,7 +549,7 @@ eng_image_load(void *engine, const char *file, const char 
*key, int *error, Evas
Evas_Engine_GL_Context *gl_context;
 
*error = EVAS_LOAD_ERROR_NONE;
-   gl_context = gl_generic_context_find(engine);
+   gl_context = gl_generic_context_find(engine, 1);
return evas_gl_common_image_load(gl_context, file, key, lo, error);
 }
 
@@ -559,7 +559,7 @@ eng_image_mmap(void *engine, Eina_File *f, const char *key, 
int *error, Evas_Ima
Evas_Engine_GL_Context *gl_context;
 
*error = EVAS_LOAD_ERROR_NONE;
-   gl_context = gl_generic_context_find(engine);
+   gl_context = gl_generic_context_find(engine, 1);
return evas_gl_common_image_mmap(gl_context, f, key, lo, error);
 }
 
@@ -568,7 +568,7 @@ eng_image_new_from_data(void *engine

[EGIT] [core/efl] master 66/67: evas: no more ENDT.

2017-08-25 Thread Cedric BAIL
cedric pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=4b1505c294250e93a22b9055573dfb77fe52f133

commit 4b1505c294250e93a22b9055573dfb77fe52f133
Author: Cedric BAIL <ced...@osg.samsung.com>
Date:   Fri Aug 25 10:55:06 2017 -0700

evas: no more ENDT.
---
 src/lib/evas/canvas/evas_render.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/src/lib/evas/canvas/evas_render.c 
b/src/lib/evas/canvas/evas_render.c
index 79f7a92091..1d42b8c5e8 100644
--- a/src/lib/evas/canvas/evas_render.c
+++ b/src/lib/evas/canvas/evas_render.c
@@ -97,7 +97,6 @@ rend_dbg(const char *txt)
 
 /* save typing */
 #undef ENFN
-#undef ENDT
 #undef ENC
 #define ENFN evas->engine.func
 #define ENC _evas_engine_context(evas)

-- 




[EGIT] [core/efl] master 49/67: evas: remove unecessary use of output in filter code.

2017-08-25 Thread Cedric BAIL
cedric pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=68b846c1f46146a1ef921168c2cb926945ff387c

commit 68b846c1f46146a1ef921168c2cb926945ff387c
Author: Cedric BAIL <ced...@osg.samsung.com>
Date:   Fri Aug 25 10:52:07 2017 -0700

evas: remove unecessary use of output in filter code.
---
 src/lib/evas/filters/evas_filter_private.h |  3 ---
 .../software_generic/filters/evas_filter_blend.c   | 22 +++---
 2 files changed, 11 insertions(+), 14 deletions(-)

diff --git a/src/lib/evas/filters/evas_filter_private.h 
b/src/lib/evas/filters/evas_filter_private.h
index 5cc22befe0..074fdbde2e 100644
--- a/src/lib/evas/filters/evas_filter_private.h
+++ b/src/lib/evas/filters/evas_filter_private.h
@@ -76,13 +76,10 @@ extern int _evas_filter_log_dom;
 
 // Helpers
 #undef ENFN
-#undef ENDT
 #undef ENC
 #define ENFN ctx->evas->engine.func
-#define ENDT _evas_default_output_get(ctx->evas)
 #define ENC _evas_engine_context(ctx->evas)
 
-#define CMD_ENDT _evas_default_output_get(cmd->ctx->evas)
 #define CMD_ENC _evas_engine_context(cmd->ctx->evas)
 #define FB_ENC _evas_engine_context(fb->ctx->evas)
 
diff --git 
a/src/modules/evas/engines/software_generic/filters/evas_filter_blend.c 
b/src/modules/evas/engines/software_generic/filters/evas_filter_blend.c
index 57c9567c78..5573010b9f 100644
--- a/src/modules/evas/engines/software_generic/filters/evas_filter_blend.c
+++ b/src/modules/evas/engines/software_generic/filters/evas_filter_blend.c
@@ -5,8 +5,8 @@
 // Use a better formula than R+G+B for rgba to alpha conversion (RGB to YCbCr)
 #define RGBA2ALPHA_WEIGHTED 1
 
-typedef Eina_Bool (*draw_func) (void *data, void *context, const void 
*src_map, unsigned int src_stride, void *dst_map, unsigned int dst_stride, int 
src_x, int src_y, int src_w, int src_h, int dst_x, int dst_y, int dst_w, int 
dst_h, int smooth, Eina_Bool do_async);
-static Eina_Bool _mapped_blend(void *data, void *drawctx, const void *src_map, 
unsigned int src_stride, void *dst_map, unsigned int dst_stride, 
Evas_Filter_Fill_Mode fillmode, int sx, int sy, int sw, int sh, int dx, int dy, 
int dw, int dh, draw_func image_draw);
+typedef Eina_Bool (*draw_func) (void *context, const void *src_map, unsigned 
int src_stride, void *dst_map, unsigned int dst_stride, int src_x, int src_y, 
int src_w, int src_h, int dst_x, int dst_y, int dst_w, int dst_h, int smooth, 
Eina_Bool do_async);
+static Eina_Bool _mapped_blend(void *drawctx, const void *src_map, unsigned 
int src_stride, void *dst_map, unsigned int dst_stride, Evas_Filter_Fill_Mode 
fillmode, int sx, int sy, int sw, int sh, int dx, int dy, int dw, int dh, 
draw_func image_draw);
 
 struct Filter_Blend_Draw_Context
 {
@@ -17,7 +17,7 @@ struct Filter_Blend_Draw_Context
 #define LINELEN(stride, ptr) (stride / (sizeof(*ptr)))
 
 static Eina_Bool
-_image_draw_cpu_alpha_alpha(void *data EINA_UNUSED, void *context,
+_image_draw_cpu_alpha_alpha(void *context,
 const void *src_map, unsigned int src_stride,
 void *dst_map, unsigned int dst_stride,
 int src_x, int src_y, int src_w, int src_h,
@@ -52,7 +52,7 @@ _image_draw_cpu_alpha_alpha(void *data EINA_UNUSED, void 
*context,
 }
 
 static Eina_Bool
-_image_draw_cpu_alpha_rgba(void *data EINA_UNUSED, void *context,
+_image_draw_cpu_alpha_rgba(void *context,
const void *src_map, unsigned int src_stride,
void *dst_map, unsigned int dst_stride,
int src_x, int src_y, int src_w, int src_h,
@@ -87,7 +87,7 @@ _image_draw_cpu_alpha_rgba(void *data EINA_UNUSED, void 
*context,
 }
 
 static Eina_Bool
-_image_draw_cpu_rgba_rgba(void *data EINA_UNUSED, void *context,
+_image_draw_cpu_rgba_rgba(void *context,
   const void *src_map, unsigned int src_stride,
   void *dst_map, unsigned int dst_stride,
   int src_x, int src_y, int src_w, int src_h,
@@ -125,7 +125,7 @@ _image_draw_cpu_rgba_rgba(void *data EINA_UNUSED, void 
*context,
 }
 
 static Eina_Bool
-_image_draw_cpu_rgba_alpha(void *data EINA_UNUSED, void *context EINA_UNUSED,
+_image_draw_cpu_rgba_alpha(void *context EINA_UNUSED,
const void *src_map, unsigned int src_stride,
void *dst_map, unsigned int dst_stride,
int src_x, int src_y, int src_w, int src_h,
@@ -222,8 +222,8 @@ _filter_blend_cpu_generic_do(Evas_Filter_Command *cmd, 
draw_func image_draw)
dc.rop = cmd->draw.rop;
dc.color = ARGB_JOIN(cmd->draw.A, cmd->draw.R, cmd->draw.G, cmd->draw.B);
 
-   ret = _mapped_blend(CMD_ENDT, , src, src_stride, dst, dst_stride, 
cmd->draw.fillmode,
-sx, sy, sw, sh, dx, dy, dw, dh, image_draw);
+   ret = _mapped_blend(, src, src_stride, dst, dst_stride, 
cmd->draw

[EGIT] [core/efl] master 62/67: evas: remove dead code to improve readability.

2017-08-25 Thread Cedric BAIL
cedric pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=cce4dcc58e8b9bdda8caa15ed824b0dbc23a3fb1

commit cce4dcc58e8b9bdda8caa15ed824b0dbc23a3fb1
Author: Cedric BAIL <ced...@osg.samsung.com>
Date:   Fri Aug 25 10:54:52 2017 -0700

evas: remove dead code to improve readability.
---
 src/lib/evas/canvas/evas_render.c | 27 ---
 1 file changed, 27 deletions(-)

diff --git a/src/lib/evas/canvas/evas_render.c 
b/src/lib/evas/canvas/evas_render.c
index 1dd914148d..2527243ef2 100644
--- a/src/lib/evas/canvas/evas_render.c
+++ b/src/lib/evas/canvas/evas_render.c
@@ -288,7 +288,6 @@ static Eina_Bool
 _evas_render_had_map(Evas_Object_Protected_Data *obj)
 {
return ((obj->map->prev.map) && (obj->map->prev.usemap));
-   //   return ((!obj->map->cur.map) && (obj->prev->usemap));
 }
 
 static Eina_Bool
@@ -514,7 +513,6 @@ _evas_render_phase1_direct(Evas_Public_Data *e,
   {
  if (obj->is_smart)
{
-  //  obj->func->render_pre(eo_obj);
}
  else if (evas_object_is_visible(eo_obj, obj) &&
   ((obj->rect_del) ||
@@ -1674,9 +1672,6 @@ _mask_apply_inside_proxy(Evas_Proxy_Render_Data 
*proxy_render_data,
 
// FIXME: Need to implement a logic similar to _proxy_context_clip
return EINA_FALSE;
-
-   //if (mask == proxy_render_data->src_obj->cur->clipper) return EINA_TRUE;
-   //return _mask_apply_inside_proxy(proxy_render_data, mask->cur->clipper);
 }
 
 static void
@@ -2097,9 +2092,6 @@ evas_render_mapped(Evas_Public_Data *evas, Evas_Object 
*eo_obj,
 
 // FIXME: needs to cache these maps and
 // keep them only rendering updates
-//ENFN->image_free
-//  (ENDT, obj->map->surface);
-//obj->map->surface = NULL;
  }
else // not "has map"
  {
@@ -3390,9 +3382,6 @@ evas_render_updates_internal(Evas *eo_e,
}
eina_evlog("-render_phase6", eo_e, 0.0, NULL);
 
-   /* save this list */
-   /*obscuring_objects_orig = obscuring_objects; */
-   /*obscuring_objects = NULL; */
/* phase 7. go thru each update rect and render objects in it*/
eina_evlog("+render_phase7", eo_e, 0.0, NULL);
if (do_draw)
@@ -3567,13 +3556,6 @@ evas_render_updates_internal(Evas *eo_e,
  obj->restack = EINA_FALSE;
  evas_object_change_reset(obj);
   }
-/* moved to other pre-process phase 1
-   if (obj->delete_me == 2)
-   {
-   delete_objects = eina_list_append(delete_objects, obj);
-   }
-   else if (obj->delete_me != 0) obj->delete_me++;
- */
  }
 
for (i = 0; i < e->snapshot_objects.count; i++)
@@ -3648,15 +3630,6 @@ evas_render_updates_internal(Evas *eo_e,
 OBJS_ARRAY_CLEAN(>snapshot_objects);
 eina_array_foreach(>clip_changes, _evas_clip_changes_free, NULL);
 eina_array_clean(>clip_changes);
-/* we should flush here and have a mempool system for this
-eina_inarray_flush(>active_objects);
-eina_array_flush(>render_objects);
-eina_array_flush(>restack_objects);
-eina_array_flush(>delete_objects);
-eina_array_flush(>obscuring_objects);
-eina_array_flush(>temporary_objects);
-eina_array_flush(>clip_changes);
- */
 e->invalidate = EINA_TRUE;
  }
 

-- 




[EGIT] [core/efl] master 60/67: evas: reorder rendering phase to group output related operation.

2017-08-25 Thread Cedric BAIL
cedric pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=7f8bbe497275ae229562fbf50ac682c1a983b476

commit 7f8bbe497275ae229562fbf50ac682c1a983b476
Author: Cedric BAIL <ced...@osg.samsung.com>
Date:   Fri Aug 25 10:52:52 2017 -0700

evas: reorder rendering phase to group output related operation.
---
 src/lib/evas/canvas/evas_render.c | 118 +++---
 1 file changed, 60 insertions(+), 58 deletions(-)

diff --git a/src/lib/evas/canvas/evas_render.c 
b/src/lib/evas/canvas/evas_render.c
index 17e4a1b368..653158874b 100644
--- a/src/lib/evas/canvas/evas_render.c
+++ b/src/lib/evas/canvas/evas_render.c
@@ -3224,59 +3224,6 @@ evas_render_updates_internal(Evas *eo_e,
 eina_evlog("-render_phase1", eo_e, 0.0, NULL);
  }
 
-   /* phase 1.5. check if the video should be inlined or stay in their overlay 
*/
-   alpha = ENFN->canvas_alpha_get(ENDT);
-
-   EINA_LIST_FOREACH(e->video_objects, ll, eo_obj)
- {
-Efl_Canvas_Output *output;
-Evas_Object_Protected_Data *obj = efl_data_scope_get(eo_obj, 
EFL_CANVAS_OBJECT_CLASS);
-
-output = _evas_overlay_output_find(e, obj);
-
-/* we need the surface to be transparent to display the underlying 
overlay */
-if (output && alpha && _evas_render_can_use_overlay(e, eo_obj, output))
-  _evas_object_image_video_overlay_show(eo_obj);
-else
-  _evas_object_image_video_overlay_hide(eo_obj);
- }
-
-   /* check if individual image objects can be dropped into hardware planes */
-   if (ENFN->image_plane_assign)
- EINA_INARRAY_FOREACH(>active_objects, ao)
-   {
-  Evas_Object_Protected_Data *obj2;
-  Evas_Object *eo_obj2;
-  Efl_Canvas_Output *output;
-  Eina_List *lo;
-
-  obj2 = ao->obj;
-  eo_obj2 = obj2->object;
-
-  if (!efl_isa(eo_obj2, EFL_CANVAS_IMAGE_INTERNAL_CLASS)) continue;
-
-  if (evas_object_image_video_surface_get(eo_obj2)) continue;
-
-  /* Find the output the object was in */
-  EINA_LIST_FOREACH(e->outputs, lo, output)
-{
-   if (!eina_list_data_find(output->planes, obj2)) continue ;
-   _evas_object_image_plane_release(eo_obj2, obj2, output);
-   break;
-}
-
-  /* A video object can only be in one output at a time, check that 
first */
-  output = _evas_overlay_output_find(e, obj2);
-  if (!output) continue ;
-
-  if (!_evas_render_can_use_overlay(e, eo_obj2, output))
-{
-   /* This may free up things temporarily allocated by
-* _can_use_overlay() testing in the engine */
-   _evas_object_image_plane_release(eo_obj2, obj2, output);
-}
-   }
-
eina_evlog("+render_phase1_direct", eo_e, 0.0, NULL);
/* phase 1.8. pre render for proxy */
_evas_render_phase1_direct(e, >active_objects, >restack_objects,
@@ -3384,11 +3331,66 @@ evas_render_updates_internal(Evas *eo_e,
  }
eina_evlog("-render_phase5", eo_e, 0.0, NULL);
 
+   /* phase 6. check if video surface should be inlined or stay in their 
hardware plane */
+   eina_evlog("+render_phase6", eo_e, 0.0, NULL);
+   alpha = ENFN->canvas_alpha_get(ENDT);
+
+   EINA_LIST_FOREACH(e->video_objects, ll, eo_obj)
+ {
+Efl_Canvas_Output *output;
+Evas_Object_Protected_Data *obj = efl_data_scope_get(eo_obj, 
EFL_CANVAS_OBJECT_CLASS);
+
+output = _evas_overlay_output_find(e, obj);
+
+/* we need the surface to be transparent to display the underlying 
overlay */
+if (output && alpha && _evas_render_can_use_overlay(e, eo_obj, output))
+  _evas_object_image_video_overlay_show(eo_obj);
+else
+  _evas_object_image_video_overlay_hide(eo_obj);
+ }
+
+   /* check if individual image objects can be dropped into hardware planes */
+   if (ENFN->image_plane_assign)
+ EINA_INARRAY_FOREACH(>active_objects, ao)
+   {
+  Evas_Object_Protected_Data *obj2;
+  Evas_Object *eo_obj2;
+  Efl_Canvas_Output *output;
+  Eina_List *lo;
+
+  obj2 = ao->obj;
+  eo_obj2 = obj2->object;
+
+  if (!efl_isa(eo_obj2, EFL_CANVAS_IMAGE_INTERNAL_CLASS)) continue;
+
+  if (evas_object_image_video_surface_get(eo_obj2)) continue;
+
+  /* Find the output the object was in */
+  EINA_LIST_FOREACH(e->outputs, lo, output)
+{
+   if (!eina_list_data_find(output->planes, obj2)) continue ;
+   _evas_object_image_plane_release(eo_obj2, obj2, output);
+   break;
+}
+
+  /* A video object can only be in one output at a time, check that 
first */
+  output = _evas_overlay_output_find(e, obj2);
+  if (!ou

[EGIT] [core/efl] master 30/67: evas: switch all image animation engine related function to use ENC instead of an output.

2017-08-25 Thread Cedric BAIL
cedric pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=2fb6aa87fe304d12433f9a6709c578ab59fd2aa4

commit 2fb6aa87fe304d12433f9a6709c578ab59fd2aa4
Author: Cedric BAIL <ced...@osg.samsung.com>
Date:   Fri Aug 25 10:50:40 2017 -0700

evas: switch all image animation engine related function to use ENC instead 
of an output.
---
 src/lib/evas/canvas/efl_canvas_image.c | 18 +-
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/src/lib/evas/canvas/efl_canvas_image.c 
b/src/lib/evas/canvas/efl_canvas_image.c
index b4a52ac32a..a5485650e3 100644
--- a/src/lib/evas/canvas/efl_canvas_image.c
+++ b/src/lib/evas/canvas/efl_canvas_image.c
@@ -468,7 +468,7 @@ _evas_image_animated_get(const Eo *eo_obj)
if (!ENFN->image_animated_get)
  return EINA_FALSE;
 
-   return ENFN->image_animated_get(ENDT, o->engine_data);
+   return ENFN->image_animated_get(ENC, o->engine_data);
 }
 
 EOLIAN static Eina_Bool
@@ -488,7 +488,7 @@ _evas_image_animated_frame_count_get(const Eo *eo_obj)
  return -1;
 
obj = efl_data_scope_get(eo_obj, EFL_CANVAS_OBJECT_CLASS);
-   return ENFN->image_animated_frame_count_get(ENDT, o->engine_data);
+   return ENFN->image_animated_frame_count_get(ENC, o->engine_data);
 }
 
 EOLIAN static int
@@ -507,7 +507,7 @@ _evas_image_animated_loop_type_get(const Eo *eo_obj)
!evas_object_image_animated_get(eo_obj))
  return EFL_IMAGE_ANIMATED_LOOP_HINT_NONE;
 
-   return (Efl_Image_Animated_Loop_Hint) 
ENFN->image_animated_loop_type_get(ENDT, o->engine_data);
+   return (Efl_Image_Animated_Loop_Hint) 
ENFN->image_animated_loop_type_get(ENC, o->engine_data);
 }
 
 EOLIAN static Efl_Image_Animated_Loop_Hint
@@ -526,7 +526,7 @@ _evas_image_animated_loop_count_get(const Eo *eo_obj)
!evas_object_image_animated_get(eo_obj))
  return -1;
 
-   return ENFN->image_animated_loop_count_get(ENDT, o->engine_data);
+   return ENFN->image_animated_loop_count_get(ENC, o->engine_data);
 }
 
 EOLIAN static int
@@ -546,11 +546,11 @@ _evas_image_animated_frame_duration_get(const Eo *eo_obj, 
int start_frame, int f
!ENFN->image_animated_frame_duration_get)
  return -1.0;
 
-   frame_count = ENFN->image_animated_frame_count_get(ENDT, o->engine_data);
+   frame_count = ENFN->image_animated_frame_count_get(ENC, o->engine_data);
if ((start_frame + frame_num) > frame_count)
  return -1.0;
 
-   return ENFN->image_animated_frame_duration_get(ENDT, o->engine_data, 
start_frame, frame_num);
+   return ENFN->image_animated_frame_duration_get(ENC, o->engine_data, 
start_frame, frame_num);
 }
 
 EOLIAN static double
@@ -578,15 +578,15 @@ _evas_image_animated_frame_set(Eo *eo_obj, int 
frame_index)
  return EINA_FALSE;
 
if (!ENFN->image_animated_frame_set) return EINA_FALSE;
-   ENFN->image_animated_frame_set(ENDT, o->engine_data, frame_index);
-   //   if (!ENFN->image_animated_frame_set(ENDT, o->engine_data, 
frame_index)) return;
+   ENFN->image_animated_frame_set(ENC, o->engine_data, frame_index);
+   //   if (!ENFN->image_animated_frame_set(ENC, o->engine_data, frame_index)) 
return;
 
EINA_COW_WRITE_BEGIN(evas_object_image_state_cow, o->prev, 
Evas_Object_Image_State, prev_write)
  prev_write->frame = o->cur->frame;
EINA_COW_WRITE_END(evas_object_image_state_cow, o->prev, prev_write);
 
EINA_COW_IMAGE_STATE_WRITE_BEGIN(o, state_write)
- state_write->frame = frame_index;
+ state_write->frame = frame_index;
EINA_COW_IMAGE_STATE_WRITE_END(o, state_write);
 
o->changed = EINA_TRUE;

-- 




[EGIT] [core/efl] master 65/67: evas: move updates to be per output.

2017-08-25 Thread Cedric BAIL
cedric pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=7fc0ebee37489aab2d98184746fb213ea9ed428f

commit 7fc0ebee37489aab2d98184746fb213ea9ed428f
Author: Cedric BAIL <ced...@osg.samsung.com>
Date:   Fri Aug 25 10:55:02 2017 -0700

evas: move updates to be per output.
---
 src/lib/evas/canvas/evas_render.c   | 91 ++---
 src/lib/evas/include/evas_private.h |  2 +-
 2 files changed, 55 insertions(+), 38 deletions(-)

diff --git a/src/lib/evas/canvas/evas_render.c 
b/src/lib/evas/canvas/evas_render.c
index a2d30daeb1..79f7a92091 100644
--- a/src/lib/evas/canvas/evas_render.c
+++ b/src/lib/evas/canvas/evas_render.c
@@ -100,7 +100,6 @@ rend_dbg(const char *txt)
 #undef ENDT
 #undef ENC
 #define ENFN evas->engine.func
-#define ENDT _evas_default_output_get(evas)
 #define ENC _evas_engine_context(evas)
 
 typedef struct _Render_Updates Render_Updates;
@@ -117,8 +116,10 @@ struct _Cutout_Margin
int l, r, t, b;
 };
 
+static void
+evas_render_pipe_wakeup(void *data);
 static Eina_Bool
-evas_render_updates_internal(Evas *eo_e, unsigned char make_updates, unsigned 
char do_draw, Evas_Render_Done_Cb done_func, void *done_data, Eina_Bool 
do_async);
+evas_render_updates_internal(Evas *eo_e, unsigned char make_updates, unsigned 
char do_draw, Eina_Bool do_async);
 static void
 evas_render_mask_subrender(Evas_Public_Data *evas,
void *output,
@@ -3125,8 +3126,6 @@ static Eina_Bool
 evas_render_updates_internal(Evas *eo_e,
  unsigned char make_updates,
  unsigned char do_draw,
- Evas_Render_Done_Cb done_func,
- void *done_data,
  Eina_Bool do_async)
 {
// FIXME: handle multiple output
@@ -3484,7 +3483,7 @@ evas_render_updates_internal(Evas *eo_e,
   //XXX: need a way of reffing output surfaces
   NEW_RECT(ru->area, ux, uy, uw, uh);
   eina_spinlock_take(&(e->render.lock));
-  e->render.updates = eina_list_append(e->render.updates, ru);
+  out->updates = eina_list_append(out->updates, ru);
   eina_spinlock_release(&(e->render.lock));
}
 
@@ -3517,7 +3516,7 @@ evas_render_updates_internal(Evas *eo_e,
   e->rendering = EINA_TRUE;
   _rendering_evases = eina_list_append(_rendering_evases, e);
   _cb_always_call(eo_e, EVAS_CALLBACK_RENDER_FLUSH_PRE, NULL);
-  evas_thread_queue_flush((Evas_Thread_Command_Cb)done_func, 
done_data);
+  
evas_thread_queue_flush((Evas_Thread_Command_Cb)evas_render_pipe_wakeup, e);
   eina_evlog("-render_output_async_flush", eo_e, 0.0, NULL);
}
  else
@@ -3659,16 +3658,19 @@ evas_render_updates_internal(Evas *eo_e,
if (!do_async || !rendering)
  {
 Evas_Event_Render_Post post;
-Eina_List *l;
+Eina_List *l, *ll;
 Render_Updates *ru;
 
  nothing2render:
 post.updated_area = NULL;
-EINA_LIST_FOREACH(e->render.updates, l, ru)
+EINA_LIST_FOREACH(e->outputs, ll, out)
   {
- post.updated_area = eina_list_append(post.updated_area, ru->area);
- //XXX: need a way of unreffing output surfaces
- ru->surface = NULL;
+ EINA_LIST_FOREACH(out->updates, l, ru)
+   {
+  post.updated_area = eina_list_append(post.updated_area, 
ru->area);
+  //XXX: need a way of unreffing output surfaces
+  ru->surface = NULL;
+   }
   }
 eina_spinlock_take(&(e->render.lock));
 e->inside_post_render = EINA_TRUE;
@@ -3710,20 +3712,24 @@ evas_render_wakeup(Evas *eo_e)
Evas_Event_Render_Post post;
Render_Updates *ru;
Eina_Bool haveup = EINA_FALSE;
-   Eina_List *ret_updates = NULL;
+   Eina_List *ret_updates = NULL, *l;
Evas_Post_Render_Job *job;
Evas_Public_Data *evas;
+   Efl_Canvas_Output *out;
Eina_Inlist *jobs_il;
 
evas = efl_data_scope_get(eo_e, EVAS_CANVAS_CLASS);
 
eina_evlog("+render_wakeup", eo_e, 0.0, NULL);
eina_spinlock_take(&(evas->render.lock));
-   EINA_LIST_FREE(evas->render.updates, ru)
+   EINA_LIST_FOREACH(evas->outputs, l, out)
  {
-ret_updates = eina_list_append(ret_updates, ru->area);
-free(ru);
-haveup = EINA_TRUE;
+EINA_LIST_FREE(out->updates, ru)
+  {
+ ret_updates = eina_list_append(ret_updates, ru->area);
+ free(ru);
+ haveup = EINA_TRUE;
+  }
  }
eina_spinlock_release(&(evas->render.lock));
 
@@ -3740,7 +3746,10 @@ evas_render_wakeup(Evas *eo_e)
  }
 
/* clear

[EGIT] [core/efl] master 43/67: evas: convert Evas3D use of output to engine when meaningful.

2017-08-25 Thread Cedric BAIL
cedric pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=bf0ad88144d034c2661187df7f59b44acdc7ef45

commit bf0ad88144d034c2661187df7f59b44acdc7ef45
Author: Cedric BAIL <ced...@osg.samsung.com>
Date:   Fri Aug 25 10:51:44 2017 -0700

evas: convert Evas3D use of output to engine when meaningful.
---
 src/modules/evas/engines/gl_generic/evas_engine.c | 16 
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/src/modules/evas/engines/gl_generic/evas_engine.c 
b/src/modules/evas/engines/gl_generic/evas_engine.c
index 56f49392e0..93932ec4ff 100644
--- a/src/modules/evas/engines/gl_generic/evas_engine.c
+++ b/src/modules/evas/engines/gl_generic/evas_engine.c
@@ -2240,9 +2240,9 @@ eng_context_dup(void *engine EINA_UNUSED, void *context)
 }
 
 static void
-eng_context_3d_use(void *engine)
+eng_context_3d_use(void *output)
 {
-   Render_Output_GL_Generic *re = engine;
+   Render_Output_GL_Generic *re = output;
 
if (!re->context_3d)
  re->context_3d = re->window_gl_context_new(re->software.ob);
@@ -2250,9 +2250,9 @@ eng_context_3d_use(void *engine)
 }
 
 static E3D_Renderer *
-eng_renderer_3d_get(void *engine)
+eng_renderer_3d_get(void *output)
 {
-   Render_Output_GL_Generic *re = engine;
+   Render_Output_GL_Generic *re = output;
 
if (!re->renderer_3d)
  re->renderer_3d = e3d_renderer_new();
@@ -2305,16 +2305,16 @@ eng_image_drawable_set(void *engine, void *image, void 
*drawable)
 }
 
 static void
-eng_drawable_scene_render(void *engine, void *data EINA_UNUSED, void 
*drawable, void *scene_data)
+eng_drawable_scene_render(void *engine EINA_UNUSED, void *data, void 
*drawable, void *scene_data)
 {
Evas_Engine_GL_Context *gl_context;
E3D_Renderer *renderer = NULL;
 
-   gl_context = gl_generic_context_get(engine);
+   gl_context = gl_generic_context_get(data);
evas_gl_common_context_flush(gl_context);
 
-   eng_context_3d_use(engine);
-   renderer = eng_renderer_3d_get(engine);
+   eng_context_3d_use(data);
+   renderer = eng_renderer_3d_get(data);
e3d_drawable_scene_render(drawable, renderer, scene_data);
 }
 

-- 




[EGIT] [core/efl] master 64/67: evas: decorrelate canvas size from output size.

2017-08-25 Thread Cedric BAIL
cedric pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=e7527e06d6e28c251f48cb774796c807ea6c8ea6

commit e7527e06d6e28c251f48cb774796c807ea6c8ea6
Author: Cedric BAIL <ced...@osg.samsung.com>
Date:   Fri Aug 25 10:54:59 2017 -0700

evas: decorrelate canvas size from output size.
---
 src/lib/evas/canvas/evas_main.c | 15 ++--
 src/lib/evas/canvas/evas_out.c  | 14 ---
 src/lib/evas/canvas/evas_render.c   | 47 +
 src/lib/evas/include/evas_private.h |  4 +++-
 4 files changed, 54 insertions(+), 26 deletions(-)

diff --git a/src/lib/evas/canvas/evas_main.c b/src/lib/evas/canvas/evas_main.c
index 9a8e1992d2..cb01effbd8 100644
--- a/src/lib/evas/canvas/evas_main.c
+++ b/src/lib/evas/canvas/evas_main.c
@@ -461,7 +461,7 @@ next_zombie:
 EAPI Evas_Engine_Info *
 evas_engine_info_get(const Evas *obj)
 {
-   const Evas_Public_Data *e = efl_data_scope_get(obj, EVAS_CANVAS_CLASS);
+   Evas_Public_Data *e = efl_data_scope_get(obj, EVAS_CANVAS_CLASS);
Efl_Canvas_Output *output;
 
output = eina_list_data_get(e->outputs);
@@ -470,6 +470,7 @@ evas_engine_info_get(const Evas *obj)
 output = efl_canvas_output_add((Evas*) obj);
  }
if (!output) return NULL;
+   e->output.legacy = EINA_TRUE;
 
return efl_canvas_output_engine_info_get(output);
 }
@@ -483,6 +484,8 @@ evas_engine_info_set(Evas *obj, Evas_Engine_Info *info)
output = eina_list_data_get(e->outputs);
if (!output) return EINA_FALSE;
if (!info) return EINA_FALSE;
+   efl_canvas_output_view_set(output, 0, 0,
+  e->output.w, e->output.h);
return efl_canvas_output_engine_info_set(output, info);
 }
 
@@ -1106,9 +1109,17 @@ evas_output_size_set(Evas *eo_e, int w, int h)
evas_canvas_async_block(e);
e->output.w = w;
e->output.h = h;
-   e->output.changed = 1;
e->output_validity++;
e->changed = 1;
+
+   if (e->output.legacy)
+ {
+Efl_Canvas_Output *output;
+
+output = eina_list_data_get(e->outputs);
+efl_canvas_output_view_set(output, 0, 0, w, h);
+ }
+
evas_render_invalidate(eo_e);
 }
 
diff --git a/src/lib/evas/canvas/evas_out.c b/src/lib/evas/canvas/evas_out.c
index 42f8ed4401..c5687de4b2 100644
--- a/src/lib/evas/canvas/evas_out.c
+++ b/src/lib/evas/canvas/evas_out.c
@@ -50,6 +50,7 @@ efl_canvas_output_add(Evas *canvas)
if (!r) return NULL;
 
efl_wref_add(canvas, >canvas);
+   r->changed = EINA_TRUE;
 
e = _efl_canvas_output_async_block(r);
// Track this output in Evas
@@ -97,11 +98,18 @@ efl_canvas_output_view_set(Efl_Canvas_Output *output,
e = _efl_canvas_output_async_block(output);
if (!e) return ;
 
+   if (output->geometry.x != x) goto changed;
+   if (output->geometry.y != y) goto changed;
+   if (output->geometry.w != w) goto changed;
+   if (output->geometry.h != h) goto changed;
+   return;
+
+ changed:
output->geometry.x = x;
output->geometry.y = y;
output->geometry.w = w;
output->geometry.h = h;
-   // XXX: tell engine about any output size etc. changes
+   output->changed = EINA_TRUE;
// XXX: tell evas to add damage if viewport loc/size changed
 }
 
@@ -131,7 +139,7 @@ efl_canvas_output_engine_info_set(Efl_Canvas_Output *output,
 if (e->engine.func->output_update)
   {
  e->engine.func->output_update(_evas_engine_context(e), 
output->output, info,
-   e->output.w, e->output.h);
+   output->geometry.w, 
output->geometry.h);
   }
 else
   {
@@ -152,7 +160,7 @@ efl_canvas_output_engine_info_set(Efl_Canvas_Output *output,
 
  setup:
 output->output = e->engine.func->output_setup(_evas_engine_context(e), 
info,
-  e->output.w, 
e->output.h);
+  output->geometry.w, 
output->geometry.h);
  }
 
return !!output->output;
diff --git a/src/lib/evas/canvas/evas_render.c 
b/src/lib/evas/canvas/evas_render.c
index 2527243ef2..a2d30daeb1 100644
--- a/src/lib/evas/canvas/evas_render.c
+++ b/src/lib/evas/canvas/evas_render.c
@@ -3133,6 +3133,7 @@ evas_render_updates_internal(Evas *eo_e,
Evas_Object *eo_obj;
Evas_Object_Protected_Data *obj;
Evas_Public_Data *evas, *e;
+   Efl_Canvas_Output *out;
Eina_List *ll;
Eina_Bool clean_them = EINA_FALSE;
Eina_Bool rendering = EINA_FALSE;
@@ -3250,11 +3251,6 @@ evas_render_updates_internal(Evas *eo_e,
  {
 ENFN->output_redraws_rect_add(ENC, 0, 0, e->output.w, e->output.h);
  }
-   if (e->output.changed)
- {
-ENFN->output_resize(ENC, ENDT, e->output.w, e->output.h);
-ENFN->output_redraws_rect_add(ENC, 0, 0, e->out

[EGIT] [core/efl] master 22/67: evas: refactor gdi to have less useless function redirection.

2017-08-25 Thread Cedric BAIL
cedric pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=aa88a4f6ab06fd68da44d74121a8f4a6af58ebdd

commit aa88a4f6ab06fd68da44d74121a8f4a6af58ebdd
Author: Cedric BAIL <ced...@osg.samsung.com>
Date:   Fri Aug 25 10:49:37 2017 -0700

evas: refactor gdi to have less useless function redirection.
---
 .../evas/engines/software_gdi/evas_engine.c| 50 +++---
 1 file changed, 15 insertions(+), 35 deletions(-)

diff --git a/src/modules/evas/engines/software_gdi/evas_engine.c 
b/src/modules/evas/engines/software_gdi/evas_engine.c
index e399194d86..462a37942e 100644
--- a/src/modules/evas/engines/software_gdi/evas_engine.c
+++ b/src/modules/evas/engines/software_gdi/evas_engine.c
@@ -15,34 +15,32 @@ struct _Render_Engine
Render_Output_Software_Generic generic;
 };
 
-
+/* engine api this module provides */
 static void *
-_output_setup(int  width,
-  int  height,
-  int  rot,
-  HWND window,
-  int  depth,
-  unsigned int borderless,
-  unsigned int fullscreen,
-  unsigned int region)
+eng_output_setup(void *engine EINA_UNUSED, void *in, unsigned int w, unsigned 
int h)
 {
+   Evas_Engine_Info_Software_Gdi *info = in;
Render_Engine *re;
Outbuf *ob;
 
re = calloc(1, sizeof(Render_Engine));
-   if (!re)
- return NULL;
+   if (!re) return NULL;
 
evas_software_gdi_outbuf_init();
 
-   if (width <= 0)
- width = 1;
+   if (w <= 0)
+ w = 1;
if (height <= 0)
- height = 1;
+ h = 1;
 
-   ob = evas_software_gdi_outbuf_setup(width, height, rot,
+   ob = evas_software_gdi_outbuf_setup(w, h,
+   info->info.rotation,
OUTBUF_DEPTH_INHERIT,
-   window, depth, borderless, fullscreen, 
region,
+   info->info.window,
+   info->info.depth,
+   info->info.borderless,
+   info->info.fullscreen,
+   info->info.region,
0, 0);
if (!ob) goto on_error;
 
@@ -58,7 +56,7 @@ _output_setup(int  width,
  
evas_software_gdi_outbuf_flush,
  NULL,
  evas_software_gdi_outbuf_free,
- width, height))
+ w, h))
  goto on_error;
 
return re;
@@ -69,24 +67,6 @@ _output_setup(int  width,
return NULL;
 }
 
-
-/* engine api this module provides */
-static void *
-eng_output_setup(void *engine EINA_UNUSED, void *in, unsigned int w, unsigned 
int h)
-{
-   Evas_Engine_Info_Software_Gdi *info;
-
-   info = (Evas_Engine_Info_Software_Gdi *)in;
-   return _output_setup(w,
-h,
-info->info.rotation,
-info->info.window,
-info->info.depth,
-info->info.borderless,
-info->info.fullscreen,
-info->info.region);
-}
-
 static int
 eng_output_update(void *engine EINA_UNUSED, void *data, void *in, unsigned int 
w, unsigned int h)
 {

-- 




[EGIT] [core/efl] master 57/67: evas: enable handling multi output in evas_render_mapped.

2017-08-25 Thread Cedric BAIL
cedric pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=79ed7a0cc2f9a8bb4bb36b22d5c6e909c2d63491

commit 79ed7a0cc2f9a8bb4bb36b22d5c6e909c2d63491
Author: Cedric BAIL <ced...@osg.samsung.com>
Date:   Fri Aug 25 10:52:38 2017 -0700

evas: enable handling multi output in evas_render_mapped.
---
 src/lib/evas/canvas/evas_canvas3d_texture.c |  4 +++-
 src/lib/evas/canvas/evas_render.c   | 34 -
 src/lib/evas/include/evas_private.h |  3 ++-
 3 files changed, 24 insertions(+), 17 deletions(-)

diff --git a/src/lib/evas/canvas/evas_canvas3d_texture.c 
b/src/lib/evas/canvas/evas_canvas3d_texture.c
index 566ab41c32..2876364591 100644
--- a/src/lib/evas/canvas/evas_canvas3d_texture.c
+++ b/src/lib/evas/canvas/evas_canvas3d_texture.c
@@ -141,7 +141,9 @@ _texture_proxy_subrender(Evas_Canvas3D_Texture *obj, void 
*engine)
   .source_clip = EINA_FALSE
  };
 
- evas_render_mapped(e, pd->source, source, ctx, 
proxy_write->surface,
+ evas_render_mapped(e, pd->source, source, ctx,
+_evas_default_output_get(e),
+proxy_write->surface,
 -source->cur->geometry.x,
 -source->cur->geometry.y,
 2, 0, 0, e->output.w, e->output.h,
diff --git a/src/lib/evas/canvas/evas_render.c 
b/src/lib/evas/canvas/evas_render.c
index f9206439d3..8ef8bc1cda 100644
--- a/src/lib/evas/canvas/evas_render.c
+++ b/src/lib/evas/canvas/evas_render.c
@@ -1723,7 +1723,8 @@ _evas_render_mapped_context_clip_set(Evas_Public_Data 
*evas, Evas_Object *eo_obj
 Eina_Bool
 evas_render_mapped(Evas_Public_Data *evas, Evas_Object *eo_obj,
Evas_Object_Protected_Data *obj, void *context,
-   void *surface, int off_x, int off_y, int mapped, int ecx,
+   void *output, void *surface,
+   int off_x, int off_y, int mapped, int ecx,
int ecy, int ecw, int ech,
Evas_Proxy_Render_Data *proxy_render_data, int level,
Eina_Bool do_async)
@@ -1943,7 +1944,7 @@ evas_render_mapped(Evas_Public_Data *evas, Evas_Object 
*eo_obj,
   ctx = ENFN->context_new(ENC);
   ENFN->context_color_set(ENC, ctx, 0, 0, 0, 0);
   ENFN->context_render_op_set(ENC, ctx, EVAS_RENDER_COPY);
-  ENFN->rectangle_draw(ENC, ENDT, ctx, obj->map->surface,
+  ENFN->rectangle_draw(ENC, output, ctx, obj->map->surface,
0, 0, obj->map->surface_w, 
obj->map->surface_h,
EINA_FALSE);
   ENFN->context_free(ENC, ctx);
@@ -1958,7 +1959,7 @@ evas_render_mapped(Evas_Public_Data *evas, Evas_Object 
*eo_obj,
{
   clean_them |= evas_render_mapped(evas, obj2->object,
obj2, ctx,
-   obj->map->surface,
+   output, 
obj->map->surface,
off_x2, off_y2, 1,
ecx, ecy, ecw, ech,
proxy_render_data,
@@ -1992,7 +1993,7 @@ evas_render_mapped(Evas_Public_Data *evas, Evas_Object 
*eo_obj,
 #endif
   // FIXME: Should this really be sync render?
   obj->func->render(eo_obj, obj, obj->private_data,
-ENC, ENDT, ctx,
+ENC, output, ctx,
 obj->map->surface, off_x2, off_y2,
 EINA_FALSE);
}
@@ -2055,7 +2056,7 @@ evas_render_mapped(Evas_Public_Data *evas, Evas_Object 
*eo_obj,
 redraw = EINA_TRUE;
  }
if (redraw)
- evas_render_mask_subrender(evas, ENDT, mask, 
prev_mask, level + 1, do_async);
+ evas_render_mask_subrender(evas, output, mask, 
prev_mask, level + 1, do_async);
 
if (mask->mask->surface)
  {
@@ -2086,7 +2087,7 @@ evas_render_mapped(Evas_Public_Data *evas, Evas_Object 
*eo_obj,
   RD(level, "  draw image map(clip: [%d] %d,%d %dx%d)\n", _c, 
_cx, _cy, _cw, _ch);
 #endif
   evas_draw_image_map_async_check
-(obj, ENC, ENDT, ctx, surface,
+(obj, ENC, output, ctx, surface,
  obj->map

[EGIT] [core/efl] master 53/67: evas: destroy seats and inputs before the display disapear.

2017-08-25 Thread Cedric BAIL
cedric pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=9ba662bd636a21f8fe4f6620d947d623ad99316f

commit 9ba662bd636a21f8fe4f6620d947d623ad99316f
Author: Cedric BAIL <ced...@osg.samsung.com>
Date:   Fri Aug 25 10:52:22 2017 -0700

evas: destroy seats and inputs before the display disapear.
---
 src/lib/evas/canvas/evas_main.c | 42 -
 1 file changed, 21 insertions(+), 21 deletions(-)

diff --git a/src/lib/evas/canvas/evas_main.c b/src/lib/evas/canvas/evas_main.c
index 0ebe72d9ed..9a8e1992d2 100644
--- a/src/lib/evas/canvas/evas_main.c
+++ b/src/lib/evas/canvas/evas_main.c
@@ -378,6 +378,27 @@ next_zombie:
evas_event_callback_all_del(eo_e);
evas_event_callback_cleanup(eo_e);
 
+   EINA_LIST_FREE(e->touch_points, touch_point)
+ free(touch_point);
+
+   _evas_device_cleanup(eo_e);
+   e->focused_by = eina_list_free(e->focused_by);
+
+   while (e->seats)
+ {
+Evas_Pointer_Seat *pseat = EINA_INLIST_CONTAINER_GET(e->seats, 
Evas_Pointer_Seat);
+
+eina_list_free(pseat->object.in);
+while (pseat->pointers)
+  {
+ Evas_Pointer_Data *pdata = 
EINA_INLIST_CONTAINER_GET(pseat->pointers, Evas_Pointer_Data);
+ pseat->pointers = eina_inlist_remove(pseat->pointers, 
pseat->pointers);
+ free(pdata);
+  }
+e->seats = eina_inlist_remove(e->seats, e->seats);
+free(pseat);
+ }
+
/* Ector surface may require an existing output to finish its job */
e->engine.func->ector_destroy(_evas_engine_context(e), e->ector);
/* cleanup engine backend */
@@ -424,27 +445,6 @@ next_zombie:
  }
SLKU(e->post_render.lock);
 
-   EINA_LIST_FREE(e->touch_points, touch_point)
- free(touch_point);
-
-   _evas_device_cleanup(eo_e);
-   e->focused_by = eina_list_free(e->focused_by);
-
-   while (e->seats)
- {
-Evas_Pointer_Seat *pseat = EINA_INLIST_CONTAINER_GET(e->seats, 
Evas_Pointer_Seat);
-
-eina_list_free(pseat->object.in);
-while (pseat->pointers)
-  {
- Evas_Pointer_Data *pdata = 
EINA_INLIST_CONTAINER_GET(pseat->pointers, Evas_Pointer_Data);
- pseat->pointers = eina_inlist_remove(pseat->pointers, 
pseat->pointers);
- free(pdata);
-  }
-e->seats = eina_inlist_remove(e->seats, e->seats);
-free(pseat);
- }
-
eina_lock_free(&(e->lock_objects));
eina_spinlock_free(&(e->render.lock));
eina_spinlock_free(&(e->post_render.lock));

-- 




[EGIT] [core/efl] master 42/67: evas: find a best possible output to manage an object to get pixels from.

2017-08-25 Thread Cedric BAIL
cedric pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=46767819fdfeafeacbfa816bcf66a8e231730ee8

commit 46767819fdfeafeacbfa816bcf66a8e231730ee8
Author: Cedric BAIL <ced...@osg.samsung.com>
Date:   Fri Aug 25 10:51:40 2017 -0700

evas: find a best possible output to manage an object to get pixels from.

The code shouldn't really need an output for getting the pixels, it just
happen that some of the backend function really need one to get a GL 
context.
---
 src/lib/evas/canvas/evas_object_image.c | 33 ++---
 1 file changed, 30 insertions(+), 3 deletions(-)

diff --git a/src/lib/evas/canvas/evas_object_image.c 
b/src/lib/evas/canvas/evas_object_image.c
index 2fb8d656a0..1ba3971a7a 100644
--- a/src/lib/evas/canvas/evas_object_image.c
+++ b/src/lib/evas/canvas/evas_object_image.c
@@ -128,6 +128,29 @@ evas_object_image_render_prepare(Evas_Object *eo_obj 
EINA_UNUSED, Evas_Object_Pr
// XXX: if image is a proxy, PREPEND to prerender list in evas canvas
 }
 
+static void *
+_evas_object_image_output_find(Evas_Object_Protected_Data *obj)
+{
+   Efl_Canvas_Output *output;
+   Eina_List *l;
+   const Eina_Rectangle geometry = {
+ obj->cur->geometry.x,
+ obj->cur->geometry.y,
+ obj->cur->geometry.w,
+ obj->cur->geometry.h
+   };
+
+   EINA_LIST_FOREACH(obj->layer->evas->outputs, l, output)
+ {
+if (eina_rectangles_intersect(>geometry, ))
+  return output->output;
+ }
+
+   // Always return an output, as evas rely on that even if the object is out 
of screen.
+   output = eina_list_data_get(obj->layer->evas->outputs);
+   return output->output;
+}
+
 void
 _evas_image_cleanup(Evas_Object *eo_obj, Evas_Object_Protected_Data *obj, 
Evas_Image_Data *o)
 {
@@ -861,14 +884,16 @@ _efl_canvas_image_internal_efl_file_save(const Eo 
*eo_obj, Evas_Image_Data *o, c
int imagew, imageh, uvw, uvh;
Eina_Rw_Slice slice = {};
DATA32 *data = NULL;
-   void *pixels = NULL;
+   void *pixels;
+   void *output;
 
obj = efl_data_scope_get(eo_obj, EFL_CANVAS_OBJECT_CLASS);
 
EINA_SAFETY_ON_NULL_RETURN_VAL(file, EINA_FALSE);
evas_object_async_block(obj);
 
-   pixels = _evas_image_pixels_get((Eo *)eo_obj, obj, ENC, ENDT, NULL, NULL,
+   output = _evas_object_image_output_find(obj);
+   pixels = _evas_image_pixels_get((Eo *)eo_obj, obj, ENC, output, NULL, NULL,
0, 0,
, , , , EINA_TRUE, 
EINA_TRUE);
if (!pixels) goto no_pixels;
@@ -3068,6 +3093,7 @@ evas_object_image_is_inside(Evas_Object *eo_obj,
int imagew, imageh, uvw, uvh, ix, iy, iw, ih, idw, idh, idx, idy;
int is_inside = 0;
void *pixels;
+   void *output;
 
// FIXME: The below loop is incredibly dubious and probably should be 
simplified.
// We're looking for one single pixel, not a random series of positions.
@@ -3075,7 +3101,8 @@ evas_object_image_is_inside(Evas_Object *eo_obj,
/* the following code is similar to evas_object_image_render(), but doesn't
 * draw, just get the pixels so we can check the transparency.
 */
-   pixels = _evas_image_pixels_get(eo_obj, obj, ENC, ENDT, NULL, NULL, 0, 0,
+   output = _evas_object_image_output_find(obj);
+   pixels = _evas_image_pixels_get(eo_obj, obj, ENC, output, NULL, NULL, 0, 0,
, , , , EINA_TRUE, 
EINA_FALSE);
if (!pixels) return is_inside;
 

-- 




[EGIT] [core/efl] master 41/67: evas: remove dead code that won't be easy to bring back to life.

2017-08-25 Thread Cedric BAIL
cedric pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=aebeed445485a049d14c6a392b4acc777e8e8c02

commit aebeed445485a049d14c6a392b4acc777e8e8c02
Author: Cedric BAIL <ced...@osg.samsung.com>
Date:   Fri Aug 25 10:51:36 2017 -0700

evas: remove dead code that won't be easy to bring back to life.
---
 src/lib/evas/canvas/evas_object_image.c | 38 -
 1 file changed, 38 deletions(-)

diff --git a/src/lib/evas/canvas/evas_object_image.c 
b/src/lib/evas/canvas/evas_object_image.c
index b3bd955820..2fb8d656a0 100644
--- a/src/lib/evas/canvas/evas_object_image.c
+++ b/src/lib/evas/canvas/evas_object_image.c
@@ -125,44 +125,6 @@ evas_object_image_render_prepare(Evas_Object *eo_obj 
EINA_UNUSED, Evas_Object_Pr
 if (o->engine_data) ENFN->image_prepare(ENC, o->engine_data);
  }
 #endif
-#if 0
-   // is it visible? ... rgba 0 0 0 0? not mapped and in viewport?
-   if (
- ((o->cur->border.l != 0) || (o->cur->border.r != 0) ||
-  (o->cur->border.t != 0) || (o->cur->border.b != 0)) &&
- ((obj->cur->geometry.w < 256) && (obj->cur->geometry.h < 256))
- )
- {
-void *ctx, *prep = NULL;
-
-if (!o->engine_data_prep)
-  {
- prep = ENFN->image_surface_noscale_new
- (ENC, obj->cur->geometry.w, obj->cur->geometry.h,
- o->cur->has_alpha);
- ctx = ENFN->context_new(ENC);
- ENFN->context_clip_set(ENC, ctx, 0, 0,
-obj->cur->geometry.w,
-obj->cur->geometry.h);
- if (o->cur->has_alpha)
-   {
-  ENFN->context_render_op_set(ENC, ctx, EVAS_RENDER_COPY);
-  ENFN->context_color_set(ENC, ctx, 0, 0, 0, 0);
-  ENFN->rectangle_draw(ENC, ENDT, ctx, prep, 0, 0,
-   obj->cur->geometry.w,
-   obj->cur->geometry.h, do_async);
-   }
- ENFN->context_render_op_set(ENC, ctx, EVAS_RENDER_BLEND);
- evas_object_image_render(eo_obj, obj, obj->private_data, ENDT,
-  ctx, prep,
-  -obj->cur->geometry.x,
-  -obj->cur->geometry.y,
-  do_async);
- ENFN->context_free(ENC, ctx);
- o->engine_data_prep = prep;
-  }
- }
-#endif
// XXX: if image is a proxy, PREPEND to prerender list in evas canvas
 }
 

-- 




[EGIT] [core/efl] master 11/67: evas: refactor the creation of the output info logic in libevas.

2017-08-25 Thread Cedric BAIL
cedric pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=22beae8b737daf0915856a12edb8294177a0ca83

commit 22beae8b737daf0915856a12edb8294177a0ca83
Author: Cedric BAIL <ced...@osg.samsung.com>
Date:   Fri Aug 25 10:48:17 2017 -0700

evas: refactor the creation of the output info logic in libevas.
---
 src/lib/evas/canvas/evas_main.c | 11 +--
 src/lib/evas/canvas/evas_out.c  | 35 ---
 src/lib/evas/include/evas_private.h |  2 ++
 3 files changed, 23 insertions(+), 25 deletions(-)

diff --git a/src/lib/evas/canvas/evas_main.c b/src/lib/evas/canvas/evas_main.c
index d713c4abc0..f72f0d71f1 100644
--- a/src/lib/evas/canvas/evas_main.c
+++ b/src/lib/evas/canvas/evas_main.c
@@ -1044,16 +1044,7 @@ evas_output_method_set(Evas *eo_e, int render_method)
 Eina_List *l;
 
 EINA_LIST_FOREACH(e->outputs, l, output)
-  if (!output->info)
-{
-   output->info = calloc(1, e->engine.func->info_size);
-   if (!output->info) continue ;
-   output->info->magic = rand();
-   output->info_magic = output->info->magic;
-
-   if (e->engine.func->output_info_setup)
- e->engine.func->output_info_setup(output->info);
-  }
+  efl_canvas_output_info_get(e, output);
  }
else
  {
diff --git a/src/lib/evas/canvas/evas_out.c b/src/lib/evas/canvas/evas_out.c
index 567ea58dc8..fa8d914bee 100644
--- a/src/lib/evas/canvas/evas_out.c
+++ b/src/lib/evas/canvas/evas_out.c
@@ -19,6 +19,25 @@ _efl_canvas_output_async_block(Efl_Canvas_Output *output)
return e;
 }
 
+void
+efl_canvas_output_info_get(Evas_Public_Data *e, Efl_Canvas_Output *output)
+{
+   if (output->info) return ;
+   if (!e->engine.func->info_size)
+ {
+CRI("Engine not up to date no info size provided.");
+return ;
+ }
+
+   output->info = calloc(1, e->engine.func->info_size);
+   if (!output->info) return;
+   output->info->magic = rand();
+   output->info_magic = output->info->magic;
+
+   if (e->engine.func->output_info_setup)
+ e->engine.func->output_info_setup(output->info);
+}
+
 EAPI Efl_Canvas_Output *
 efl_canvas_output_add(Evas *canvas)
 {
@@ -38,22 +57,8 @@ efl_canvas_output_add(Evas *canvas)
 
// The engine is already initialized, use it
// right away to setup the info structure
-   if (e->engine.func->info_size)
- {
-r->info = calloc(1, e->engine.func->info_size);
-if (!r->info) goto on_error;
-r->info->magic = rand();
-r->info_magic = r->info->magic;
-
-if (e->engine.func->output_info_setup)
-  e->engine.func->output_info_setup(r->info);
- }
-   else
- {
-CRI("Engine not up to date no info size provided.");
- }
+   efl_canvas_output_info_get(e, r);
 
- on_error:
return r;
 }
 
diff --git a/src/lib/evas/include/evas_private.h 
b/src/lib/evas/include/evas_private.h
index ba6b752940..7f8eb355b6 100644
--- a/src/lib/evas/include/evas_private.h
+++ b/src/lib/evas/include/evas_private.h
@@ -2090,6 +2090,8 @@ Eina_List 
*_evas_pointer_list_in_rect_get(Evas_Public_Data *edata,
  Evas_Object_Protected_Data *obj_data,
  int w, int h);
 
+void efl_canvas_output_info_get(Evas_Public_Data *e, Efl_Canvas_Output 
*output);
+
 extern Eina_Cow *evas_object_proxy_cow;
 extern Eina_Cow *evas_object_map_cow;
 extern Eina_Cow *evas_object_state_cow;

-- 




[EGIT] [core/efl] master 16/67: evas: Render_Engine_Merge_Mode is actually about output.

2017-08-25 Thread Cedric BAIL
cedric pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=e31707743a58aa249214870e158ac051193b16e2

commit e31707743a58aa249214870e158ac051193b16e2
Author: Cedric BAIL <ced...@osg.samsung.com>
Date:   Fri Aug 25 10:49:11 2017 -0700

evas: Render_Engine_Merge_Mode is actually about output.
---
 .../evas/engines/software_generic/Evas_Engine_Software_Generic.h| 6 +++---
 src/modules/evas/engines/software_generic/evas_engine.c | 2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git 
a/src/modules/evas/engines/software_generic/Evas_Engine_Software_Generic.h 
b/src/modules/evas/engines/software_generic/Evas_Engine_Software_Generic.h
index bf859dc34f..833b31ebed 100644
--- a/src/modules/evas/engines/software_generic/Evas_Engine_Software_Generic.h
+++ b/src/modules/evas/engines/software_generic/Evas_Engine_Software_Generic.h
@@ -30,7 +30,7 @@ typedef enum
MERGE_BOUNDING = 1,
MERGE_FULL = 2,
MERGE_SMART = 4
-} Render_Engine_Merge_Mode;
+} Render_Output_Merge_Mode;
 
 typedef struct _Render_Output_Software_Generic Render_Output_Software_Generic;
 typedef struct _Outbuf Outbuf;
@@ -72,7 +72,7 @@ struct _Render_Output_Software_Generic
unsigned int w, h;
 
Render_Engine_Swap_Mode swap_mode;
-   Render_Engine_Merge_Mode merge_mode;
+   Render_Output_Merge_Mode merge_mode;
 
unsigned char end : 1;
unsigned char lost_back : 1;
@@ -152,7 +152,7 @@ 
evas_render_engine_software_generic_clean(Render_Output_Software_Generic *re)
 static inline void
 
evas_render_engine_software_generic_merge_mode_set(Render_Output_Software_Generic
 *re)
 {
-   Render_Engine_Merge_Mode merge_mode = MERGE_SMART;
+   Render_Output_Merge_Mode merge_mode = MERGE_SMART;
const char *s;
 
s = getenv("EVAS_GL_PARTIAL_MERGE");
diff --git a/src/modules/evas/engines/software_generic/evas_engine.c 
b/src/modules/evas/engines/software_generic/evas_engine.c
index 3245f9a371..3ea6c719fc 100644
--- a/src/modules/evas/engines/software_generic/evas_engine.c
+++ b/src/modules/evas/engines/software_generic/evas_engine.c
@@ -4057,7 +4057,7 @@ _smart_merge(Tilebuf *tb, Tilebuf_Rect *rects)
 }
 
 static Tilebuf_Rect *
-_merge_rects(Render_Engine_Merge_Mode merge_mode,
+_merge_rects(Render_Output_Merge_Mode merge_mode,
  Tilebuf *tb,
  Tilebuf_Rect *r1,
  Tilebuf_Rect *r2,

-- 




[EGIT] [core/efl] master 44/67: evas: make Evas_GL start to use engine and output separately.

2017-08-25 Thread Cedric BAIL
cedric pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=f3f6a7e535bd3338482c462a14f7d43f469fc85c

commit f3f6a7e535bd3338482c462a14f7d43f469fc85c
Author: Cedric BAIL <ced...@osg.samsung.com>
Date:   Fri Aug 25 10:51:47 2017 -0700

evas: make Evas_GL start to use engine and output separately.
---
 src/lib/evas/canvas/evas_object_image.c   | 4 ++--
 src/lib/evas/include/evas_private.h   | 2 +-
 src/modules/evas/engines/gl_generic/evas_engine.c | 8 
 3 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/src/lib/evas/canvas/evas_object_image.c 
b/src/lib/evas/canvas/evas_object_image.c
index 1ba3971a7a..9db54b42ec 100644
--- a/src/lib/evas/canvas/evas_object_image.c
+++ b/src/lib/evas/canvas/evas_object_image.c
@@ -1604,7 +1604,7 @@ evas_process_dirty_pixels(Evas_Object *eo_obj, 
Evas_Object_Protected_Data *obj,
if (ENFN->gl_direct_override_get)
  ENFN->gl_direct_override_get(engine, 
_override, _force_off);
if (ENFN->gl_surface_direct_renderable_get)
- direct_renderable = 
ENFN->gl_surface_direct_renderable_get(engine, ns, _override, surface);
+ direct_renderable = 
ENFN->gl_surface_direct_renderable_get(engine, output, ns, _override, 
surface);
 
if (((direct_override) ||
 ((direct_renderable) &&
@@ -1677,7 +1677,7 @@ evas_process_dirty_pixels(Evas_Object *eo_obj, 
Evas_Object_Protected_Data *obj,
  if (ENFN->gl_direct_override_get)
ENFN->gl_direct_override_get(engine, _override, 
_force_off);
  if (ENFN->gl_surface_direct_renderable_get)
-   ENFN->gl_surface_direct_renderable_get(engine, ns, 
_override, surface);
+   ENFN->gl_surface_direct_renderable_get(engine, output, ns, 
_override, surface);
 
  if (direct_override && !direct_force_off)
{
diff --git a/src/lib/evas/include/evas_private.h 
b/src/lib/evas/include/evas_private.h
index 74ef28d84a..c01eb0dc3c 100644
--- a/src/lib/evas/include/evas_private.h
+++ b/src/lib/evas/include/evas_private.h
@@ -1561,7 +1561,7 @@ struct _Evas_Func
void *(*gl_current_surface_get)   (void *engine);
int  (*gl_rotation_angle_get) (void *engine);
Eina_Bool (*gl_surface_query) (void *engine, void *surface, int 
attr, void *value);
-   Eina_Bool (*gl_surface_direct_renderable_get) (void *engine, 
Evas_Native_Surface *ns, Eina_Bool *override, void *surface);
+   Eina_Bool (*gl_surface_direct_renderable_get) (void *engine, void *output, 
Evas_Native_Surface *ns, Eina_Bool *override, void *surface);
void (*gl_image_direct_set)   (void *engine, void *image, Eina_Bool 
direct);
int  (*gl_image_direct_get)   (void *engine, void *image);
void (*gl_get_pixels_pre) (void *engine);
diff --git a/src/modules/evas/engines/gl_generic/evas_engine.c 
b/src/modules/evas/engines/gl_generic/evas_engine.c
index 93932ec4ff..2b3f1f4c88 100644
--- a/src/modules/evas/engines/gl_generic/evas_engine.c
+++ b/src/modules/evas/engines/gl_generic/evas_engine.c
@@ -1553,7 +1553,7 @@ eng_gl_make_current(void *engine, void *surface, void 
*context)
  {
 Evas_Engine_GL_Context *gl_context;
 
-gl_context = gl_generic_context_get(engine);
+gl_context = gl_generic_context_find(engine);
 if ((gl_context->havestuff) ||
 (gl_context->master_clip.used))
   {
@@ -1637,7 +1637,7 @@ eng_gl_api_get(void *engine, int version)
Evas_Engine_GL_Context *gl_context;
EVGLINIT(engine, NULL);
 
-   gl_context = gl_generic_context_get(engine);
+   gl_context = gl_generic_context_find(engine);
if (!gl_context)
  {
 ERR("Invalid context!");
@@ -1666,9 +1666,9 @@ eng_gl_direct_override_get(void *engine, Eina_Bool 
*override, Eina_Bool *force_o
 }
 
 static Eina_Bool
-eng_gl_surface_direct_renderable_get(void *engine, Evas_Native_Surface *ns, 
Eina_Bool *override, void *surface)
+eng_gl_surface_direct_renderable_get(void *engine, void *output, 
Evas_Native_Surface *ns, Eina_Bool *override, void *surface)
 {
-   Render_Output_GL_Generic *re = engine;
+   Render_Output_GL_Generic *re = output;
Eina_Bool direct_render, client_side_rotation;
Evas_Engine_GL_Context *gl_context;
Evas_GL_Image *sfc = surface;

-- 




[EGIT] [core/efl] master 67/67: evas: enable rendering of multiple output.

2017-08-25 Thread Cedric BAIL
cedric pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=8286a56279242bb0418ace7d37b225621b5e5c40

commit 8286a56279242bb0418ace7d37b225621b5e5c40
Author: Cedric BAIL <ced...@osg.samsung.com>
Date:   Fri Aug 25 10:55:15 2017 -0700

evas: enable rendering of multiple output.
---
 src/lib/evas/canvas/evas_render.c | 382 +++---
 1 file changed, 196 insertions(+), 186 deletions(-)

diff --git a/src/lib/evas/canvas/evas_render.c 
b/src/lib/evas/canvas/evas_render.c
index 1d42b8c5e8..16895ad3cb 100644
--- a/src/lib/evas/canvas/evas_render.c
+++ b/src/lib/evas/canvas/evas_render.c
@@ -3088,11 +3088,17 @@ evas_render_updates_internal_loop(Evas *eo_e, 
Evas_Public_Data *evas,
return clean_them;
 }
 
-static Efl_Canvas_Output *
-_evas_overlay_output_find(Evas_Public_Data *e, Evas_Object_Protected_Data *obj)
+typedef enum _Evas_3State
+{
+  EVAS_3STATE_OUTSIDE,
+  EVAS_3STATE_INSIDE,
+  EVAS_3STATE_OVER
+} Evas_3State;
+
+static Evas_3State
+_evas_overlay_output_find(Efl_Canvas_Output *output,
+  Evas_Object_Protected_Data *obj)
 {
-   Efl_Canvas_Output *output;
-   Eina_List *lo;
const Eina_Rectangle geometry = {
  obj->cur->geometry.x,
  obj->cur->geometry.y,
@@ -3102,23 +3108,14 @@ _evas_overlay_output_find(Evas_Public_Data *e, 
Evas_Object_Protected_Data *obj)
Eina_Rectangle copy = geometry;
 
/* A video object can only be in one output at a time, check that first */
-   EINA_LIST_FOREACH(e->outputs, lo, output)
- {
-if (!eina_rectangle_intersection(, >geometry))
-  {
- copy = geometry;
- continue ;
-  }
-if (memcmp(, , sizeof (Eina_Rectangle)) != 0)
-  {
- /* This means that it does intersect this output and another */
- return NULL;
-  }
+   if (!eina_rectangle_intersection(, >geometry))
+ return EVAS_3STATE_OUTSIDE;
 
-return output;
- }
+   if (memcmp(, , sizeof (Eina_Rectangle)) != 0)
+ /* This means that it does intersect this output and another */
+ return EVAS_3STATE_OVER;
 
-   return NULL;
+   return EVAS_3STATE_INSIDE;
 }
 
 static Eina_Bool
@@ -3132,7 +3129,7 @@ evas_render_updates_internal(Evas *eo_e,
Evas_Object_Protected_Data *obj;
Evas_Public_Data *evas, *e;
Efl_Canvas_Output *out;
-   Eina_List *ll;
+   Eina_List *ll, *l;
Eina_Bool clean_them = EINA_FALSE;
Eina_Bool rendering = EINA_FALSE;
Eina_Bool alpha;
@@ -3144,6 +3141,7 @@ evas_render_updates_internal(Evas *eo_e,
Evas_Render_Mode render_mode = !do_async ?
  EVAS_RENDER_MODE_SYNC :
  EVAS_RENDER_MODE_ASYNC_INIT;
+   Eina_Bool haveup = EINA_FALSE;
 
MAGIC_CHECK(eo_e, Evas, MAGIC_EVAS);
return EINA_FALSE;
@@ -3317,195 +3315,206 @@ evas_render_updates_internal(Evas *eo_e,
  }
eina_evlog("-render_phase5", eo_e, 0.0, NULL);
 
-   /* phase 6. Initialize output */
-   out = eina_list_data_get(e->outputs);
-   if (out->changed)
+   EINA_LIST_FOREACH(e->outputs, l, out)
  {
-ENFN->output_resize(ENC, out->output,
-out->geometry.w, out->geometry.h);
-ENFN->output_redraws_rect_add(ENC,
-  out->geometry.x, out->geometry.y,
-  out->geometry.w, out->geometry.h);
-out->changed = EINA_FALSE;
- }
+/* phase 6. Initialize output */
+if (out->changed)
+  {
+ ENFN->output_resize(ENC, out->output,
+ out->geometry.w, out->geometry.h);
+ ENFN->output_redraws_rect_add(ENC,
+   out->geometry.x, out->geometry.y,
+   out->geometry.w, out->geometry.h);
+ out->changed = EINA_FALSE;
+  }
 
-   /* Define the output for Evas_GL operation */
-   if (ENFN->gl_output_set)
- ENFN->gl_output_set(ENC, out->output);
+/* Define the output for Evas_GL operation */
+if (ENFN->gl_output_set)
+  ENFN->gl_output_set(ENC, out->output);
 
-   /* phase 7. check if video surface should be inlined or stay in their 
hardware plane */
-   eina_evlog("+render_phase7", eo_e, 0.0, NULL);
-   alpha = ENFN->canvas_alpha_get(out->output);
+/* phase 7. check if video surface should be inlined or stay in their 
hardware plane */
+eina_evlog("+render_phase7", eo_e, 0.0, NULL);
+alpha = ENFN->canvas_alpha_get(out->output);
 
-   EINA_LIST_FOREACH(e->video_objects, ll, eo_obj)
- {
-Efl_Canvas_Output *output;
-Evas_Object_Protected_Data *obj = efl_data_scope_get(eo_obj, 
EFL_CANVAS_OBJECT_CLASS);
+EINA_LIST_FOREACH(e->video_objects, ll, eo_obj)
+  {
+   

[EGIT] [core/efl] master 06/67: evas: do not loose tile size when resizing output.

2017-08-25 Thread Cedric BAIL
cedric pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=cac667e402aebcbd2cc520770a2e7f88b52e6801

commit cac667e402aebcbd2cc520770a2e7f88b52e6801
Author: Cedric BAIL <ced...@osg.samsung.com>
Date:   Fri Aug 25 10:47:56 2017 -0700

evas: do not loose tile size when resizing output.
---
 .../engines/software_generic/Evas_Engine_Software_Generic.h| 10 --
 src/modules/evas/engines/software_generic/evas_engine.c|  2 ++
 2 files changed, 10 insertions(+), 2 deletions(-)

diff --git 
a/src/modules/evas/engines/software_generic/Evas_Engine_Software_Generic.h 
b/src/modules/evas/engines/software_generic/Evas_Engine_Software_Generic.h
index 5db2a94017..01751a216f 100644
--- a/src/modules/evas/engines/software_generic/Evas_Engine_Software_Generic.h
+++ b/src/modules/evas/engines/software_generic/Evas_Engine_Software_Generic.h
@@ -71,6 +71,10 @@ struct _Render_Output_Software_Generic
 
unsigned int w, h;
 
+   struct {
+  unsigned int w, h;
+   } tile;
+
Render_Engine_Swap_Mode swap_mode;
Render_Engine_Merge_Mode merge_mode;
 
@@ -125,11 +129,13 @@ 
evas_render_engine_software_generic_init(Render_Output_Software_Generic *re,
re->lost_back = 0;
re->tile_strict = 0;
 
+   re->tile.w = TILESIZE;
+   re->tile.h = TILESIZE;
re->tb = evas_common_tilebuf_new(w, h);
if (!re->tb) return EINA_FALSE;
 
/* in preliminary tests 16x16 gave highest framerates */
-   evas_common_tilebuf_set_tile_size(re->tb, TILESIZE, TILESIZE);
+   evas_common_tilebuf_set_tile_size(re->tb, re->tile.w, re->tile.h);
 
return EINA_TRUE;
 }
@@ -175,7 +181,7 @@ 
evas_render_engine_software_generic_update(Render_Output_Software_Generic *re,
evas_common_tilebuf_free(re->tb);
re->tb = evas_common_tilebuf_new(w, h);
if (!re->tb) return EINA_FALSE;
-   evas_common_tilebuf_set_tile_size(re->tb, TILESIZE, TILESIZE);
+   evas_common_tilebuf_set_tile_size(re->tb, re->tile.w, re->tile.h);
evas_render_engine_software_generic_tile_strict_set(re, re->tile_strict);
return EINA_TRUE;
 }
diff --git a/src/modules/evas/engines/software_generic/evas_engine.c 
b/src/modules/evas/engines/software_generic/evas_engine.c
index 4362d2d2af..a97e14a3e5 100644
--- a/src/modules/evas/engines/software_generic/evas_engine.c
+++ b/src/modules/evas/engines/software_generic/evas_engine.c
@@ -3922,6 +3922,8 @@ eng_output_tile_size_set(void *engine EINA_UNUSED, void 
*data, int w, int h)
Render_Output_Software_Generic *re;
 
re = (Render_Output_Software_Generic *)data;
+   re->tile.w = w;
+   re->tile.h = h;
evas_common_tilebuf_set_tile_size(re->tb, w, h);
 }
 

-- 




[EGIT] [core/efl] master 14/67: efl: remove PS3 backend.

2017-08-25 Thread Cedric BAIL
cedric pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=d179a5c2a95785e64015c9d69f9e0f23dfc6699e

commit d179a5c2a95785e64015c9d69f9e0f23dfc6699e
Author: Cedric BAIL <ced...@osg.samsung.com>
Date:   Fri Aug 25 10:48:42 2017 -0700

efl: remove PS3 backend.

This backend has received no patch and maintenance from anyone who could
actually test it over the last few years. After talking with KaKaRoTo it
is best to remove it. If anyone want to take over its maintenance, you
are welcome to revert this patch.
---
 Makefile.am|   8 -
 README |   8 -
 configure.ac   |  48 --
 pc/.gitignore  |   2 -
 pc/ecore-psl1ght.pc.in |  12 -
 pc/evas-psl1ght.pc.in  |   3 -
 src/Makefile.am|   1 -
 src/Makefile_Ecore_Evas.am |  25 -
 src/Makefile_Ecore_Psl1ght.am  |  29 -
 src/Makefile_Evas.am   |  35 -
 src/lib/ecore_evas/Ecore_Evas.h|   2 +-
 src/lib/ecore_evas/ecore_evas.c|  16 +-
 src/lib/ecore_evas/ecore_evas_module.c |   6 -
 src/lib/ecore_psl1ght/Ecore_Psl1ght.h  | 124 ---
 src/lib/ecore_psl1ght/Ecore_Psl1ght_Keys.h |  78 --
 src/lib/ecore_psl1ght/ecore_psl1ght.c  | 862 -
 src/lib/ecore_psl1ght/ecore_psl1ght_private.h  |  36 -
 src/lib/ecore_psl1ght/gemutil.c| 281 ---
 src/lib/ecore_psl1ght/gemutil.h|  19 -
 src/lib/ecore_psl1ght/moveutil.c   | 245 --
 src/lib/ecore_psl1ght/moveutil.h   |  43 -
 src/lib/ecore_psl1ght/spursutil.c  |  62 --
 src/lib/ecore_psl1ght/spursutil.h  |  24 -
 src/lib/elementary/efl_ui_win.c|  14 -
 src/lib/elementary/elm_config.c|   3 -
 src/lib/evas/file/evas_module.c|   4 -
 .../engines/psl1ght/ecore_evas_psl1ght.c   | 467 ---
 .../evas/engines/psl1ght/Evas_Engine_PSL1GHT.h |  16 -
 src/modules/evas/engines/psl1ght/evas_engine.c | 449 ---
 src/modules/evas/engines/psl1ght/evas_engine.h |  30 -
 src/modules/evas/engines/psl1ght/rsxutil.c | 275 ---
 src/modules/evas/engines/psl1ght/rsxutil.h |  43 -
 src/tests/evas/evas_test_render_engines.c  |   3 -
 33 files changed, 3 insertions(+), 3270 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index 939687bfda..1106b60b01 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -221,10 +221,6 @@ if BUILD_ENGINE_SOFTWARE_DDRAW
 pkgconfig_DATA += pc/evas-software-ddraw.pc
 endif
 
-if BUILD_ENGINE_PSL1GHT
-pkgconfig_DATA += pc/evas-psl1ght.pc
-endif
-
 if BUILD_ENGINE_WAYLAND_SHM
 pkgconfig_DATA += pc/evas-wayland-shm.pc
 endif
@@ -249,10 +245,6 @@ if HAVE_ECORE_DRM
 pkgconfig_DATA += pc/ecore-drm.pc
 endif
 
-if HAVE_PS3
-pkgconfig_DATA += pc/ecore-psl1ght.pc
-endif
-
 if HAVE_ECORE_SDL
 pkgconfig_DATA += pc/ecore-sdl.pc
 endif
diff --git a/README b/README
index cc44271922..9d0b03cb66 100644
--- a/README
+++ b/README
@@ -168,14 +168,6 @@ supports all the transport layers Ecore Con supports.
 
 
 
-**Ecore Psl1ght:**
-
-//BSD 2-Clause license//
-
-This library acts as a helper for porting to the Playstation 3 (PS3)
-native runtime environment.
-
-
 
 **Ecore SDL:**
 
diff --git a/configure.ac b/configure.ac
index 830e3620a9..4b1e469e11 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2523,13 +2523,8 @@ define([EVAS_ENGINE_DEP_CHECK_FB], [
 AC_CHECK_HEADER([linux/fb.h], [:], [AC_MSG_ERROR([Missing linux/fb.h])])
 ])
 
-define([EVAS_ENGINE_DEP_CHECK_PSL1GHT], [
-AC_CHECK_HEADER([rsx/rsx.h], [:], [AC_MSG_ERROR([Missing rsx/rsx.h])])
-])
-
 EVAS_ENGINE([buffer], [static])
 EVAS_ENGINE([fb], [${want_fb}], [EVAS_ENGINE_DEP_CHECK_FB])
-EVAS_ENGINE([psl1ght], [${have_ps3}], [EVAS_ENGINE_DEP_CHECK_PSL1GHT])
 
 # XXX TODO:
 EVAS_CHECK_ENGINE([gl-cocoa], [${want_evas_engine_gl_cocoa}], [no], [OpenGL 
Cocoa])
@@ -3521,42 +3516,6 @@ EFL_LIB_END_OPTIONAL([Ecore_FB])
  End of Ecore_FB
 
 
- Ecore_Psl1ght
-EFL_LIB_START_OPTIONAL([Ecore_Psl1ght], [test "${have_ps3}" = "yes"])
-
-### Additional options to configure
-
-### Default values
-
-### Checks for programs
-
-### Checks for libraries
-EFL_PLATFORM_DEPEND([ECORE_PSL1GHT], [escape])
-
-EFL_INTERNAL_DEPEND_PKG([ECORE_PSL1GHT], [ecore-input])
-EFL_INTERNAL_DEPEND_PKG([ECORE_PSL1GHT], [ecore])
-EFL_INTERNAL_DEPEND_PKG([ECORE_PSL1GHT], [eo])
-EFL_INTERNAL_DEPEND_PKG([ECORE_PSL1GHT], [efl])
-EFL_INTERNAL_DEPEND_PKG([ECORE_PSL1GHT], [eina])
-
-EFL_ADD_LIBS([ECORE_PSL1GHT], [-lio -lsysutil -lgem -lcamera -lspurs])
-
-### Checks for header files
-
-### Checks for types
-

[EGIT] [core/efl] master 51/67: evas: make vector graphic support multi output.

2017-08-25 Thread Cedric BAIL
cedric pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=e682f641930dc52db44729ffe4f23895c0fe94d6

commit e682f641930dc52db44729ffe4f23895c0fe94d6
Author: Cedric BAIL <ced...@osg.samsung.com>
Date:   Fri Aug 25 10:52:14 2017 -0700

evas: make vector graphic support multi output.
---
 src/lib/evas/canvas/evas_object_vg.c| 8 ++--
 src/lib/evas/include/evas_private.h | 1 +
 src/modules/evas/engines/software_generic/evas_engine.c | 9 +
 3 files changed, 12 insertions(+), 6 deletions(-)

diff --git a/src/lib/evas/canvas/evas_object_vg.c 
b/src/lib/evas/canvas/evas_object_vg.c
index c1a2730407..c3edc9dac9 100644
--- a/src/lib/evas/canvas/evas_object_vg.c
+++ b/src/lib/evas/canvas/evas_object_vg.c
@@ -179,12 +179,8 @@ evas_object_vg_render(Evas_Object *eo_obj EINA_UNUSED,
 {
Evas_VG_Data *vd = type_private_data;
Ector_Surface *ector = evas_ector_get(obj->layer->evas);
-   // FIXME: Set context (that should affect Ector_Surface) and
-   // then call Ector_Renderer render from bottom to top. Get the
-   // Ector_Surface that match the output from Evas engine API.
-   // It is a requirement that you can reparent an Ector_Renderer
-   // to another Ector_Surface as long as that Ector_Surface is a
-   // child of the main Ector_Surface (necessary for Evas_Map).
+
+   obj->layer->evas->engine.func->ector_output_set(engine, surface, output);
 
if (!vd->engine_data)
  vd->engine_data = obj->layer->evas->engine.func->ector_new(engine, 
context, ector, surface);
diff --git a/src/lib/evas/include/evas_private.h 
b/src/lib/evas/include/evas_private.h
index 529256a3c5..c0cdd12ac8 100644
--- a/src/lib/evas/include/evas_private.h
+++ b/src/lib/evas/include/evas_private.h
@@ -1611,6 +1611,7 @@ struct _Evas_Func
void *(*texture_image_get)(void *engine, void *texture);
 
Ector_Surface *(*ector_create)(void *engine);
+   void  (*ector_output_set) (void *engine, Ector_Surface 
*surface, void *output);
void  (*ector_destroy)(void *engine, Ector_Surface 
*surface);
Ector_Buffer *(*ector_buffer_wrap)(void *engine, Evas *e, void 
*engine_image);
Ector_Buffer *(*ector_buffer_new) (void *engine, Evas *e, int width, 
int height, Efl_Gfx_Colorspace cspace, Ector_Buffer_Flag flags);
diff --git a/src/modules/evas/engines/software_generic/evas_engine.c 
b/src/modules/evas/engines/software_generic/evas_engine.c
index b7dd3c8058..ade91f45ae 100644
--- a/src/modules/evas/engines/software_generic/evas_engine.c
+++ b/src/modules/evas/engines/software_generic/evas_engine.c
@@ -4338,6 +4338,14 @@ eng_ector_create(void *engine EINA_UNUSED)
 }
 
 static void
+eng_ector_output_set(void *engine EINA_UNUSED,
+ Ector_Surface *surface EINA_UNUSED,
+ void *output EINA_UNUSED)
+{
+   // To be useful for GL backend only.
+}
+
+static void
 eng_ector_destroy(void *data EINA_UNUSED, Ector_Surface *ector)
 {
if (ector) efl_del(ector);
@@ -4848,6 +4856,7 @@ static Evas_Func func =
  NULL, // eng_texture_image_set
  NULL, // eng_texture_image_get
  eng_ector_create,
+ eng_ector_output_set,
  eng_ector_destroy,
  eng_ector_buffer_wrap,
  eng_ector_buffer_new,

-- 




[EGIT] [core/efl] master 10/67: evas: factorize call to info and info_free.

2017-08-25 Thread Cedric BAIL
cedric pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=46e1df839be16b057dbc2179626db180d90935c8

commit 46e1df839be16b057dbc2179626db180d90935c8
Author: Cedric BAIL <ced...@osg.samsung.com>
Date:   Fri Aug 25 10:48:13 2017 -0700

evas: factorize call to info and info_free.
---
 src/lib/evas/canvas/evas_main.c| 17 --
 src/lib/evas/canvas/evas_out.c | 18 --
 src/lib/evas/include/evas_private.h| 12 ---
 src/modules/evas/engines/buffer/evas_engine.c  | 27 +--
 src/modules/evas/engines/drm/evas_engine.c | 29 
 src/modules/evas/engines/eglfs/evas_engine.c   | 25 +++---
 src/modules/evas/engines/fb/evas_engine.c  | 25 +-
 src/modules/evas/engines/gl_cocoa/evas_engine.c| 27 ++-
 src/modules/evas/engines/gl_drm/evas_engine.c  | 27 ---
 src/modules/evas/engines/gl_sdl/evas_engine.c  | 24 ++---
 src/modules/evas/engines/gl_x11/evas_engine.c  | 32 ++
 src/modules/evas/engines/psl1ght/evas_engine.c | 29 
 .../evas/engines/software_ddraw/evas_engine.c  | 26 ---
 .../evas/engines/software_gdi/evas_engine.c| 23 ++---
 .../evas/engines/software_generic/evas_engine.c|  6 ++--
 .../evas/engines/software_x11/evas_engine.c| 39 --
 src/modules/evas/engines/wayland_egl/evas_engine.c | 27 ---
 src/modules/evas/engines/wayland_shm/evas_engine.c | 32 --
 18 files changed, 127 insertions(+), 318 deletions(-)

diff --git a/src/lib/evas/canvas/evas_main.c b/src/lib/evas/canvas/evas_main.c
index 8cac669e6f..d713c4abc0 100644
--- a/src/lib/evas/canvas/evas_main.c
+++ b/src/lib/evas/canvas/evas_main.c
@@ -1038,13 +1038,26 @@ evas_output_method_set(Evas *eo_e, int render_method)
e->engine.module = em;
evas_module_ref(em);
/* get the engine info struct */
-   if (e->engine.func->output_info)
+   if (e->engine.func->info_size)
  {
 Efl_Canvas_Output *output;
 Eina_List *l;
 
 EINA_LIST_FOREACH(e->outputs, l, output)
-  if (!output->info) output->info = e->engine.func->output_info();
+  if (!output->info)
+{
+   output->info = calloc(1, e->engine.func->info_size);
+   if (!output->info) continue ;
+   output->info->magic = rand();
+   output->info_magic = output->info->magic;
+
+   if (e->engine.func->output_info_setup)
+ e->engine.func->output_info_setup(output->info);
+  }
+ }
+   else
+ {
+CRI("Engine not up to date no info size provided.");
  }
 
// Wayland/drm already handles seats.
diff --git a/src/lib/evas/canvas/evas_out.c b/src/lib/evas/canvas/evas_out.c
index 48bd5df96d..567ea58dc8 100644
--- a/src/lib/evas/canvas/evas_out.c
+++ b/src/lib/evas/canvas/evas_out.c
@@ -38,11 +38,22 @@ efl_canvas_output_add(Evas *canvas)
 
// The engine is already initialized, use it
// right away to setup the info structure
-   if (e->engine.func->output_info)
+   if (e->engine.func->info_size)
  {
-r->info = e->engine.func->output_info();
+r->info = calloc(1, e->engine.func->info_size);
+if (!r->info) goto on_error;
+r->info->magic = rand();
+r->info_magic = r->info->magic;
+
+if (e->engine.func->output_info_setup)
+  e->engine.func->output_info_setup(r->info);
+ }
+   else
+ {
+CRI("Engine not up to date no info size provided.");
  }
 
+ on_error:
return r;
 }
 
@@ -62,7 +73,8 @@ efl_canvas_output_del(Efl_Canvas_Output *output)
output->ector);
  e->engine.func->output_free(_evas_engine_context(e),
  output->output);
- e->engine.func->output_info_free(output->info);
+ free(output->info);
+ output->info = NULL;
   }
 e->outputs = eina_list_remove(e->outputs, output);
 
diff --git a/src/lib/evas/include/evas_private.h 
b/src/lib/evas/include/evas_private.h
index 0e71d31369..ba6b752940 100644
--- a/src/lib/evas/include/evas_private.h
+++ b/src/lib/evas/include/evas_private.h
@@ -1334,7 +1334,8 @@ struct _Efl_Canvas_Output
 
Ector_Surface *ector;
 
-   void *info, *output;
+   Evas_Engine_Info *info;
+   void *output;
Evas_Coord x, y, w, h;
 
int info_magic;
@@ -1393,10 +1394,9 @@ struct _Evas_Object_Func
 
 struct _Evas_Func
 {
-   void *(*output_info)   (void);
-   void (*output_info_free)   (void *info);
-   void *(*output_setup) 

[EGIT] [core/efl] master 12/67: evas: make the info size a parameter of the function to make it safer to roll in.

2017-08-25 Thread Cedric BAIL
cedric pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=29cde0ee81fa697583cf4afc37712a5b99d3d5a7

commit 29cde0ee81fa697583cf4afc37712a5b99d3d5a7
Author: Cedric BAIL <ced...@osg.samsung.com>
Date:   Fri Aug 25 10:48:20 2017 -0700

evas: make the info size a parameter of the function to make it safer to 
roll in.
---
 src/lib/evas/file/evas_module.c   |  3 ++-
 src/lib/evas/include/evas_private.h   |  2 +-
 src/modules/evas/engines/buffer/evas_engine.c |  4 +---
 src/modules/evas/engines/drm/evas_engine.c|  8 +++-
 src/modules/evas/engines/eglfs/evas_engine.c  |  4 +---
 src/modules/evas/engines/fb/evas_engine.c |  4 +---
 src/modules/evas/engines/gl_cocoa/evas_engine.c   |  4 +---
 src/modules/evas/engines/gl_drm/evas_engine.c |  4 +---
 src/modules/evas/engines/gl_generic/evas_engine.c |  2 +-
 src/modules/evas/engines/gl_sdl/evas_engine.c |  4 +---
 src/modules/evas/engines/gl_x11/evas_engine.c |  4 +---
 src/modules/evas/engines/psl1ght/evas_engine.c|  4 +---
 src/modules/evas/engines/software_ddraw/evas_engine.c |  4 +---
 src/modules/evas/engines/software_gdi/evas_engine.c   |  3 +--
 src/modules/evas/engines/software_x11/evas_engine.c   |  4 +---
 src/modules/evas/engines/wayland_egl/evas_engine.c|  4 +---
 src/modules/evas/engines/wayland_shm/evas_engine.c| 10 --
 17 files changed, 23 insertions(+), 49 deletions(-)

diff --git a/src/lib/evas/file/evas_module.c b/src/lib/evas/file/evas_module.c
index 003c84c75a..5930e21f13 100644
--- a/src/lib/evas/file/evas_module.c
+++ b/src/lib/evas/file/evas_module.c
@@ -765,7 +765,7 @@ evas_module_shutdown(void)
 }
 
 EAPI int
-_evas_module_engine_inherit(Evas_Func *funcs, char *name)
+_evas_module_engine_inherit(Evas_Func *funcs, char *name, size_t info)
 {
Evas_Module *em;
 
@@ -778,6 +778,7 @@ _evas_module_engine_inherit(Evas_Func *funcs, char *name)
  evas_module_ref(em);
  evas_module_use(em);
  *funcs = *((Evas_Func *)(em->functions));
+ funcs->info_size = info;
  return 1;
   }
  }
diff --git a/src/lib/evas/include/evas_private.h 
b/src/lib/evas/include/evas_private.h
index 7f8eb355b6..1765464cb3 100644
--- a/src/lib/evas/include/evas_private.h
+++ b/src/lib/evas/include/evas_private.h
@@ -2036,7 +2036,7 @@ EAPI void evas_module_task_register(Eina_Bool 
(*cancelled)(void *data), void *da
 EAPI void evas_module_task_unregister(void);
 
 // expose for use in engines
-EAPI int _evas_module_engine_inherit(Evas_Func *funcs, char *name);
+EAPI int _evas_module_engine_inherit(Evas_Func *funcs, char *name, size_t 
info);
 EAPI const char *_evas_module_libdir_get(void);
 const char *_evas_module_datadir_get(void);
 EAPI Eina_List *_evas_canvas_image_data_unset(Evas *eo_e);
diff --git a/src/modules/evas/engines/buffer/evas_engine.c 
b/src/modules/evas/engines/buffer/evas_engine.c
index 821e47d8c8..7e21915da3 100644
--- a/src/modules/evas/engines/buffer/evas_engine.c
+++ b/src/modules/evas/engines/buffer/evas_engine.c
@@ -163,7 +163,7 @@ module_open(Evas_Module *em)
 {
if (!em) return 0;
/* get whatever engine module we inherit from */
-   if (!_evas_module_engine_inherit(, "software_generic")) return 0;
+   if (!_evas_module_engine_inherit(, "software_generic", sizeof 
(Evas_Engine_Info_Buffer))) return 0;
 
_evas_engine_buffer_log_dom = eina_log_domain_register
  ("evas-buffer", EINA_COLOR_BLUE);
@@ -182,8 +182,6 @@ module_open(Evas_Module *em)
ORD(canvas_alpha_get);
ORD(output_free);
 
-   func.info_size = sizeof (Evas_Engine_Info_Buffer);
-
/* now advertise out own api */
em->functions = (void *)();
return 1;
diff --git a/src/modules/evas/engines/drm/evas_engine.c 
b/src/modules/evas/engines/drm/evas_engine.c
index 927a17e57b..53fc902fb4 100644
--- a/src/modules/evas/engines/drm/evas_engine.c
+++ b/src/modules/evas/engines/drm/evas_engine.c
@@ -214,10 +214,10 @@ module_open(Evas_Module *em)
if (!em) return 0;
 
/* try to inherit functions from software_generic engine */
-   if (!_evas_module_engine_inherit(, "software_generic")) return 0;
+   if (!_evas_module_engine_inherit(, "software_generic", sizeof 
(Evas_Engine_Info_Drm))) return 0;
 
/* try to create eina logging domain */
-   _evas_engine_drm_log_dom = 
+   _evas_engine_drm_log_dom =
  eina_log_domain_register("evas-drm", EVAS_DEFAULT_LOG_COLOR);
 
/* if we could not create a logging domain, error out */
@@ -240,15 +240,13 @@ module_open(Evas_Module *em)
EVAS_API_OVERRIDE(image_plane_assign, , eng_);
EVAS_API_OVERRIDE(image_plane_release, , eng_);
 
-   func.info_size = sizeof (Evas_Engine_Info_Drm);
-
/* advertise our engine functions */
em->functions = (void *)();
 
return 1;
 }
 
-static void

[EGIT] [core/efl] master 25/67: evas: fix order in function of engine and output use for text operation.

2017-08-25 Thread Cedric BAIL
cedric pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=76a7198e0d31192ecc6a97fbb1b136b156fbf672

commit 76a7198e0d31192ecc6a97fbb1b136b156fbf672
Author: Cedric BAIL <ced...@osg.samsung.com>
Date:   Fri Aug 25 10:49:49 2017 -0700

evas: fix order in function of engine and output use for text operation.
---
 src/lib/evas/canvas/evas_object_text.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/lib/evas/canvas/evas_object_text.c 
b/src/lib/evas/canvas/evas_object_text.c
index ec194cd720..42ca752cb4 100644
--- a/src/lib/evas/canvas/evas_object_text.c
+++ b/src/lib/evas/canvas/evas_object_text.c
@@ -1833,8 +1833,8 @@ evas_object_text_render(Evas_Object *eo_obj,
   obj->cur->geometry.x + x + sl + ox + it->x, \
   obj->cur->geometry.y + y + st + oy,   \
   it->w, it->h);\
-  evas_font_draw_async_check(obj, output,   \
- engine,\
+  evas_font_draw_async_check(obj, engine,   \
+ output,\
  context,   \
  surface,   \
  o->font,   \

-- 




[EGIT] [core/efl] master 59/67: evas: Evas_Canvas3D rendering logic need a complete overhaul.

2017-08-25 Thread Cedric BAIL
cedric pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=440238a899166007c859610a0a2825718429797a

commit 440238a899166007c859610a0a2825718429797a
Author: Cedric BAIL <ced...@osg.samsung.com>
Date:   Fri Aug 25 10:52:48 2017 -0700

evas: Evas_Canvas3D rendering logic need a complete overhaul.

For now, do not use Evas_Canvas3D in multi output context, it won't work.
The update code for Evas_Canvas3D_Node might trigger rendering logic, which
is opposite to what the scene graph logic should do. It require to much
reshuffle around to handle that case at the moment. So I am just adding a
warning.
---
 src/lib/evas/canvas/evas_canvas3d_texture.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/lib/evas/canvas/evas_canvas3d_texture.c 
b/src/lib/evas/canvas/evas_canvas3d_texture.c
index 2876364591..6471ddafbd 100644
--- a/src/lib/evas/canvas/evas_canvas3d_texture.c
+++ b/src/lib/evas/canvas/evas_canvas3d_texture.c
@@ -220,6 +220,7 @@ 
_evas_canvas3d_texture_evas_canvas3d_object_change_notify(Eo *obj, Evas_Canvas3D
  eina_hash_foreach(pd->materials, _texture_material_change_notify, obj);
 }
 
+/* FIXME: This code is problematic as it actually does rendering and rely on 
the output before we start rendering. */
 EOLIAN static void
 _evas_canvas3d_texture_evas_canvas3d_object_update_notify(Eo *obj, 
Evas_Canvas3D_Texture_Data *pd)
 {

-- 




[EGIT] [core/efl] master 17/67: evas: Render_Engine_Swap_Mode is actually about output swap.

2017-08-25 Thread Cedric BAIL
cedric pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=3e88aa37bc233ded87fdc69340ac02adc0830448

commit 3e88aa37bc233ded87fdc69340ac02adc0830448
Author: Cedric BAIL <ced...@osg.samsung.com>
Date:   Fri Aug 25 10:49:15 2017 -0700

evas: Render_Engine_Swap_Mode is actually about output swap.
---
 src/modules/evas/engines/buffer/evas_engine.h  |  2 +-
 src/modules/evas/engines/buffer/evas_outbuf.c  |  2 +-
 src/modules/evas/engines/drm/evas_engine.h |  2 +-
 src/modules/evas/engines/drm/evas_outbuf.c |  2 +-
 src/modules/evas/engines/eglfs/evas_engine.c   |  2 +-
 src/modules/evas/engines/eglfs/evas_engine.h   |  6 +++---
 src/modules/evas/engines/eglfs/evas_outbuf.c   |  4 ++--
 src/modules/evas/engines/gl_cocoa/evas_engine.h|  4 ++--
 src/modules/evas/engines/gl_cocoa/evas_outbuf.m|  2 +-
 src/modules/evas/engines/gl_drm/evas_engine.c  |  4 ++--
 src/modules/evas/engines/gl_drm/evas_engine.h  |  6 +++---
 src/modules/evas/engines/gl_drm/evas_outbuf.c  |  6 +++---
 src/modules/evas/engines/gl_generic/Evas_Engine_GL_Shared.h|  4 ++--
 src/modules/evas/engines/gl_x11/evas_engine.c  |  4 ++--
 src/modules/evas/engines/gl_x11/evas_engine.h  |  6 +++---
 src/modules/evas/engines/gl_x11/evas_x_main.c  |  6 +++---
 .../engines/software_generic/Evas_Engine_Software_Generic.h|  4 ++--
 .../engines/software_generic/Evas_Engine_Software_Shared.h |  2 +-
 src/modules/evas/engines/software_x11/evas_xlib_swapbuf.c  |  6 ++
 src/modules/evas/engines/software_x11/evas_xlib_swapbuf.h  |  2 +-
 src/modules/evas/engines/software_x11/evas_xlib_swapper.c  |  6 +++---
 src/modules/evas/engines/software_x11/evas_xlib_swapper.h  |  4 ++--
 src/modules/evas/engines/wayland_egl/evas_engine.c | 10 +-
 src/modules/evas/engines/wayland_egl/evas_engine.h |  6 +++---
 src/modules/evas/engines/wayland_egl/evas_wl_main.c|  6 +++---
 src/modules/evas/engines/wayland_shm/evas_engine.h |  2 +-
 src/modules/evas/engines/wayland_shm/evas_outbuf.c |  2 +-
 27 files changed, 55 insertions(+), 57 deletions(-)

diff --git a/src/modules/evas/engines/buffer/evas_engine.h 
b/src/modules/evas/engines/buffer/evas_engine.h
index 4fcf2e451f..f319b17ae2 100644
--- a/src/modules/evas/engines/buffer/evas_engine.h
+++ b/src/modules/evas/engines/buffer/evas_engine.h
@@ -87,7 +87,7 @@ void*evas_buffer_outbuf_buf_new_region_for_update  
(Outbuf *buf, int x,
 void evas_buffer_outbuf_buf_free_region_for_update (Outbuf *buf, 
RGBA_Image *update);
 void evas_buffer_outbuf_buf_push_updated_region(Outbuf *buf, 
RGBA_Image *update, int x, int y, int w, int h);
 void evas_buffer_outbuf_buf_switch_buffer  (Outbuf *buf, 
Tilebuf_Rect *surface_damage, Tilebuf_Rect *buffer_damage, Evas_Render_Mode 
render_mode);
-Render_Engine_Swap_Mode evas_buffer_outbuf_buf_swap_mode_get(Outbuf *buf);
+Render_Output_Swap_Mode evas_buffer_outbuf_buf_swap_mode_get(Outbuf *buf);
 int  evas_buffer_outbuf_buf_rot_get(Outbuf *buf);
 
 #endif
diff --git a/src/modules/evas/engines/buffer/evas_outbuf.c 
b/src/modules/evas/engines/buffer/evas_outbuf.c
index 02303167d9..f984e704d0 100644
--- a/src/modules/evas/engines/buffer/evas_outbuf.c
+++ b/src/modules/evas/engines/buffer/evas_outbuf.c
@@ -478,7 +478,7 @@ evas_buffer_outbuf_reconfigure(Outbuf *ob, int w, int h, 
int rot EINA_UNUSED, Ou
 switch_data);
 }
 
-Render_Engine_Swap_Mode
+Render_Output_Swap_Mode
 evas_buffer_outbuf_buf_swap_mode_get(Outbuf *ob)
 {
if (ob->func.switch_buffer) return MODE_DOUBLE;
diff --git a/src/modules/evas/engines/drm/evas_engine.h 
b/src/modules/evas/engines/drm/evas_engine.h
index a14ce15b07..9891945781 100644
--- a/src/modules/evas/engines/drm/evas_engine.h
+++ b/src/modules/evas/engines/drm/evas_engine.h
@@ -75,7 +75,7 @@ Outbuf *_outbuf_setup(Evas_Engine_Info_Drm *info, int w, int 
h);
 void _outbuf_free(Outbuf *ob);
 int _outbuf_rotation_get(Outbuf *ob);
 void _outbuf_reconfigure(Outbuf *ob, int w, int h, int rotation, Outbuf_Depth 
depth);
-Render_Engine_Swap_Mode _outbuf_state_get(Outbuf *ob);
+Render_Output_Swap_Mode _outbuf_state_get(Outbuf *ob);
 void *_outbuf_update_region_new(Outbuf *ob, int x, int y, int w, int h, int 
*cx, int *cy, int *cw, int *ch);
 void _outbuf_update_region_push(Outbuf *ob, RGBA_Image *update, int x, int y, 
int w, int h);
 void _outbuf_update_region_free(Outbuf *ob, RGBA_Image *update);
diff --git a/src/modules/evas/engines/drm/evas_outbuf.c 
b/src/modules/evas/engines/drm/evas_outbuf.c
index 79f8f6f12c..4029275712 100644
--- a/src/modules/evas/engines/drm/evas_outbuf.c
+++ b/src/mod

[EGIT] [core/efl] master 26/67: evas: differentiate engine from output.

2017-08-25 Thread Cedric BAIL
cedric pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=28397e7206322f2d31234d4ef77a588f7c0ba5e7

commit 28397e7206322f2d31234d4ef77a588f7c0ba5e7
Author: Cedric BAIL <ced...@osg.samsung.com>
Date:   Fri Aug 25 10:49:53 2017 -0700

evas: differentiate engine from output.
---
 src/lib/evas/canvas/evas_main.c|  6 
 src/lib/evas/canvas/evas_object_main.c |  8 ++---
 src/lib/evas/canvas/evas_render.c  | 26 +++---
 src/lib/evas/include/evas_inline.x |  8 +
 src/lib/evas/include/evas_private.h| 12 +--
 src/modules/evas/engines/buffer/evas_engine.c  |  8 ++---
 src/modules/evas/engines/drm/evas_engine.c | 10 +++---
 src/modules/evas/engines/eglfs/evas_engine.c   |  8 ++---
 src/modules/evas/engines/fb/evas_engine.c  |  8 ++---
 src/modules/evas/engines/gl_cocoa/evas_engine.c|  4 +--
 src/modules/evas/engines/gl_drm/evas_engine.c  |  8 ++---
 .../engines/gl_generic/Evas_Engine_GL_Generic.h|  5 +--
 src/modules/evas/engines/gl_sdl/evas_engine.c  |  8 ++---
 src/modules/evas/engines/gl_x11/evas_engine.c  |  8 ++---
 .../evas/engines/software_ddraw/evas_engine.c  |  8 ++---
 .../evas/engines/software_gdi/evas_engine.c|  8 ++---
 .../Evas_Engine_Software_Generic.h | 21 +--
 .../evas/engines/software_generic/evas_engine.c| 41 ++
 .../evas/engines/software_x11/evas_engine.c| 18 +-
 src/modules/evas/engines/wayland_egl/evas_engine.c |  8 ++---
 src/modules/evas/engines/wayland_shm/evas_engine.c |  8 ++---
 21 files changed, 146 insertions(+), 93 deletions(-)

diff --git a/src/lib/evas/canvas/evas_main.c b/src/lib/evas/canvas/evas_main.c
index f72f0d71f1..043133ab30 100644
--- a/src/lib/evas/canvas/evas_main.c
+++ b/src/lib/evas/canvas/evas_main.c
@@ -378,7 +378,9 @@ next_zombie:
evas_event_callback_all_del(eo_e);
evas_event_callback_cleanup(eo_e);
 
+   /* cleanup engine backend */
EINA_LIST_FREE(e->outputs, evo) efl_canvas_output_del(evo);
+   e->engine.func->engine_free(e->backend);
 
if (e->common_init)
  {
@@ -1037,6 +1039,10 @@ evas_output_method_set(Evas *eo_e, int render_method)
if (e->engine.module) evas_module_unref(e->engine.module);
e->engine.module = em;
evas_module_ref(em);
+
+   /* Initialize the engine first */
+   e->backend = e->engine.func->engine_new();
+
/* get the engine info struct */
if (e->engine.func->info_size)
  {
diff --git a/src/lib/evas/canvas/evas_object_main.c 
b/src/lib/evas/canvas/evas_object_main.c
index a237da4ea4..ea824aca86 100644
--- a/src/lib/evas/canvas/evas_object_main.c
+++ b/src/lib/evas/canvas/evas_object_main.c
@@ -738,7 +738,7 @@ evas_object_render_pre_effect_updates(Eina_Array *rects, 
Evas_Object *eo_obj, in
 obj->cur->cache.clip.w,
 obj->cur->cache.clip.h);
  if ((w > 0) && (h > 0))
-   obj->layer->evas->engine.func->output_redraws_rect_add(ENC, 
ENDT,
+   obj->layer->evas->engine.func->output_redraws_rect_add(ENC,
   x + 
e->framespace.x,
   y + 
e->framespace.y,
   w, h);
@@ -753,7 +753,7 @@ evas_object_render_pre_effect_updates(Eina_Array *rects, 
Evas_Object *eo_obj, in
 obj->prev->cache.clip.w,
 obj->prev->cache.clip.h);
  if ((w > 0) && (h > 0))
-   obj->layer->evas->engine.func->output_redraws_rect_add(ENC, 
ENDT,
+   obj->layer->evas->engine.func->output_redraws_rect_add(ENC,
   x + 
e->framespace.x,
   y + 
e->framespace.y,
   w, h);
@@ -776,7 +776,7 @@ evas_object_render_pre_effect_updates(Eina_Array *rects, 
Evas_Object *eo_obj, in
   obj->cur->cache.clip.w,
   obj->cur->cache.clip.h);
if ((w > 0) && (h > 0))
- 
obj->layer->evas->engine.func->output_redraws_rect_add(ENC, ENDT,
+ 
obj->layer->evas->engine.func->output_redraws_rect_add(ENC,

 x + e->framespace.x,
 

[EGIT] [core/efl] master 48/67: evas: make image_native_set use engine context not output.

2017-08-25 Thread Cedric BAIL
cedric pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=cc4d41c89001ecc449cdfa5d631ffae8aacd8a9c

commit cc4d41c89001ecc449cdfa5d631ffae8aacd8a9c
Author: Cedric BAIL <ced...@osg.samsung.com>
Date:   Fri Aug 25 10:52:03 2017 -0700

evas: make image_native_set use engine context not output.
---
 src/modules/evas/engines/gl_x11/evas_engine.c | 109 +-
 1 file changed, 55 insertions(+), 54 deletions(-)

diff --git a/src/modules/evas/engines/gl_x11/evas_engine.c 
b/src/modules/evas/engines/gl_x11/evas_engine.c
index 0a9a69ce00..45675ecaf0 100644
--- a/src/modules/evas/engines/gl_x11/evas_engine.c
+++ b/src/modules/evas/engines/gl_x11/evas_engine.c
@@ -2286,8 +2286,8 @@ eng_image_native_shutdown(void *engine EINA_UNUSED, 
Evas_Native_Surface_Type typ
 static void *
 eng_image_native_set(void *engine, void *image, void *native)
 {
-  Render_Engine *re = (Render_Engine *)engine;
   const Evas_Native_Surface *ns = native;
+  Evas_Engine_GL_Context *gl_context;
   Evas_GL_Image *im = image, *im2 = NULL;
   Visual *vis = NULL;
   Pixmap pm = 0;
@@ -2296,17 +2296,20 @@ eng_image_native_set(void *engine, void *image, void 
*native)
   unsigned int tex = 0;
   unsigned int fbo = 0;
   void *buffer = NULL;
+  Outbuf *ob;
 #ifdef GL_GLES
 # ifdef HAVE_WAYLAND
   void *wlid, *wl_buf = NULL;
 # endif
 #endif
 
+  gl_context = gl_generic_context_find(engine);
+  ob = gl_generic_any_output_get(engine);
   if (!im)
 {
if ((ns) && (ns->type == EVAS_NATIVE_SURFACE_OPENGL))
  {
-im = 
glsym_evas_gl_common_image_new_from_data(eng_get_ob(re)->gl_context,
+im = glsym_evas_gl_common_image_new_from_data(gl_context,
 ns->data.opengl.w,
 ns->data.opengl.h,
 NULL, 1,
@@ -2381,8 +2384,6 @@ eng_image_native_set(void *engine, void *image, void 
*native)
 }
   if ((!ns) && (!im->native.data)) return im;
 
-  eng_window_use(eng_get_ob(re));
-
   if (im->native.data)
 {
if (im->native.func.free)
@@ -2395,7 +2396,7 @@ eng_image_native_set(void *engine, void *image, void 
*native)
   if (ns->type == EVAS_NATIVE_SURFACE_X11)
 {
pmid = pm;
-   im2 = 
eina_hash_find(eng_get_ob(re)->gl_context->shared->native_pm_hash, );
+   im2 = eina_hash_find(gl_context->shared->native_pm_hash, );
if (im2 == im) return im;
if (im2)
  {
@@ -2411,7 +2412,7 @@ eng_image_native_set(void *engine, void *image, void 
*native)
   else if (ns->type == EVAS_NATIVE_SURFACE_OPENGL)
 {
texid = tex;
-   im2 = 
eina_hash_find(eng_get_ob(re)->gl_context->shared->native_tex_hash, );
+   im2 = eina_hash_find(gl_context->shared->native_tex_hash, );
if (im2 == im) return im;
if (im2)
  {
@@ -2426,7 +2427,7 @@ eng_image_native_set(void *engine, void *image, void 
*native)
 }
   else if (ns->type == EVAS_NATIVE_SURFACE_TBM)
 {
-   im2 = 
eina_hash_find(eng_get_ob(re)->gl_context->shared->native_tbm_hash, );
+   im2 = eina_hash_find(gl_context->shared->native_tbm_hash, );
if (im2 == im) return im;
if (im2)
  {
@@ -2441,7 +2442,7 @@ eng_image_native_set(void *engine, void *image, void 
*native)
 }
   else if (ns->type == EVAS_NATIVE_SURFACE_EVASGL)
 {
-   im2 = 
eina_hash_find(eng_get_ob(re)->gl_context->shared->native_evasgl_hash, );
+   im2 = eina_hash_find(gl_context->shared->native_evasgl_hash, );
if (im2 == im) return im;
if (im2)
  {
@@ -2459,7 +2460,7 @@ eng_image_native_set(void *engine, void *image, void 
*native)
 #ifdef GL_GLES
 # ifdef HAVE_WAYLAND
 wlid = wl_buf;
-im2 = 
eina_hash_find(eng_get_ob(re)->gl_context->shared->native_wl_hash, );
+im2 = eina_hash_find(gl_context->shared->native_wl_hash, );
 if (im2 == im) return im;
 if (im2)
   {
@@ -2473,7 +2474,7 @@ eng_image_native_set(void *engine, void *image, void 
*native)
 # endif
 #endif
  }
-  im2 = glsym_evas_gl_common_image_new_from_data(eng_get_ob(re)->gl_context,
+  im2 = glsym_evas_gl_common_image_new_from_data(gl_context,
  im->w, im->h, NULL, im->alpha,
  EVAS_COLORSPACE_ARGB);
   glsym_evas_gl_common_image_free(im);
@@ -2519,7 +2520,7 @@ eng_image_native_set(void *engine, void *image, void 
*native)
  config_attrs[i++] = EGL_PIXMAP_BIT;
  config_attrs[i++] = EGL_NONE;
 
- if (!eglChooseConfig(eng_get_ob(re)->egl_disp, config_attrs,
+ if (!eglChooseConfig(ob->egl_disp, config_attrs,
  

[EGIT] [core/efl] master 55/67: evas: use output instead of default one during rendering of proxy.

2017-08-25 Thread Cedric BAIL
cedric pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=a5b4defdd559089bf289d4f71a4b7f015c586af9

commit a5b4defdd559089bf289d4f71a4b7f015c586af9
Author: Cedric BAIL <ced...@osg.samsung.com>
Date:   Fri Aug 25 10:52:29 2017 -0700

evas: use output instead of default one during rendering of proxy.
---
 src/lib/evas/canvas/evas_filter_mixin.c | 2 +-
 src/lib/evas/canvas/evas_object_image.c | 2 +-
 src/lib/evas/canvas/evas_object_textblock.c | 2 +-
 src/lib/evas/canvas/evas_render.c   | 4 ++--
 src/lib/evas/filters/evas_filter.c  | 4 ++--
 src/lib/evas/include/evas_filter.h  | 2 +-
 src/lib/evas/include/evas_private.h | 2 +-
 7 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/src/lib/evas/canvas/evas_filter_mixin.c 
b/src/lib/evas/canvas/evas_filter_mixin.c
index 3f3292ec04..64574b3fd2 100644
--- a/src/lib/evas/canvas/evas_filter_mixin.c
+++ b/src/lib/evas/canvas/evas_filter_mixin.c
@@ -412,7 +412,7 @@ evas_filter_object_render(Eo *eo_obj, 
Evas_Object_Protected_Data *obj,
  }
 
// Proxies
-   evas_filter_context_proxy_render_all(filter, eo_obj, EINA_FALSE);
+   evas_filter_context_proxy_render_all(filter, eo_obj, output, EINA_FALSE);
 
// Draw Context
drawctx = ENFN->context_new(engine);
diff --git a/src/lib/evas/canvas/evas_object_image.c 
b/src/lib/evas/canvas/evas_object_image.c
index 9db54b42ec..6d23f1a212 100644
--- a/src/lib/evas/canvas/evas_object_image.c
+++ b/src/lib/evas/canvas/evas_object_image.c
@@ -2092,7 +2092,7 @@ _evas_image_pixels_get(Eo *eo_obj, 
Evas_Object_Protected_Data *obj,
else
  {
 o->proxyrendering = EINA_TRUE;
-evas_render_proxy_subrender(obj->layer->evas->evas, o->cur->source,
+evas_render_proxy_subrender(obj->layer->evas->evas, output, 
o->cur->source,
 eo_obj, obj, o->proxy_src_clip, 
EINA_FALSE);
 pixels = source->proxy->surface;
 *imagew = source->proxy->w;
diff --git a/src/lib/evas/canvas/evas_object_textblock.c 
b/src/lib/evas/canvas/evas_object_textblock.c
index 79abde8b94..ae0ab261af 100644
--- a/src/lib/evas/canvas/evas_object_textblock.c
+++ b/src/lib/evas/canvas/evas_object_textblock.c
@@ -13520,7 +13520,7 @@ evas_object_textblock_render(Evas_Object *eo_obj 
EINA_UNUSED,
 ENFN->context_multiplier_set(engine, context,
  obj->cur->cache.clip.r, 
obj->cur->cache.clip.g,
  obj->cur->cache.clip.b, 
obj->cur->cache.clip.a);
-evas_filter_context_proxy_render_all(ctx, eo_obj, EINA_FALSE);
+evas_filter_context_proxy_render_all(ctx, eo_obj, output, EINA_FALSE);
 evas_filter_context_buffers_allocate_all(ctx);
 evas_filter_target_set(ctx, context, surface, target.x, target.y, 
NULL);
 ti->gfx_filter->ctx = ctx;
diff --git a/src/lib/evas/canvas/evas_render.c 
b/src/lib/evas/canvas/evas_render.c
index 47d4efa025..f5485c4838 100644
--- a/src/lib/evas/canvas/evas_render.c
+++ b/src/lib/evas/canvas/evas_render.c
@@ -2309,7 +2309,7 @@ end:
  * TODO: 3d objects subrender should probably be merged here as well.
  */
 void
-evas_render_proxy_subrender(Evas *eo_e, Evas_Object *eo_source, Evas_Object 
*eo_proxy,
+evas_render_proxy_subrender(Evas *eo_e, void *output, Evas_Object *eo_source, 
Evas_Object *eo_proxy,
 Evas_Object_Protected_Data *proxy_obj,
 Eina_Bool source_clip, Eina_Bool do_async)
 {
@@ -2363,7 +2363,7 @@ evas_render_proxy_subrender(Evas *eo_e, Evas_Object 
*eo_source, Evas_Object *eo_
 ctx = ENFN->context_new(ENC);
 ENFN->context_color_set(ENC, ctx, 0, 0,0, 0);
 ENFN->context_render_op_set(ENC, ctx, EVAS_RENDER_COPY);
-ENFN->rectangle_draw(ENC, ENDT, ctx, proxy_write->surface, 0, 0, w, h, 
do_async);
+ENFN->rectangle_draw(ENC, output, ctx, proxy_write->surface, 0, 0, w, 
h, do_async);
 ENFN->context_free(ENC, ctx);
 eina_evlog("-proxy_fill", eo_proxy, 0.0, NULL);
 
diff --git a/src/lib/evas/filters/evas_filter.c 
b/src/lib/evas/filters/evas_filter.c
index e95296258b..0f0a835df7 100644
--- a/src/lib/evas/filters/evas_filter.c
+++ b/src/lib/evas/filters/evas_filter.c
@@ -118,7 +118,7 @@ _filter_buffer_backing_free(Evas_Filter_Buffer *fb)
 
 /** @hidden private render proxy objects */
 void
-evas_filter_context_proxy_render_all(Evas_Filter_Context *ctx, Eo *eo_obj,
+evas_filter_context_proxy_render_all(Evas_Filter_Context *ctx, Eo *eo_obj, 
void *output,
  Eina_Bool do_async)
 {
Evas_Object_Protected_Data *source;
@@ -148,7 +148,7 @@ evas_filter_context_proxy_render_all(Evas_Filter_Context 
*ctx, Eo *eo_obj,
XDBG("Source needs to be rendered: '%s' of type '%s' (%s)",
  

[EGIT] [core/efl] master 35/67: evas: remove image_surface_noscale_region_get from engine backend as it is unused.

2017-08-25 Thread Cedric BAIL
cedric pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=fc603df8d15113c55e5c09aba553cda173e03957

commit fc603df8d15113c55e5c09aba553cda173e03957
Author: Cedric BAIL <ced...@osg.samsung.com>
Date:   Fri Aug 25 10:51:13 2017 -0700

evas: remove image_surface_noscale_region_get from engine backend as it is 
unused.
---
 src/lib/evas/include/evas_private.h|  1 -
 src/modules/evas/engines/gl_generic/evas_engine.c  | 21 
 .../evas/engines/software_generic/evas_engine.c| 23 --
 3 files changed, 45 deletions(-)

diff --git a/src/lib/evas/include/evas_private.h 
b/src/lib/evas/include/evas_private.h
index b1ae9c7c65..4fdce26d28 100644
--- a/src/lib/evas/include/evas_private.h
+++ b/src/lib/evas/include/evas_private.h
@@ -1485,7 +1485,6 @@ struct _Evas_Func
void (*image_prepare)   (void *engine, void *image);
 
void *(*image_surface_noscale_new)  (void *engine, int w, int h, int 
alpha);
-   void (*image_surface_noscale_region_get)(void *engine, void *image, int *x, 
int *y, int *w, int *h);
 
int (*image_native_init)(void *engine, 
Evas_Native_Surface_Type type);
void (*image_native_shutdown)   (void *engine, 
Evas_Native_Surface_Type type);
diff --git a/src/modules/evas/engines/gl_generic/evas_engine.c 
b/src/modules/evas/engines/gl_generic/evas_engine.c
index bccfc791ee..125528ef64 100644
--- a/src/modules/evas/engines/gl_generic/evas_engine.c
+++ b/src/modules/evas/engines/gl_generic/evas_engine.c
@@ -3024,26 +3024,6 @@ eng_image_surface_noscale_new(void *engine, int w, int 
h, int alpha)
return evas_gl_common_image_surface_noscale_new(gl_context, w, h, alpha);
 }
 
-static void
-eng_image_surface_noscale_region_get(void *engine EINA_UNUSED, void *image, 
int *x, int *y, int *w, int *h)
-{
-   Evas_GL_Image *im = image;
-
-   if (im)
- {
-*x = im->tex->x;
-*y = im->tex->y;
-*w = im->w;
-*h = im->h;
-return;
- }
-
-   *x = 0;
-   *y = 0;
-   *w = 0;
-   *h = 0;
-}
-
 ////
 
 static GL_Filter_Apply_Func
@@ -3183,7 +3163,6 @@ module_open(Evas_Module *em)
 
ORD(image_prepare);
ORD(image_surface_noscale_new);
-   ORD(image_surface_noscale_region_get);
 
ORD(font_cache_flush);
ORD(font_cache_set);
diff --git a/src/modules/evas/engines/software_generic/evas_engine.c 
b/src/modules/evas/engines/software_generic/evas_engine.c
index af80a9b7a4..04bb27d815 100644
--- a/src/modules/evas/engines/software_generic/evas_engine.c
+++ b/src/modules/evas/engines/software_generic/evas_engine.c
@@ -1986,28 +1986,6 @@ eng_image_surface_noscale_new(void *engdata, int w, int 
h, int alpha)
 }
 
 static void
-eng_image_surface_noscale_region_get(void *engdata EINA_UNUSED, void *image, 
int *x, int *y, int *w, int *h)
-{
-   RGBA_Image *im = image;
-
-   if (im)
- {
-*x = 0;
-*y = 0;
-*w = im->cache_entry.w;
-*h = im->cache_entry.h;
-return;
- }
-   else
- {
-*x = 0;
-*y = 0;
-*w = 0;
-*h = 0;
- }
-}
-
-static void
 _image_flip_horizontal(DATA32 *pixels_out, const DATA32 *pixels_in,
int iw, int ih)
 {
@@ -4766,7 +4744,6 @@ static Evas_Func func =
  eng_image_data_slice_add,
  eng_image_prepare,
  eng_image_surface_noscale_new,
- eng_image_surface_noscale_region_get,
  eng_image_native_init,
  eng_image_native_shutdown,
  eng_image_native_set,

-- 




[EGIT] [core/efl] master 58/67: evas: propagate output in evas_render_updates_internal_loop instead of using ENDT.

2017-08-25 Thread Cedric BAIL
cedric pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=f354463dc1524da7e2475f3aab893959fcdc4e54

commit f354463dc1524da7e2475f3aab893959fcdc4e54
Author: Cedric BAIL <ced...@osg.samsung.com>
Date:   Fri Aug 25 10:52:42 2017 -0700

evas: propagate output in evas_render_updates_internal_loop instead of 
using ENDT.
---
 src/lib/evas/canvas/evas_render.c | 12 ++--
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/src/lib/evas/canvas/evas_render.c 
b/src/lib/evas/canvas/evas_render.c
index 8ef8bc1cda..17e4a1b368 100644
--- a/src/lib/evas/canvas/evas_render.c
+++ b/src/lib/evas/canvas/evas_render.c
@@ -2902,7 +2902,7 @@ evas_render_pre(Evas *eo_e, Evas_Public_Data *evas)
 
 static Eina_Bool
 evas_render_updates_internal_loop(Evas *eo_e, Evas_Public_Data *evas,
-  void *surface, void *context,
+  void *output, void *surface, void *context,
   Evas_Object_Protected_Data *top,
   int ux, int uy, int uw, int uh,
   int cx, int cy, int cw, int ch,
@@ -2951,7 +2951,7 @@ evas_render_updates_internal_loop(Evas *eo_e, 
Evas_Public_Data *evas,
 ENFN->context_color_set(ENC, context, 0, 0, 0, 0);
 ENFN->context_multiplier_unset(ENC, context);
 ENFN->context_render_op_set(ENC, context, EVAS_RENDER_COPY);
-ENFN->rectangle_draw(ENC, ENDT, context, surface, cx, cy, cw, ch, 
do_async);
+ENFN->rectangle_draw(ENC, output, context, surface, cx, cy, cw, ch, 
do_async);
 ENFN->context_cutout_clear(ENC, context);
 ENFN->context_clip_unset(ENC, context);
  }
@@ -3021,7 +3021,7 @@ evas_render_updates_internal_loop(Evas *eo_e, 
Evas_Public_Data *evas,
Evas_Object_Protected_Data *prev_mask = 
obj->clip.prev_mask;
 
if (mask->mask->redraw || !mask->mask->surface)
- evas_render_mask_subrender(obj->layer->evas, ENDT, 
mask, prev_mask, 4, do_async);
+ evas_render_mask_subrender(obj->layer->evas, output, 
mask, prev_mask, 4, do_async);
 
if (mask->mask->surface)
  {
@@ -3073,7 +3073,7 @@ evas_render_updates_internal_loop(Evas *eo_e, 
Evas_Public_Data *evas,
   obj->cur->cache.clip.h);
   eina_evlog("-cutouts_add", obj->object, 0.0, NULL);
   clean_them |= evas_render_mapped(evas, eo_obj, obj, context,
-   ENDT, surface,
+   output, surface,
off_x + fx, off_y + fy, 0,
cx, cy, cw, ch,
NULL, level + 3, do_async);
@@ -3458,7 +3458,7 @@ evas_render_updates_internal(Evas *eo_e,
 
RD(0, "  SNAPSHOT %s [sfc:%p ur:%d,%d %dx%d]\n", 
RDNAME(snap), pseudo_canvas, ur.x, ur.y, ur.w, ur.h);
ctx = ENFN->context_new(ENC);
-   clean_them |= evas_render_updates_internal_loop(eo_e, 
e, pseudo_canvas, ctx,
+   clean_them |= evas_render_updates_internal_loop(eo_e, 
e, ENDT, pseudo_canvas, ctx,
snap,
ur.x, 
ur.y, ur.w, ur.h,
cr.x, 
cr.y, cr.w, cr.h,
@@ -3486,7 +3486,7 @@ evas_render_updates_internal(Evas *eo_e,
}
 
  ctx = ENFN->context_new(ENC);
- clean_them |= evas_render_updates_internal_loop(eo_e, e, surface,
+ clean_them |= evas_render_updates_internal_loop(eo_e, e, ENDT, 
surface,
  ctx, NULL,
  ux, uy, uw, uh,
  cx, cy, cw, ch,

-- 




[EGIT] [core/efl] master 29/67: evas: introduce a engine_new/free in gl_generic backend.

2017-08-25 Thread Cedric BAIL
cedric pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=3a8d98a54f969ae7dbbc2450b49160a1bf023811

commit 3a8d98a54f969ae7dbbc2450b49160a1bf023811
Author: Cedric BAIL <ced...@osg.samsung.com>
Date:   Fri Aug 25 10:50:35 2017 -0700

evas: introduce a engine_new/free in gl_generic backend.
---
 .../engines/gl_generic/Evas_Engine_GL_Generic.h|  6 ++
 src/modules/evas/engines/gl_generic/evas_engine.c  | 25 ++
 2 files changed, 31 insertions(+)

diff --git a/src/modules/evas/engines/gl_generic/Evas_Engine_GL_Generic.h 
b/src/modules/evas/engines/gl_generic/Evas_Engine_GL_Generic.h
index 7fdcea535f..f2224692dd 100644
--- a/src/modules/evas/engines/gl_generic/Evas_Engine_GL_Generic.h
+++ b/src/modules/evas/engines/gl_generic/Evas_Engine_GL_Generic.h
@@ -8,6 +8,7 @@
 #include "../gl_common/evas_gl_core.h"
 #include "../gl_common/evas_gl_core_private.h"
 
+typedef struct _Render_Engine_GL_Generic Render_Engine_GL_Generic;
 typedef struct _Render_Output_GL_Generic Render_Output_GL_Generic;
 typedef struct _Context_3D Context_3D;
 
@@ -17,6 +18,11 @@ typedef void *(*Window_EGL_Display_Get)(Outbuf *ob);
 typedef Context_3D *(*Window_GL_Context_New)(Outbuf *ob);
 typedef void (*Window_GL_Context_Use)(Context_3D *ctx);
 
+struct _Render_Engine_GL_Generic
+{
+   Render_Engine_Software_Generic software;
+};
+
 struct _Render_Output_GL_Generic
 {
Render_Output_Software_Generic software;
diff --git a/src/modules/evas/engines/gl_generic/evas_engine.c 
b/src/modules/evas/engines/gl_generic/evas_engine.c
index ef9bf2a367..bba3c263c8 100644
--- a/src/modules/evas/engines/gl_generic/evas_engine.c
+++ b/src/modules/evas/engines/gl_generic/evas_engine.c
@@ -123,6 +123,28 @@ _context_stored_reset(void *data EINA_UNUSED, void 
*surface)
 #define CONTEXT_STORE(data, surface, context) _context_store(data, surface, 
context)
 #define CONTEXT_STORED_RESET(data, surface) _context_stored_reset(data, 
surface)
 
+static void *
+eng_engine_new(void)
+{
+   Render_Engine_GL_Generic *engine;
+
+   engine = calloc(1, sizeof (Render_Engine_GL_Generic));
+   if (!engine) return NULL;
+
+   return engine;
+}
+
+static void
+eng_engine_free(void *engine)
+{
+   Render_Engine_GL_Generic *e = engine;
+   Render_Output_GL_Generic *output;
+
+   EINA_LIST_FREE(e->software.outputs, output)
+ ERR("Output %p not properly cleaned before engine destruction.", output);
+   free(e);
+}
+
 static void
 eng_rectangle_draw(void *engine EINA_UNUSED, void *data, void *context, void 
*surface, int x, int y, int w, int h, Eina_Bool do_async EINA_UNUSED)
 {
@@ -3081,6 +3103,9 @@ module_open(Evas_Module *em)
func = pfunc;
/* now to override methods */
 #define ORD(f) EVAS_API_OVERRIDE(f, , eng_)
+   ORD(engine_new);
+   ORD(engine_free);
+
ORD(context_clip_image_set);
ORD(context_clip_image_unset);
ORD(context_clip_image_get);

-- 




[EGIT] [core/efl] master 56/67: evas: propagate output to evas_render_mask_subrender and don't use ENDT there.

2017-08-25 Thread Cedric BAIL
cedric pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=750b9d065f51133c3bba89c359b8787c7db0547c

commit 750b9d065f51133c3bba89c359b8787c7db0547c
Author: Cedric BAIL <ced...@osg.samsung.com>
Date:   Fri Aug 25 10:52:33 2017 -0700

evas: propagate output to evas_render_mask_subrender and don't use ENDT 
there.
---
 src/lib/evas/canvas/evas_render.c   | 23 +++
 src/lib/evas/include/evas_private.h |  1 -
 2 files changed, 15 insertions(+), 9 deletions(-)

diff --git a/src/lib/evas/canvas/evas_render.c 
b/src/lib/evas/canvas/evas_render.c
index f5485c4838..f9206439d3 100644
--- a/src/lib/evas/canvas/evas_render.c
+++ b/src/lib/evas/canvas/evas_render.c
@@ -119,6 +119,12 @@ struct _Cutout_Margin
 
 static Eina_Bool
 evas_render_updates_internal(Evas *eo_e, unsigned char make_updates, unsigned 
char do_draw, Evas_Render_Done_Cb done_func, void *done_data, Eina_Bool 
do_async);
+static void
+evas_render_mask_subrender(Evas_Public_Data *evas,
+   void *output,
+   Evas_Object_Protected_Data *mask,
+   Evas_Object_Protected_Data *prev_mask,
+   int level, Eina_Bool do_async);
 
 static Eina_List *_rendering_evases = NULL;
 
@@ -2049,7 +2055,7 @@ evas_render_mapped(Evas_Public_Data *evas, Evas_Object 
*eo_obj,
 redraw = EINA_TRUE;
  }
if (redraw)
- evas_render_mask_subrender(evas, mask, prev_mask, 
level + 1, do_async);
+ evas_render_mask_subrender(evas, ENDT, mask, 
prev_mask, level + 1, do_async);
 
if (mask->mask->surface)
  {
@@ -2121,7 +2127,7 @@ evas_render_mapped(Evas_Public_Data *evas, Evas_Object 
*eo_obj,
 redraw = EINA_TRUE;
  }
if (redraw)
- evas_render_mask_subrender(evas, mask, prev_mask, 
level + 1, do_async);
+ evas_render_mask_subrender(evas, ENDT, mask, 
prev_mask, level + 1, do_async);
 
if (mask->mask->surface)
  {
@@ -2214,7 +2220,7 @@ evas_render_mapped(Evas_Public_Data *evas, Evas_Object 
*eo_obj,
  redraw = EINA_TRUE;
   }
 if (redraw)
-  evas_render_mask_subrender(evas, mask, 
prev_mask, level + 1, do_async);
+  evas_render_mask_subrender(evas, ENDT, mask, 
prev_mask, level + 1, do_async);
 
 if (mask->mask->surface)
   {
@@ -2402,8 +2408,9 @@ evas_render_proxy_subrender(Evas *eo_e, void *output, 
Evas_Object *eo_source, Ev
  * In GL the target surface will be RGBA for now. TODO: Find out how to
  *   render GL to alpha, if that's possible.
  */
-void
+static void
 evas_render_mask_subrender(Evas_Public_Data *evas,
+   void *output,
Evas_Object_Protected_Data *mask,
Evas_Object_Protected_Data *prev_mask,
int level, Eina_Bool do_async)
@@ -2470,7 +2477,7 @@ evas_render_mask_subrender(Evas_Public_Data *evas,
   {
  // Note: This is preventive code. Never seen it happen.
  WRN("Mask render order may be invalid");
- evas_render_mask_subrender(evas, prev_mask, 
prev_mask->clip.prev_mask, level + 1, do_async);
+ evas_render_mask_subrender(evas, output, prev_mask, 
prev_mask->clip.prev_mask, level + 1, do_async);
   }
  }
 
@@ -2546,7 +2553,7 @@ evas_render_mask_subrender(Evas_Public_Data *evas,
   ctx = ENFN->context_new(ENC);
   ENFN->context_color_set(ENC, ctx, 0, 0, 0, 0);
   ENFN->context_render_op_set(ENC, ctx, EVAS_RENDER_COPY);
-  ENFN->rectangle_draw(ENC, ENDT, ctx, mdata->surface, 0, 0, w, h, 
do_async);
+  ENFN->rectangle_draw(ENC, output, ctx, mdata->surface, 0, 0, w, h, 
do_async);
   ENFN->context_free(ENC, ctx);
   eina_evlog("-mask_rect_clear", mask->object, 0.0, NULL);
 
@@ -2569,7 +2576,7 @@ evas_render_mask_subrender(Evas_Public_Data *evas,
   if (EINA_LIKELY(!mask->is_smart))
 {
mask->func->render(mask->object, mask, mask->private_data,
-  ENC, ENDT, ctx, mdata->surface, -x, -y, 
do_async);
+  ENC, output, ctx, mdata->surface, -x, -y, 
do_async);
 }
   else
 {
@@ -3010,7 +3017,7 @@ evas_render_updates_internal_loop(Evas *eo_e, 
Evas_Public_Data *evas,
Evas_Object_Protected_Data *prev_mas

[EGIT] [core/efl] master 32/67: evas: gl_common should not segv on freeing a NULL gl_image.

2017-08-25 Thread Cedric BAIL
cedric pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=c436cf693148cf6a9912c605d35ed6566e68bbed

commit c436cf693148cf6a9912c605d35ed6566e68bbed
Author: Cedric BAIL <ced...@osg.samsung.com>
Date:   Fri Aug 25 10:50:59 2017 -0700

evas: gl_common should not segv on freeing a NULL gl_image.
---
 src/modules/evas/engines/gl_common/evas_gl_image.c | 4 +++-
 src/modules/evas/engines/gl_generic/evas_ector_gl_buffer.c | 2 +-
 src/modules/evas/engines/gl_generic/evas_engine.c  | 9 -
 3 files changed, 8 insertions(+), 7 deletions(-)

diff --git a/src/modules/evas/engines/gl_common/evas_gl_image.c 
b/src/modules/evas/engines/gl_common/evas_gl_image.c
index cea4b1cdff..fe8aa5b62a 100644
--- a/src/modules/evas/engines/gl_common/evas_gl_image.c
+++ b/src/modules/evas/engines/gl_common/evas_gl_image.c
@@ -766,6 +766,8 @@ evas_gl_common_image_cache_flush(Evas_Engine_GL_Context *gc)
 EAPI void
 evas_gl_common_image_free(Evas_GL_Image *im)
 {
+   if (!im) return ;
+
im->references--;
if (im->references > 0) return;
 
@@ -794,7 +796,7 @@ evas_gl_common_image_free(Evas_GL_Image *im)
 
if (im->cs.data)
  {
-   if (!im->cs.no_free) free(im->cs.data);
+if (!im->cs.no_free) free(im->cs.data);
  }
if (im->cached)
  {
diff --git a/src/modules/evas/engines/gl_generic/evas_ector_gl_buffer.c 
b/src/modules/evas/engines/gl_generic/evas_ector_gl_buffer.c
index 84087a5657..2bd9cb33dc 100644
--- a/src/modules/evas/engines/gl_generic/evas_ector_gl_buffer.c
+++ b/src/modules/evas/engines/gl_generic/evas_ector_gl_buffer.c
@@ -134,7 +134,7 @@ _evas_ector_gl_buffer_gl_buffer_prepare(Eo *obj, 
Evas_Ector_GL_Buffer_Data *pd,
return;
 
 on_fail:
-   if (pd->glim) evas_gl_common_image_free(pd->glim);
+   evas_gl_common_image_free(pd->glim);
pd->glim = NULL;
 }
 
diff --git a/src/modules/evas/engines/gl_generic/evas_engine.c 
b/src/modules/evas/engines/gl_generic/evas_engine.c
index b437999219..2fec3e578c 100644
--- a/src/modules/evas/engines/gl_generic/evas_engine.c
+++ b/src/modules/evas/engines/gl_generic/evas_engine.c
@@ -2172,8 +2172,7 @@ eng_context_clip_image_unset(void *engine EINA_UNUSED, 
void *context)
RGBA_Draw_Context *ctx = context;
Evas_GL_Image *im = ctx->clip.mask;
 
-   if (im)
- evas_gl_common_image_free(im);
+   evas_gl_common_image_free(im);
 
ctx->clip.mask = NULL;
 }
@@ -2584,7 +2583,7 @@ eng_ector_free(void *engine_data)
 {
Evas_GL_Ector *r = engine_data;
 
-   if (r->gl) evas_gl_common_image_free(r->gl);
+   evas_gl_common_image_free(r->gl);
if (r->tofree) free(r->software);
free(r);
 }
@@ -2610,7 +2609,7 @@ eng_ector_begin(void *engine, void *context EINA_UNUSED, 
Ector_Surface *ector,
   {
  int err = EVAS_LOAD_ERROR_NONE;
 
- if (buffer->gl) evas_gl_common_image_free(buffer->gl);
+ evas_gl_common_image_free(buffer->gl);
  if (buffer->tofree) free(buffer->software);
  buffer->software = NULL;
 
@@ -2780,7 +2779,7 @@ eng_image_data_unmap(void *engine EINA_UNUSED, void 
*image, const Eina_Rw_Slice
   (map->mode & EFL_GFX_BUFFER_ACCESS_MODE_WRITE))
 evas_gl_common_texture_update(im->tex, im->im);
   im->maps = eina_inlist_remove(im->maps, 
EINA_INLIST_GET(map));
-  if (map->glim) evas_gl_common_image_free(map->glim);
+  evas_gl_common_image_free(map->glim);
   free(map);
}
  return found;

-- 




[EGIT] [core/efl] master 39/67: evas: remove image_content_hint_get from backend as it is unused.

2017-08-25 Thread Cedric BAIL
cedric pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=e9cd3e4c7ccbaed1c50bfb0ea14b1031004d8028

commit e9cd3e4c7ccbaed1c50bfb0ea14b1031004d8028
Author: Cedric BAIL <ced...@osg.samsung.com>
Date:   Fri Aug 25 10:51:27 2017 -0700

evas: remove image_content_hint_get from backend as it is unused.
---
 src/lib/evas/include/evas_private.h | 1 -
 src/modules/evas/engines/gl_generic/evas_engine.c   | 9 -
 src/modules/evas/engines/software_generic/evas_engine.c | 1 -
 3 files changed, 11 deletions(-)

diff --git a/src/lib/evas/include/evas_private.h 
b/src/lib/evas/include/evas_private.h
index cd8dd737d7..74ef28d84a 100644
--- a/src/lib/evas/include/evas_private.h
+++ b/src/lib/evas/include/evas_private.h
@@ -1536,7 +1536,6 @@ struct _Evas_Func
void *(*image_scaled_update)(void *engine, void *scaled, void 
*image, int dst_w, int dst_h, Eina_Bool smooth, Evas_Colorspace cspace);
 
void (*image_content_hint_set)  (void *engine, void *surface, int 
hint);
-   int  (*image_content_hint_get)  (void *engine, void *surface);
int  (*font_pen_coords_get) (void *engine, Evas_Font_Set *font, 
const Evas_Text_Props *intl_props, int pos, int *cpen_x, int *cy, int *cadv, 
int *ch);
Eina_Bool (*font_text_props_info_create) (void *engine, Evas_Font_Instance 
*fi, const Eina_Unicode *text, Evas_Text_Props *intl_props, const 
Evas_BiDi_Paragraph_Props *par_props, size_t pos, size_t len, 
Evas_Text_Props_Mode mode, const char *lang);
int  (*font_right_inset_get)(void *engine, Evas_Font_Set *font, 
const Evas_Text_Props *text_props);
diff --git a/src/modules/evas/engines/gl_generic/evas_engine.c 
b/src/modules/evas/engines/gl_generic/evas_engine.c
index 201f681b86..56f49392e0 100644
--- a/src/modules/evas/engines/gl_generic/evas_engine.c
+++ b/src/modules/evas/engines/gl_generic/evas_engine.c
@@ -1330,14 +1330,6 @@ eng_image_content_hint_set(void *engine, void *image, 
int hint)
evas_gl_common_image_content_hint_set(image, hint);
 }
 
-static int
-eng_image_content_hint_get(void *engine EINA_UNUSED, void *image)
-{
-   Evas_GL_Image *gim = image;
-   if (!gim) return EVAS_IMAGE_CONTENT_HINT_NONE;
-   return gim->content_hint;
-}
-
 static void
 eng_image_cache_flush(void *engine)
 {
@@ -3150,7 +3142,6 @@ module_open(Evas_Module *em)
ORD(image_scaled_update);
 
ORD(image_content_hint_set);
-   ORD(image_content_hint_get);
 
ORD(image_cache_flush);
ORD(image_cache_set);
diff --git a/src/modules/evas/engines/software_generic/evas_engine.c 
b/src/modules/evas/engines/software_generic/evas_engine.c
index 04bb27d815..f54c0843d6 100644
--- a/src/modules/evas/engines/software_generic/evas_engine.c
+++ b/src/modules/evas/engines/software_generic/evas_engine.c
@@ -4787,7 +4787,6 @@ static Evas_Func func =
  eng_image_map_clean,
  NULL, // eng_image_scaled_get - used for live scaling in GL only 
(fastpath)
  NULL, // eng_image_content_hint_set - software doesn't use it
- NULL, // eng_image_content_hint_get - software doesn't use it
  eng_font_pen_coords_get,
  eng_font_text_props_info_create,
  eng_font_right_inset_get,

-- 




[EGIT] [core/efl] master 37/67: evas: handle multiple output for plane assignment.

2017-08-25 Thread Cedric BAIL
cedric pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=7bcf483d6fd2cc49ec15187f9943b1e56140cff6

commit 7bcf483d6fd2cc49ec15187f9943b1e56140cff6
Author: Cedric BAIL <ced...@osg.samsung.com>
Date:   Fri Aug 25 10:51:20 2017 -0700

evas: handle multiple output for plane assignment.
---
 src/lib/evas/canvas/evas_object_image.c | 14 +---
 src/lib/evas/canvas/evas_out.c  | 16 -
 src/lib/evas/canvas/evas_render.c   | 63 +
 src/lib/evas/include/evas_private.h |  9 +++--
 4 files changed, 81 insertions(+), 21 deletions(-)

diff --git a/src/lib/evas/canvas/evas_object_image.c 
b/src/lib/evas/canvas/evas_object_image.c
index ba78359851..9ad1d68291 100644
--- a/src/lib/evas/canvas/evas_object_image.c
+++ b/src/lib/evas/canvas/evas_object_image.c
@@ -1842,7 +1842,9 @@ 
_efl_canvas_image_internal_efl_canvas_filter_internal_filter_input_render(
 }
 
 void
-_evas_object_image_plane_release(Evas_Object *eo_obj EINA_UNUSED, 
Evas_Object_Protected_Data *obj)
+_evas_object_image_plane_release(Evas_Object *eo_obj EINA_UNUSED,
+ Evas_Object_Protected_Data *obj,
+ Efl_Canvas_Output *output)
 {
Evas_Image_Data *o;
 
@@ -1854,12 +1856,14 @@ _evas_object_image_plane_release(Evas_Object *eo_obj 
EINA_UNUSED, Evas_Object_Pr
 
if (!o->plane) return;
 
-   ENFN->image_plane_release(ENDT, o->engine_data, o->plane);
+   ENFN->image_plane_release(output->output, o->engine_data, o->plane);
+   output->planes = eina_list_remove(output->planes, obj);
o->plane = NULL;
 }
 
 Eina_Bool
-_evas_object_image_can_use_plane(Evas_Object_Protected_Data *obj)
+_evas_object_image_can_use_plane(Evas_Object_Protected_Data *obj,
+ Efl_Canvas_Output *output)
 {
Evas_Native_Surface *ns;
Evas_Image_Data *o = obj->private_data;
@@ -1883,13 +1887,15 @@ 
_evas_object_image_can_use_plane(Evas_Object_Protected_Data *obj)
ns = ENFN->image_native_get(ENC, o->engine_data);
if (!ns) return EINA_FALSE;
 
-   o->plane = ENFN->image_plane_assign(ENDT, o->engine_data,
+   // FIXME: adjust position with output offset.
+   o->plane = ENFN->image_plane_assign(output->output, o->engine_data,
obj->cur->geometry.x,
obj->cur->geometry.y);
 
if (!o->plane)
  return EINA_FALSE;
 
+   output->planes = eina_list_append(output->planes, obj);
return EINA_TRUE;
 }
 
diff --git a/src/lib/evas/canvas/evas_out.c b/src/lib/evas/canvas/evas_out.c
index fa8d914bee..666becdf1e 100644
--- a/src/lib/evas/canvas/evas_out.c
+++ b/src/lib/evas/canvas/evas_out.c
@@ -99,10 +99,10 @@ efl_canvas_output_view_set(Efl_Canvas_Output *output,
e = _efl_canvas_output_async_block(output);
if (!e) return ;
 
-   output->x = x;
-   output->y = y;
-   output->w = w;
-   output->h = h;
+   output->geometry.x = x;
+   output->geometry.y = y;
+   output->geometry.w = w;
+   output->geometry.h = h;
// XXX: tell engine about any output size etc. changes
// XXX: tell evas to add damage if viewport loc/size changed
 }
@@ -111,10 +111,10 @@ EAPI void
 efl_canvas_output_view_get(Efl_Canvas_Output *output,
Evas_Coord *x, Evas_Coord *y, Evas_Coord *w, 
Evas_Coord *h)
 {
-   if (x) *x = output->x;
-   if (y) *y = output->y;
-   if (w) *w = output->w;
-   if (h) *h = output->h;
+   if (x) *x = output->geometry.x;
+   if (y) *y = output->geometry.y;
+   if (w) *w = output->geometry.w;
+   if (h) *h = output->geometry.h;
 }
 
 EAPI Eina_Bool
diff --git a/src/lib/evas/canvas/evas_render.c 
b/src/lib/evas/canvas/evas_render.c
index 8ebd3d9695..47d4efa025 100644
--- a/src/lib/evas/canvas/evas_render.c
+++ b/src/lib/evas/canvas/evas_render.c
@@ -1342,7 +1342,7 @@ pending_change(void *data, void *gdata EINA_UNUSED)
 }
 
 static Eina_Bool
-_evas_render_can_use_overlay(Evas_Public_Data *e, Evas_Object *eo_obj)
+_evas_render_can_use_overlay(Evas_Public_Data *e, Evas_Object *eo_obj, 
Efl_Canvas_Output *output)
 {
Eina_Rectangle *r;
Evas_Object *eo_tmp;
@@ -1360,7 +1360,7 @@ _evas_render_can_use_overlay(Evas_Public_Data *e, 
Evas_Object *eo_obj)
Eina_Bool surface_below, stacking_check, object_above = EINA_FALSE;
Eina_Bool ignore_window;
 
-   if (!_evas_object_image_can_use_plane(obj))
+   if (!_evas_object_image_can_use_plane(obj, output))
  return EINA_FALSE;
 
video_parent = _evas_object_image_video_parent_get(eo_obj);
@@ -3085,6 +3085,39 @@ evas_render_updates_internal_loop(Evas *eo_e, 
Evas_Public_Data *evas,
return clean_them;
 }
 
+static Efl_Canvas_Output *
+_evas_overlay_output_find(Evas_Public_Data *e, Evas_Object_Protected_Data *obj)
+{
+   Efl_Canvas_Output *output;
+   Eina_List *lo;
+   const 

[EGIT] [core/efl] master 18/67: evas: refactor buffer engine to have less indirect useless call.

2017-08-25 Thread Cedric BAIL
cedric pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=93531868c729aa3e12cedeade67dbbd7d1c50c5d

commit 93531868c729aa3e12cedeade67dbbd7d1c50c5d
Author: Cedric BAIL <ced...@osg.samsung.com>
Date:   Fri Aug 25 10:49:19 2017 -0700

evas: refactor buffer engine to have less indirect useless call.
---
 src/modules/evas/engines/buffer/evas_engine.c | 59 +++
 1 file changed, 15 insertions(+), 44 deletions(-)

diff --git a/src/modules/evas/engines/buffer/evas_engine.c 
b/src/modules/evas/engines/buffer/evas_engine.c
index 7e21915da3..7ece6c62b3 100644
--- a/src/modules/evas/engines/buffer/evas_engine.c
+++ b/src/modules/evas/engines/buffer/evas_engine.c
@@ -20,32 +20,25 @@ static Evas_Func func, pfunc;
 typedef Render_Output_Software_Generic Render_Engine;
 
 /* prototypes we will use here */
-static void *_output_setup(int w, int h, void *dest_buffer, int 
dest_buffer_row_bytes, int depth_type, int use_color_key, int alpha_threshold, 
int color_key_r, int color_key_g, int color_key_b, void *(*new_update_region) 
(int x, int y, int w, int h, int *row_bytes), void (*free_update_region) (int 
x, int y, int w, int h, void *data), void *(*switch_buffer) (void *data, void 
*dest_buffer), void *switch_data);
-
 static void eng_output_free(void *engine EINA_UNUSED, void *data);
 
-/* internal engine routines */
+/* engine api this module provides */
 static void *
-_output_setup(int w,
- int h,
- void *dest_buffer,
- int dest_buffer_row_bytes,
- int depth_type,
- int use_color_key,
- int alpha_threshold,
- int color_key_r,
- int color_key_g,
- int color_key_b,
- void *(*new_update_region) (int x, int y, int w, int h, int 
*row_bytes),
- void (*free_update_region) (int x, int y, int w, int h, void 
*data),
-  void *(*switch_buffer) (void *data, void *dest_buffer),
-  void *switch_data
- )
+eng_output_setup(void *engine EINA_UNUSED, void *in, unsigned int w, unsigned 
int h)
 {
+   Evas_Engine_Info_Buffer *info = in;
Outbuf *ob;
Render_Engine *re;
Outbuf_Depth dep;
DATA32 color_key = 0;
+   void *dest_buffer = info->info.dest_buffer;
+   int dest_buffer_row_bytes = info->info.dest_buffer_row_bytes;
+   int depth_type = info->info.depth_type;
+   int use_color_key = info->info.use_color_key;
+   int alpha_threshold = info->info.alpha_threshold;
+   int color_key_r = info->info.color_key_r;
+   int color_key_g = info->info.color_key_g;
+   int color_key_b = info->info.color_key_b;
 
re = calloc(1, sizeof(Render_Engine));
if (!re) return NULL;
@@ -75,10 +68,10 @@ _output_setup(int w,
 use_color_key,
 color_key,
 alpha_threshold,
-new_update_region,
-free_update_region,
-switch_buffer,
-switch_data);
+info->info.func.new_update_region,
+info->info.func.free_update_region,
+info->info.func.switch_buffer,
+info->info.switch_data);
if (!ob) goto on_error;
 
if (!evas_render_engine_software_generic_init(re, ob,
@@ -104,7 +97,6 @@ _output_setup(int w,
return NULL;
 }
 
-/* engine api this module provides */
 static void
 eng_output_info_setup(void *info)
 {
@@ -113,27 +105,6 @@ eng_output_info_setup(void *info)
einfo->render_mode = EVAS_RENDER_MODE_BLOCKING;
 }
 
-static void *
-eng_output_setup(void *engine EINA_UNUSED, void *in, unsigned int w, unsigned 
int h)
-{
-   Evas_Engine_Info_Buffer *info = in;
-
-   return _output_setup(w,
-h,
-info->info.dest_buffer,
-info->info.dest_buffer_row_bytes,
-info->info.depth_type,
-info->info.use_color_key,
-info->info.alpha_threshold,
-info->info.color_key_r,
-info->info.color_key_g,
-info->info.color_key_b,
-info->info.func.new_update_region,
-info->info.func.free_update_region,
-info->info.func.switch_buffer,
-info->info.switch_data);
-}
-
 static void
 eng_output_free(void *engine EINA_UNUSED, void *data)
 {

-- 




[EGIT] [core/efl] master 24/67: evas: simplify drm output cleanup code.

2017-08-25 Thread Cedric BAIL
cedric pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=94dbcf3e0d0678a2c8e48c64dffeff4089f28509

commit 94dbcf3e0d0678a2c8e48c64dffeff4089f28509
Author: Cedric BAIL <ced...@osg.samsung.com>
Date:   Fri Aug 25 10:49:46 2017 -0700

evas: simplify drm output cleanup code.
---
 src/modules/evas/engines/drm/evas_engine.c | 10 +++---
 1 file changed, 3 insertions(+), 7 deletions(-)

diff --git a/src/modules/evas/engines/drm/evas_engine.c 
b/src/modules/evas/engines/drm/evas_engine.c
index 5779c523eb..ca05530ba3 100644
--- a/src/modules/evas/engines/drm/evas_engine.c
+++ b/src/modules/evas/engines/drm/evas_engine.c
@@ -84,14 +84,10 @@ eng_output_update(void *engine EINA_UNUSED, void *data, 
void *einfo, unsigned in
 static void
 eng_output_free(void *engine EINA_UNUSED, void *data)
 {
-   Render_Engine *re;
+   Render_Engine *re = data;
 
-   re = data;
-   if (re)
- {
-evas_render_engine_software_generic_clean(>generic);
-free(re);
- }
+   evas_render_engine_software_generic_clean(>generic);
+   free(re);
 }
 
 static Ecore_Drm2_Fb *

-- 




[EGIT] [core/efl] master 45/67: evas: make filter handle multi output.

2017-08-25 Thread Cedric BAIL
cedric pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=fc1b7f7835116bd03878e4b0c1ec2243665fc859

commit fc1b7f7835116bd03878e4b0c1ec2243665fc859
Author: Cedric BAIL <ced...@osg.samsung.com>
Date:   Fri Aug 25 10:51:53 2017 -0700

evas: make filter handle multi output.
---
 src/lib/evas/canvas/evas_filter_mixin.c |  6 +--
 src/lib/evas/canvas/evas_object_textblock.c |  4 +-
 src/lib/evas/filters/evas_filter.c  | 66 +++--
 src/lib/evas/filters/evas_filter_parser.c   | 11 ++---
 src/lib/evas/filters/evas_filter_private.h  |  2 +-
 src/lib/evas/include/evas_filter.h  |  4 +-
 6 files changed, 57 insertions(+), 36 deletions(-)

diff --git a/src/lib/evas/canvas/evas_filter_mixin.c 
b/src/lib/evas/canvas/evas_filter_mixin.c
index ab9a8191d0..3f3292ec04 100644
--- a/src/lib/evas/canvas/evas_filter_mixin.c
+++ b/src/lib/evas/canvas/evas_filter_mixin.c
@@ -387,7 +387,7 @@ evas_filter_object_render(Eo *eo_obj, 
Evas_Object_Protected_Data *obj,
 
if (filter)
  {
-ok = evas_filter_context_program_use(filter, pd->data->chain, 
EINA_TRUE, X, Y);
+ok = evas_filter_context_program_use(engine, output, filter, 
pd->data->chain, EINA_TRUE, X, Y);
 if (!ok)
   {
  evas_filter_context_destroy(filter);
@@ -401,7 +401,7 @@ evas_filter_object_render(Eo *eo_obj, 
Evas_Object_Protected_Data *obj,
 filter = evas_filter_context_new(obj->layer->evas, do_async, 0);
 
 // Run script
-ok = evas_filter_context_program_use(filter, pd->data->chain, 
EINA_FALSE, X, Y);
+ok = evas_filter_context_program_use(engine, output, filter, 
pd->data->chain, EINA_FALSE, X, Y);
 if (!filter || !ok)
   {
  ERR("Parsing failed?");
@@ -449,7 +449,7 @@ evas_filter_object_render(Eo *eo_obj, 
Evas_Object_Protected_Data *obj,
 
// Run the filter now (maybe async)
efl_ref(eo_obj);
-   ok = evas_filter_context_run(filter);
+   ok = evas_filter_context_run(engine, output, filter);
if (!ok) ERR("Filter program failed to run!");
 
return ok;
diff --git a/src/lib/evas/canvas/evas_object_textblock.c 
b/src/lib/evas/canvas/evas_object_textblock.c
index a5325e6c1d..79abde8b94 100644
--- a/src/lib/evas/canvas/evas_object_textblock.c
+++ b/src/lib/evas/canvas/evas_object_textblock.c
@@ -13505,7 +13505,7 @@ evas_object_textblock_render(Evas_Object *eo_obj 
EINA_UNUSED,
 ctx = evas_filter_context_new(obj->layer->evas, do_async, 
ti->gfx_filter);
 evas_filter_state_prepare(eo_obj, , ti);
 evas_filter_program_state_set(pgm, );
-ok = evas_filter_context_program_use(ctx, pgm, EINA_FALSE, 0, 0);
+ok = evas_filter_context_program_use(engine, output, ctx, pgm, 
EINA_FALSE, 0, 0);
 if (!ok)
   {
  evas_filter_context_destroy(ctx);
@@ -13819,7 +13819,7 @@ evas_object_textblock_render(Evas_Object *eo_obj 
EINA_UNUSED,
   else if (ctx)
 {
evas_filter_context_post_run_callback_set(ctx, 
_filter_cb, obj->layer->evas);
-   evas_filter_context_run(ctx);
+   evas_filter_context_run(engine, output, ctx);
 }
}
   }
diff --git a/src/lib/evas/filters/evas_filter.c 
b/src/lib/evas/filters/evas_filter.c
index ca03b5dbbe..e95296258b 100644
--- a/src/lib/evas/filters/evas_filter.c
+++ b/src/lib/evas/filters/evas_filter.c
@@ -169,7 +169,7 @@ evas_filter_context_proxy_render_all(Evas_Filter_Context 
*ctx, Eo *eo_obj,
 }
 
 void
-_evas_filter_context_program_reuse(Evas_Filter_Context *ctx)
+_evas_filter_context_program_reuse(void *engine, void *output, 
Evas_Filter_Context *ctx)
 {
Evas_Filter_Buffer *fb;
Eina_List *li;
@@ -189,11 +189,11 @@ _evas_filter_context_program_reuse(Evas_Filter_Context 
*ctx)
 surface = evas_ector_buffer_render_image_get(fb->buffer);
 if (!surface) continue;
 
-dc = ENFN->context_new(ENC);
-ENFN->context_color_set(ENC, dc, 0, 0, 0, 0);
-ENFN->context_render_op_set(ENC, dc, EVAS_RENDER_COPY);
-ENFN->rectangle_draw(ENC, ENDT, dc, surface, 0, 0, fb->w, fb->h, 
ctx->async);
-ENFN->context_free(ENC, dc);
+dc = ENFN->context_new(engine);
+ENFN->context_color_set(engine, dc, 0, 0, 0, 0);
+ENFN->context_render_op_set(engine, dc, EVAS_RENDER_COPY);
+ENFN->rectangle_draw(engine, output, dc, surface, 0, 0, fb->w, fb->h, 
ctx->async);
+ENFN->context_free(engine, dc);
 fb->dirty = EINA_FALSE;
 
 evas_ector_buffer_engine_image_release(fb->buffer, surface);
@@ -1578,14 +1578,14 @@ evas_filter_target_set(Evas_Filter_Context *ctx, void 
*draw_context,
 }
 
 static Eina_Bool
-_filter_target_render(Evas_Filter_Context *ctx

[EGIT] [core/efl] master 27/67: evas: refactor gl_generic use of window_use with context_get.

2017-08-25 Thread Cedric BAIL
cedric pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=326ff87216967cb5aa544adc88cebdc5564cc290

commit 326ff87216967cb5aa544adc88cebdc5564cc290
Author: Cedric BAIL <ced...@osg.samsung.com>
Date:   Fri Aug 25 10:49:59 2017 -0700

evas: refactor gl_generic use of window_use with context_get.
---
 src/modules/evas/engines/gl_generic/evas_engine.c | 89 ++-
 1 file changed, 37 insertions(+), 52 deletions(-)

diff --git a/src/modules/evas/engines/gl_generic/evas_engine.c 
b/src/modules/evas/engines/gl_generic/evas_engine.c
index 66c632213b..0de805db36 100644
--- a/src/modules/evas/engines/gl_generic/evas_engine.c
+++ b/src/modules/evas/engines/gl_generic/evas_engine.c
@@ -49,6 +49,15 @@ int _evas_engine_GL_log_dom = -1;
 # endif
 #endif
 
+static Evas_Engine_GL_Context *
+gl_generic_context_get(Render_Output_GL_Generic *output)
+{
+   if (!output->software.ob) return NULL;
+   output->window_use(output->software.ob);
+   return output->window_gl_context_get(output->software.ob);
+
+}
+
 static int eng_gl_image_direct_get(void *data, void *image);
 static int eng_gl_surface_destroy(void *data, void *surface);
 static Eina_Bool eng_gl_surface_lock(void *data, void *surface);
@@ -83,7 +92,6 @@ _context_store(void *data, void *surface, void *context)
 if (rsc->id == evgl_engine->main_tid)
   {
  _need_context_restore = EINA_FALSE;
-
  rsc->stored.data = data;
  rsc->stored.surface = surface;
  rsc->stored.context = context;
@@ -113,8 +121,7 @@ eng_rectangle_draw(void *engine EINA_UNUSED, void *data, 
void *context, void *su
Evas_Engine_GL_Context *gl_context;
Render_Output_GL_Generic *re = data;
 
-   re->window_use(re->software.ob);
-   gl_context = re->window_gl_context_get(re->software.ob);
+   gl_context = gl_generic_context_get(re);
evas_gl_common_context_target_surface_set(gl_context, surface);
gl_context->dc = context;
evas_gl_common_rect_draw(gl_context, x, y, w, h);
@@ -126,8 +133,7 @@ eng_line_draw(void *engine EINA_UNUSED, void *data, void 
*context, void *surface
Evas_Engine_GL_Context *gl_context;
Render_Output_GL_Generic *re = data;
 
-   re->window_use(re->software.ob);
-   gl_context = re->window_gl_context_get(re->software.ob);
+   gl_context = gl_generic_context_get(re);
evas_gl_common_context_target_surface_set(gl_context, surface);
gl_context->dc = context;
evas_gl_common_line_draw(gl_context, p1x, p1y, p2x, p2y);
@@ -151,8 +157,7 @@ eng_polygon_draw(void *engine EINA_UNUSED, void *data, void 
*context, void *surf
Evas_Engine_GL_Context *gl_context;
Render_Output_GL_Generic *re = data;
 
-   re->window_use(re->software.ob);
-   gl_context = re->window_gl_context_get(re->software.ob);
+   gl_context = gl_generic_context_get(re);
evas_gl_common_context_target_surface_set(gl_context, surface);
gl_context->dc = context;
evas_gl_common_poly_draw(gl_context, polygon, x, y);
@@ -388,7 +393,7 @@ eng_image_native_set(void *engine, void *image, void 
*native)
   unsigned int tex = 0;
   unsigned int fbo = 0;
 
-  gl_context = re->window_gl_context_get(re->software.ob);
+  gl_context = gl_generic_context_get(re);
 
   if (!im)
 {
@@ -506,8 +511,7 @@ eng_image_load(void *engine, const char *file, const char 
*key, int *error, Evas
Render_Output_GL_Generic *re = engine;
 
*error = EVAS_LOAD_ERROR_NONE;
-   re->window_use(re->software.ob);
-   gl_context = re->window_gl_context_get(re->software.ob);
+   gl_context = gl_generic_context_get(re);
return evas_gl_common_image_load(gl_context, file, key, lo, error);
 }
 
@@ -518,8 +522,7 @@ eng_image_mmap(void *engine, Eina_File *f, const char *key, 
int *error, Evas_Ima
Render_Output_GL_Generic *re = engine;
 
*error = EVAS_LOAD_ERROR_NONE;
-   re->window_use(re->software.ob);
-   gl_context = re->window_gl_context_get(re->software.ob);
+   gl_context = gl_generic_context_get(re);
return evas_gl_common_image_mmap(gl_context, f, key, lo, error);
 }
 
@@ -529,8 +532,7 @@ eng_image_new_from_data(void *engine, int w, int h, DATA32 
*image_data, int alph
Evas_Engine_GL_Context *gl_context;
Render_Output_GL_Generic *re = engine;
 
-   re->window_use(re->software.ob);
-   gl_context = re->window_gl_context_get(re->software.ob);
+   gl_context = gl_generic_context_get(re);
return evas_gl_common_image_new_from_data(gl_context, w, h, image_data, 
alpha, cspace);
 }
 
@@ -540,8 +542,7 @@ eng_image_new_from_copied_data(void *engine, int w, int h, 
DATA32 *image_data, i
Evas_Engine_GL_Context *gl_context;
Render_Output_GL_Generic *re = engine;
 
-   re->window_use(re->software.ob);
-   gl_context = re->window_gl_context_get(re->software.ob);
+   gl_context = gl_generic_context_get(re);
return evas_gl_co

[EGIT] [core/efl] master 09/67: evas: all this function (info, setup and update) are really output related.

2017-08-25 Thread Cedric BAIL
cedric pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=1e2bbf8feae36fbca083ed030f26fd42d5436c9a

commit 1e2bbf8feae36fbca083ed030f26fd42d5436c9a
Author: Cedric BAIL <ced...@osg.samsung.com>
Date:   Fri Aug 25 10:48:09 2017 -0700

evas: all this function (info, setup and update) are really output related.
---
 src/lib/evas/canvas/evas_main.c|  4 ++--
 src/lib/evas/canvas/evas_out.c | 16 +++
 src/lib/evas/include/evas_private.h|  8 
 src/modules/evas/engines/buffer/evas_engine.c  | 16 +++
 src/modules/evas/engines/drm/evas_engine.c | 16 +++
 src/modules/evas/engines/eglfs/evas_engine.c   | 16 +++
 src/modules/evas/engines/fb/evas_engine.c  | 12 +--
 src/modules/evas/engines/gl_cocoa/evas_engine.c| 24 +++---
 src/modules/evas/engines/gl_drm/evas_engine.c  | 16 +++
 src/modules/evas/engines/gl_sdl/evas_engine.c  | 12 +--
 src/modules/evas/engines/gl_x11/evas_engine.c  | 16 +++
 src/modules/evas/engines/psl1ght/evas_engine.c | 12 +--
 .../evas/engines/software_ddraw/evas_engine.c  | 12 +--
 .../evas/engines/software_gdi/evas_engine.c| 16 +++
 .../evas/engines/software_x11/evas_engine.c| 16 +++
 src/modules/evas/engines/wayland_egl/evas_engine.c | 16 +++
 src/modules/evas/engines/wayland_shm/evas_engine.c | 16 +++
 17 files changed, 122 insertions(+), 122 deletions(-)

diff --git a/src/lib/evas/canvas/evas_main.c b/src/lib/evas/canvas/evas_main.c
index a30a853f37..8cac669e6f 100644
--- a/src/lib/evas/canvas/evas_main.c
+++ b/src/lib/evas/canvas/evas_main.c
@@ -1038,13 +1038,13 @@ evas_output_method_set(Evas *eo_e, int render_method)
e->engine.module = em;
evas_module_ref(em);
/* get the engine info struct */
-   if (e->engine.func->info)
+   if (e->engine.func->output_info)
  {
 Efl_Canvas_Output *output;
 Eina_List *l;
 
 EINA_LIST_FOREACH(e->outputs, l, output)
-  if (!output->info) output->info = e->engine.func->info();
+  if (!output->info) output->info = e->engine.func->output_info();
  }
 
// Wayland/drm already handles seats.
diff --git a/src/lib/evas/canvas/evas_out.c b/src/lib/evas/canvas/evas_out.c
index 5310d28f5c..48bd5df96d 100644
--- a/src/lib/evas/canvas/evas_out.c
+++ b/src/lib/evas/canvas/evas_out.c
@@ -38,9 +38,9 @@ efl_canvas_output_add(Evas *canvas)
 
// The engine is already initialized, use it
// right away to setup the info structure
-   if (e->engine.func->info)
+   if (e->engine.func->output_info)
  {
-r->info = e->engine.func->info();
+r->info = e->engine.func->output_info();
  }
 
return r;
@@ -62,7 +62,7 @@ efl_canvas_output_del(Efl_Canvas_Output *output)
output->ector);
  e->engine.func->output_free(_evas_engine_context(e),
  output->output);
- e->engine.func->info_free(output->info);
+ e->engine.func->output_info_free(output->info);
   }
 e->outputs = eina_list_remove(e->outputs, output);
 
@@ -113,10 +113,10 @@ efl_canvas_output_engine_info_set(Efl_Canvas_Output 
*output,
 
if (output->output)
  {
-if (e->engine.func->update)
+if (e->engine.func->output_update)
   {
- e->engine.func->update(_evas_engine_context(e), output->output, 
info,
-e->output.w, e->output.h);
+ e->engine.func->output_update(_evas_engine_context(e), 
output->output, info,
+   e->output.w, e->output.h);
   }
 else
   {
@@ -136,8 +136,8 @@ efl_canvas_output_engine_info_set(Efl_Canvas_Output *output,
   }
 
  setup:
-output->output = e->engine.func->setup(_evas_engine_context(e), info,
-   e->output.w, e->output.h);
+output->output = e->engine.func->output_setup(_evas_engine_context(e), 
info,
+  e->output.w, 
e->output.h);
  }
 
return !!output->output;
diff --git a/src/lib/evas/include/evas_private.h 
b/src/lib/evas/include/evas_private.h
index 4e939dad67..0e71d31369 100644
--- a/src/lib/evas/include/evas_private.h
+++ b/src/lib/evas/include/evas_private.h
@@ -1393,10 +1393,10 @@ struct _Evas_Object_Func
 
 struct _Evas_Func
 {
-   void *(*info)   (void);
-   void (*info_free)   (void *info);
-   void *(*setup)

[EGIT] [core/efl] master 03/67: evas: no need to double init tilebuf as it is created by software generic.

2017-08-25 Thread Cedric BAIL
cedric pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=741ecaf2cf217fd19dbc93cc5580ac876d21d1b1

commit 741ecaf2cf217fd19dbc93cc5580ac876d21d1b1
Author: Cedric BAIL <ced...@osg.samsung.com>
Date:   Fri Aug 25 10:47:39 2017 -0700

evas: no need to double init tilebuf as it is created by software generic.
---
 src/modules/evas/engines/eglfs/evas_engine.c   |  8 
 src/modules/evas/engines/gl_drm/evas_engine.c  |  7 ---
 src/modules/evas/engines/wayland_egl/evas_engine.c | 12 ++--
 3 files changed, 2 insertions(+), 25 deletions(-)

diff --git a/src/modules/evas/engines/eglfs/evas_engine.c 
b/src/modules/evas/engines/eglfs/evas_engine.c
index f4813ecd17..b71babebc9 100644
--- a/src/modules/evas/engines/eglfs/evas_engine.c
+++ b/src/modules/evas/engines/eglfs/evas_engine.c
@@ -753,14 +753,6 @@ eng_setup(void *engine EINA_UNUSED, void *in, unsigned int 
w, unsigned int h)
evas_render_engine_software_generic_merge_mode_set(>generic.software, 
merge_mode);
 
if (re->generic.software.tb)
- evas_common_tilebuf_free(re->generic.software.tb);
-   re->generic.software.tb =
- evas_common_tilebuf_new(w, h);
-   if (re->generic.software.tb)
- evas_common_tilebuf_set_tile_size(re->generic.software.tb,
-   TILESIZE, TILESIZE);
-
-   if (re->generic.software.tb)
  
evas_render_engine_software_generic_tile_strict_set(>generic.software, 
EINA_TRUE);
 
evas_outbuf_use(eng_get_ob(re));
diff --git a/src/modules/evas/engines/gl_drm/evas_engine.c 
b/src/modules/evas/engines/gl_drm/evas_engine.c
index 0b0b191a10..097be67632 100644
--- a/src/modules/evas/engines/gl_drm/evas_engine.c
+++ b/src/modules/evas/engines/gl_drm/evas_engine.c
@@ -1009,13 +1009,6 @@ eng_setup(void *engine EINA_UNUSED, void *in, unsigned 
int w, unsigned int h)
  }
 
if (re->generic.software.tb)
- evas_common_tilebuf_free(re->generic.software.tb);
-   re->generic.software.tb = evas_common_tilebuf_new(w, h);
-   if (re->generic.software.tb)
- evas_common_tilebuf_set_tile_size(re->generic.software.tb,
-   TILESIZE, TILESIZE);
-
-   if (re->generic.software.tb)
  
evas_render_engine_software_generic_tile_strict_set(>generic.software, 
EINA_TRUE);
 
evas_outbuf_use(eng_get_ob(re));
diff --git a/src/modules/evas/engines/wayland_egl/evas_engine.c 
b/src/modules/evas/engines/wayland_egl/evas_engine.c
index 6b849b3c18..6dd9bc91bb 100644
--- a/src/modules/evas/engines/wayland_egl/evas_engine.c
+++ b/src/modules/evas/engines/wayland_egl/evas_engine.c
@@ -649,16 +649,8 @@ eng_setup(void *engine EINA_UNUSED, void *info, unsigned 
int w, unsigned int h)
  }
 
if (re->generic.software.tb)
- evas_common_tilebuf_free(re->generic.software.tb);
-   re->generic.software.tb = evas_common_tilebuf_new(w, h);
-
-   if (re->generic.software.tb)
- {
-evas_common_tilebuf_set_tile_size(re->generic.software.tb,
-  TILESIZE, TILESIZE);
-evas_render_engine_software_generic_tile_strict_set
-  (>generic.software, EINA_TRUE);
- }
+ evas_render_engine_software_generic_tile_strict_set
+   (>generic.software, EINA_TRUE);
 
eng_window_use(eng_get_ob(re));
 

-- 




[EGIT] [core/efl] master 01/67: evas: engine should not access Evas canvas directly.

2017-08-25 Thread Cedric BAIL
cedric pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=268d9984b4708bb18f9d84bd221a674f09d16048

commit 268d9984b4708bb18f9d84bd221a674f09d16048
Author: Cedric BAIL <ced...@osg.samsung.com>
Date:   Fri Aug 25 10:47:03 2017 -0700

evas: engine should not access Evas canvas directly.
---
 src/lib/evas/canvas/evas_main.c   | 2 +-
 src/lib/evas/canvas/evas_out.c| 4 ++--
 src/lib/evas/include/evas_private.h   | 4 ++--
 src/modules/evas/engines/buffer/evas_engine.c | 8 
 src/modules/evas/engines/drm/evas_engine.c| 4 ++--
 src/modules/evas/engines/eglfs/evas_engine.c  | 4 ++--
 src/modules/evas/engines/fb/evas_engine.c | 4 ++--
 src/modules/evas/engines/gl_cocoa/evas_engine.c   | 4 ++--
 src/modules/evas/engines/gl_drm/evas_engine.c | 4 ++--
 src/modules/evas/engines/gl_sdl/evas_engine.c | 4 ++--
 src/modules/evas/engines/gl_x11/evas_engine.c | 4 ++--
 src/modules/evas/engines/psl1ght/evas_engine.c| 4 ++--
 src/modules/evas/engines/software_ddraw/evas_engine.c | 4 ++--
 src/modules/evas/engines/software_gdi/evas_engine.c   | 4 ++--
 src/modules/evas/engines/software_x11/evas_engine.c   | 4 ++--
 src/modules/evas/engines/wayland_egl/evas_engine.c| 2 +-
 src/modules/evas/engines/wayland_shm/evas_engine.c| 6 +++---
 17 files changed, 35 insertions(+), 35 deletions(-)

diff --git a/src/lib/evas/canvas/evas_main.c b/src/lib/evas/canvas/evas_main.c
index 114e12fdd5..a30a853f37 100644
--- a/src/lib/evas/canvas/evas_main.c
+++ b/src/lib/evas/canvas/evas_main.c
@@ -1044,7 +1044,7 @@ evas_output_method_set(Evas *eo_e, int render_method)
 Eina_List *l;
 
 EINA_LIST_FOREACH(e->outputs, l, output)
-  output->info = e->engine.func->info(eo_e);
+  if (!output->info) output->info = e->engine.func->info();
  }
 
// Wayland/drm already handles seats.
diff --git a/src/lib/evas/canvas/evas_out.c b/src/lib/evas/canvas/evas_out.c
index d66fb0f396..5310d28f5c 100644
--- a/src/lib/evas/canvas/evas_out.c
+++ b/src/lib/evas/canvas/evas_out.c
@@ -40,7 +40,7 @@ efl_canvas_output_add(Evas *canvas)
// right away to setup the info structure
if (e->engine.func->info)
  {
-r->info = e->engine.func->info(canvas);
+r->info = e->engine.func->info();
  }
 
return r;
@@ -62,7 +62,7 @@ efl_canvas_output_del(Efl_Canvas_Output *output)
output->ector);
  e->engine.func->output_free(_evas_engine_context(e),
  output->output);
- e->engine.func->info_free(output->canvas, output->info);
+ e->engine.func->info_free(output->info);
   }
 e->outputs = eina_list_remove(e->outputs, output);
 
diff --git a/src/lib/evas/include/evas_private.h 
b/src/lib/evas/include/evas_private.h
index af5a08318f..294dfb57b1 100644
--- a/src/lib/evas/include/evas_private.h
+++ b/src/lib/evas/include/evas_private.h
@@ -1393,8 +1393,8 @@ struct _Evas_Object_Func
 
 struct _Evas_Func
 {
-   void *(*info)   (Evas *e);
-   void (*info_free)   (Evas *e, void *info);
+   void *(*info)   (void);
+   void (*info_free)   (void *info);
void *(*setup)  (void *engine, void *info, unsigned 
int w, unsigned int h);
int  (*update)  (void *engine, void *data, void 
*info, unsigned int w, unsigned int h);
 
diff --git a/src/modules/evas/engines/buffer/evas_engine.c 
b/src/modules/evas/engines/buffer/evas_engine.c
index 0ad83cfd78..cb5867e85f 100644
--- a/src/modules/evas/engines/buffer/evas_engine.c
+++ b/src/modules/evas/engines/buffer/evas_engine.c
@@ -22,8 +22,8 @@ typedef Render_Engine_Software_Generic Render_Engine;
 /* prototypes we will use here */
 static void *_output_setup(int w, int h, void *dest_buffer, int 
dest_buffer_row_bytes, int depth_type, int use_color_key, int alpha_threshold, 
int color_key_r, int color_key_g, int color_key_b, void *(*new_update_region) 
(int x, int y, int w, int h, int *row_bytes), void (*free_update_region) (int 
x, int y, int w, int h, void *data), void *(*switch_buffer) (void *data, void 
*dest_buffer), void *switch_data);
 
-static void *eng_info(Evas *eo_e EINA_UNUSED);
-static void eng_info_free(Evas *eo_e EINA_UNUSED, void *info);
+static void *eng_info(void);
+static void eng_info_free(void *info);
 static void eng_output_free(void *engine EINA_UNUSED, void *data);
 
 /* internal engine routines */
@@ -108,7 +108,7 @@ _output_setup(int w,
 
 /* engine api this module provides */
 static void *
-eng_info(Evas *eo_e EINA_UNUSED)
+eng_info(void)
 {
Evas_Engine_Info_Buffer *info;
info = calloc(1, sizeof(Evas

[EGIT] [core/efl] master 34/67: evas: move all image object related function to use the engine instead of the output.

2017-08-25 Thread Cedric BAIL
cedric pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=1d57cb2627a8b10092def3f55e4833e4f8cf8bd5

commit 1d57cb2627a8b10092def3f55e4833e4f8cf8bd5
Author: Cedric BAIL <ced...@osg.samsung.com>
Date:   Fri Aug 25 10:51:10 2017 -0700

evas: move all image object related function to use the engine instead of 
the output.
---
 src/lib/evas/canvas/efl_canvas_image.c |  40 +++
 src/lib/evas/canvas/efl_canvas_proxy.c |   6 +-
 src/lib/evas/canvas/efl_canvas_scene3d.c   |   2 +-
 src/lib/evas/canvas/efl_canvas_surface_tbm.c   |   4 +-
 src/lib/evas/canvas/efl_canvas_surface_wayland.c   |   4 +-
 src/lib/evas/canvas/efl_canvas_surface_x11.c   |   4 +-
 src/lib/evas/canvas/evas_image_legacy.c|  74 ++--
 src/lib/evas/canvas/evas_main.c|   2 +-
 src/lib/evas/canvas/evas_object_image.c| 116 +--
 src/lib/evas/canvas/evas_render.c  |   8 +-
 .../engines/gl_generic/Evas_Engine_GL_Generic.h|  26 +
 src/modules/evas/engines/gl_generic/evas_engine.c  | 125 ++---
 12 files changed, 197 insertions(+), 214 deletions(-)

diff --git a/src/lib/evas/canvas/efl_canvas_image.c 
b/src/lib/evas/canvas/efl_canvas_image.c
index a5485650e3..6a42af18e1 100644
--- a/src/lib/evas/canvas/efl_canvas_image.c
+++ b/src/lib/evas/canvas/efl_canvas_image.c
@@ -20,7 +20,7 @@ _evas_image_mmap_set(Eo *eo_obj, const Eina_File *f, const 
char *key)
  }
evas_object_async_block(obj);
_evas_image_init_set(f, NULL, key, eo_obj, obj, o, );
-   o->engine_data = ENFN->image_mmap(ENDT, o->cur->u.f, o->cur->key, 
>load_error, );
+   o->engine_data = ENFN->image_mmap(ENC, o->cur->u.f, o->cur->key, 
>load_error, );
o->buffer_data_set = EINA_FALSE;
_evas_image_done_set(eo_obj, obj, o);
o->file_size.w = o->cur->image.w;
@@ -83,7 +83,7 @@ _evas_image_file_set(Eo *eo_obj, const char *file, const char 
*key)
 efl_vpath_file_wait(o->file_obj);
 file2 = efl_vpath_file_result_get(o->file_obj);
  }
-   o->engine_data = ENFN->image_load(ENDT, file2, o->cur->key, >load_error, 
);
+   o->engine_data = ENFN->image_load(ENC, file2, o->cur->key, >load_error, 
);
o->buffer_data_set = EINA_FALSE;
_evas_image_done_set(eo_obj, obj, o);
o->file_size.w = o->cur->image.w;
@@ -156,7 +156,7 @@ _image_preload_internal(Eo *eo_obj, Evas_Image_Data *o, 
Eina_Bool cancel)
 if (o->preloading)
   {
  o->preloading = EINA_FALSE;
- ENFN->image_data_preload_cancel(ENDT, o->engine_data, eo_obj);
+ ENFN->image_data_preload_cancel(ENC, o->engine_data, eo_obj);
   }
  }
else
@@ -164,7 +164,7 @@ _image_preload_internal(Eo *eo_obj, Evas_Image_Data *o, 
Eina_Bool cancel)
 if (!o->preloading)
   {
  o->preloading = EINA_TRUE;
- ENFN->image_data_preload_request(ENDT, o->engine_data, eo_obj);
+ ENFN->image_data_preload_request(ENC, o->engine_data, eo_obj);
   }
  }
 }
@@ -449,7 +449,7 @@ _evas_image_load_region_support_get(const Eo *eo_obj)
Evas_Object_Protected_Data *obj = efl_data_scope_get(eo_obj, 
EFL_CANVAS_OBJECT_CLASS);
Evas_Image_Data *o = efl_data_scope_get(eo_obj, 
EFL_CANVAS_IMAGE_INTERNAL_CLASS);
 
-   return ENFN->image_can_region_get(ENDT, o->engine_data);
+   return ENFN->image_can_region_get(ENC, o->engine_data);
 }
 
 EOLIAN static Eina_Bool
@@ -639,7 +639,7 @@ _image_pixels_set(Evas_Object_Protected_Data *obj,
 
if (ENFN->image_data_maps_get)
  {
-if (ENFN->image_data_maps_get(ENDT, o->engine_data, NULL) > 0)
+if (ENFN->image_data_maps_get(ENC, o->engine_data, NULL) > 0)
   {
  ERR("can not set pixels when there are open memory maps");
  return EINA_FALSE;
@@ -666,12 +666,12 @@ _image_pixels_set(Evas_Object_Protected_Data *obj,
 int iw = 0, ih = 0;
 Eina_Bool alpha;
 
-ENFN->image_size_get(ENDT, o->engine_data, , );
-ics = ENFN->image_colorspace_get(ENDT, o->engine_data);
-alpha = ENFN->image_alpha_get(ENDT, o->engine_data);
+ENFN->image_size_get(ENC, o->engine_data, , );
+ics = ENFN->image_colorspace_get(ENC, o->engine_data);
+alpha = ENFN->image_alpha_get(ENC, o->engine_data);
 if ((w != iw) || (h != ih) || (ics != cspace) || (alpha != 
o->cur->has_alpha))
   {
- ENFN->image_free(ENDT, o->engine_data);
+ ENFN->image_free(ENC, o->engine_data);
  o->engine_data = NULL;
   }
  }
@@ -680,13 +680,13 @@ _image_pixels_set(Evas_Object_Protected_Data *obj,
  {
 // note: we rel

[EGIT] [core/efl] master 50/67: evas: do not use default output or any other during render pre.

2017-08-25 Thread Cedric BAIL
cedric pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=a0c58276c34a1877b2c8a15502b06431ecb4b306

commit a0c58276c34a1877b2c8a15502b06431ecb4b306
Author: Cedric BAIL <ced...@osg.samsung.com>
Date:   Fri Aug 25 10:52:10 2017 -0700

evas: do not use default output or any other during render pre.
---
 src/lib/evas/canvas/evas_main.c| 18 ++
 src/lib/evas/canvas/evas_object_vg.c   |  4 ++--
 src/lib/evas/canvas/evas_out.c |  2 --
 src/lib/evas/include/evas_private.h|  7 +++
 src/modules/evas/engines/gl_generic/evas_engine.c  |  2 +-
 .../evas/engines/software_generic/evas_engine.c|  3 ++-
 6 files changed, 14 insertions(+), 22 deletions(-)

diff --git a/src/lib/evas/canvas/evas_main.c b/src/lib/evas/canvas/evas_main.c
index 84b535ca35..0ebe72d9ed 100644
--- a/src/lib/evas/canvas/evas_main.c
+++ b/src/lib/evas/canvas/evas_main.c
@@ -378,6 +378,8 @@ next_zombie:
evas_event_callback_all_del(eo_e);
evas_event_callback_cleanup(eo_e);
 
+   /* Ector surface may require an existing output to finish its job */
+   e->engine.func->ector_destroy(_evas_engine_context(e), e->ector);
/* cleanup engine backend */
EINA_LIST_FREE(e->outputs, evo) efl_canvas_output_del(evo);
e->engine.func->engine_free(e->backend);
@@ -842,19 +844,11 @@ _evas_canvas_efl_loop_user_loop_get(Eo *eo_e EINA_UNUSED, 
Evas_Public_Data *e EI
 }
 
 Ector_Surface *
-evas_ector_get(Evas_Public_Data *e, void *output)
+evas_ector_get(Evas_Public_Data *e)
 {
-   Efl_Canvas_Output *r;
-   Eina_List *l;
-
-   EINA_LIST_FOREACH(e->outputs, l, r)
- if (r->output == output)
-   {
-  if (!r->ector)
-r->ector = e->engine.func->ector_create(_evas_engine_context(e), 
output);
-  return r->ector;
-   }
-   return NULL;
+   if (!e->ector)
+ e->ector = e->engine.func->ector_create(_evas_engine_context(e));
+   return e->ector;
 }
 
 EAPI Evas_BiDi_Direction
diff --git a/src/lib/evas/canvas/evas_object_vg.c 
b/src/lib/evas/canvas/evas_object_vg.c
index 1b1e2bbbc5..c1a2730407 100644
--- a/src/lib/evas/canvas/evas_object_vg.c
+++ b/src/lib/evas/canvas/evas_object_vg.c
@@ -178,7 +178,7 @@ evas_object_vg_render(Evas_Object *eo_obj EINA_UNUSED,
   int x, int y, Eina_Bool do_async)
 {
Evas_VG_Data *vd = type_private_data;
-   Ector_Surface *ector = evas_ector_get(obj->layer->evas, output);
+   Ector_Surface *ector = evas_ector_get(obj->layer->evas);
// FIXME: Set context (that should affect Ector_Surface) and
// then call Ector_Renderer render from bottom to top. Get the
// Ector_Surface that match the output from Evas engine API.
@@ -248,7 +248,7 @@ evas_object_vg_render_pre(Evas_Object *eo_obj,
  }
 
// FIXME: handle damage only on changed renderer.
-   s = evas_ector_get(obj->layer->evas, 
_evas_default_output_get(obj->layer->evas));
+   s = evas_ector_get(obj->layer->evas);
if (vd->root && s)
  _evas_vg_render_pre(vd->root, s, NULL);
 
diff --git a/src/lib/evas/canvas/evas_out.c b/src/lib/evas/canvas/evas_out.c
index 666becdf1e..42f8ed4401 100644
--- a/src/lib/evas/canvas/evas_out.c
+++ b/src/lib/evas/canvas/evas_out.c
@@ -74,8 +74,6 @@ efl_canvas_output_del(Efl_Canvas_Output *output)
 
 if (e->engine.func)
   {
- e->engine.func->ector_destroy(_evas_engine_context(e),
-   output->ector);
  e->engine.func->output_free(_evas_engine_context(e),
  output->output);
  free(output->info);
diff --git a/src/lib/evas/include/evas_private.h 
b/src/lib/evas/include/evas_private.h
index c01eb0dc3c..529256a3c5 100644
--- a/src/lib/evas/include/evas_private.h
+++ b/src/lib/evas/include/evas_private.h
@@ -964,6 +964,7 @@ struct _Evas_Public_Data
Eina_Array*cur_device;
 
void  *backend;
+   Ector_Surface *ector;
Eina_List *outputs;
 
Evas_Device   *default_seat;
@@ -1333,8 +1334,6 @@ struct _Efl_Canvas_Output
 {
Eo *canvas;
 
-   Ector_Surface *ector;
-
Evas_Engine_Info *info;
void *output;
 
@@ -1611,7 +1610,7 @@ struct _Evas_Func
void  (*texture_image_set)(void *engine, void *texture, void 
*image);
void *(*texture_image_get)(void *engine, void *texture);
 
-   Ector_Surface *(*ector_create)(void *engine, void *output);
+   Ector_Surface *(*ector_create)(void *engine);
void  (*ector_destroy)(void *engine, Ector_Surface 
*surface);
Ector_Buffer *(*ector_buffer_wrap)(void *engine, Evas *e, void 
*engine_image);
Ector_Buffer *(*ector_buffer_new) (void *engine, Evas *e, int width, 
int height, Efl_Gfx_Colorspace cspace, E

[EGIT] [core/efl] master 13/67: evas: follow all other engines convention and use ORD macro.

2017-08-25 Thread Cedric BAIL
cedric pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=e6b4878a9e348b6fdf6112ba2ef359e63ccbd09c

commit e6b4878a9e348b6fdf6112ba2ef359e63ccbd09c
Author: Cedric BAIL <ced...@osg.samsung.com>
Date:   Fri Aug 25 10:48:37 2017 -0700

evas: follow all other engines convention and use ORD macro.
---
 src/modules/evas/engines/drm/evas_engine.c| 13 +++--
 src/modules/evas/engines/eglfs/evas_engine.c  | 15 ---
 src/modules/evas/engines/gl_drm/evas_engine.c | 23 ---
 3 files changed, 27 insertions(+), 24 deletions(-)

diff --git a/src/modules/evas/engines/drm/evas_engine.c 
b/src/modules/evas/engines/drm/evas_engine.c
index 53fc902fb4..6a4c7eedab 100644
--- a/src/modules/evas/engines/drm/evas_engine.c
+++ b/src/modules/evas/engines/drm/evas_engine.c
@@ -233,12 +233,13 @@ module_open(Evas_Module *em)
func = pfunc;
 
/* override the methods we provide */
-   EVAS_API_OVERRIDE(output_info_setup, , eng_);
-   EVAS_API_OVERRIDE(output_setup, , eng_);
-   EVAS_API_OVERRIDE(output_update, , eng_);
-   EVAS_API_OVERRIDE(output_free, , eng_);
-   EVAS_API_OVERRIDE(image_plane_assign, , eng_);
-   EVAS_API_OVERRIDE(image_plane_release, , eng_);
+#define ORD(f) EVAS_API_OVERRIDE(f, , eng_)
+   ORD(output_info_setup);
+   ORD(output_setup);
+   ORD(output_update);
+   ORD(output_free);
+   ORD(image_plane_assign);
+   ORD(image_plane_release);
 
/* advertise our engine functions */
em->functions = (void *)();
diff --git a/src/modules/evas/engines/eglfs/evas_engine.c 
b/src/modules/evas/engines/eglfs/evas_engine.c
index e86155b381..b951bab732 100644
--- a/src/modules/evas/engines/eglfs/evas_engine.c
+++ b/src/modules/evas/engines/eglfs/evas_engine.c
@@ -,13 +,14 @@ module_open(Evas_Module *em)
func = pfunc;
 
/* now to override methods */
-   EVAS_API_OVERRIDE(output_info, , eng_);
-   EVAS_API_OVERRIDE(output_setup, , eng_);
-   EVAS_API_OVERRIDE(output_update, , eng_);
-   EVAS_API_OVERRIDE(canvas_alpha_get, , eng_);
-   EVAS_API_OVERRIDE(output_free, , eng_);
-   EVAS_API_OVERRIDE(output_dump, , eng_);
-   EVAS_API_OVERRIDE(image_native_set, , eng_);
+#define ORD(f) EVAS_API_OVERRIDE(f, , eng_)
+   ORD(output_info);
+   ORD(output_setup);
+   ORD(output_update);
+   ORD(canvas_alpha_get);
+   ORD(output_free);
+   ORD(output_dump);
+   ORD(image_native_set);
 
setenv("EGL_PLATFORM", "fbdev", 1);
 
diff --git a/src/modules/evas/engines/gl_drm/evas_engine.c 
b/src/modules/evas/engines/gl_drm/evas_engine.c
index 61e5bb8f94..2072284550 100644
--- a/src/modules/evas/engines/gl_drm/evas_engine.c
+++ b/src/modules/evas/engines/gl_drm/evas_engine.c
@@ -1473,17 +1473,18 @@ module_open(Evas_Module *em)
func = pfunc;
 
/* now to override methods */
-   EVAS_API_OVERRIDE(output_info_setup, , eng_);
-   EVAS_API_OVERRIDE(output_setup, , eng_);
-   EVAS_API_OVERRIDE(output_update, , eng_);
-   EVAS_API_OVERRIDE(canvas_alpha_get, , eng_);
-   EVAS_API_OVERRIDE(output_free, , eng_);
-   EVAS_API_OVERRIDE(output_dump, , eng_);
-   EVAS_API_OVERRIDE(image_native_set, , eng_);
-   EVAS_API_OVERRIDE(image_native_init, , eng_);
-   EVAS_API_OVERRIDE(image_native_shutdown, , eng_);
-   EVAS_API_OVERRIDE(image_plane_assign, , eng_);
-   EVAS_API_OVERRIDE(image_plane_release, , eng_);
+#define ORD(f) EVAS_API_OVERRIDE(f, , eng_)
+   ORD(output_info_setup);
+   ORD(output_setup);
+   ORD(output_update);
+   ORD(canvas_alpha_get);
+   ORD(output_free);
+   ORD(output_dump);
+   ORD(image_native_set);
+   ORD(image_native_init);
+   ORD(image_native_shutdown);
+   ORD(image_plane_assign);
+   ORD(image_plane_release);
 
/* Mesa's EGL driver loads wayland egl by default. (called by 
eglGetProcaddr() )
 * implicit env set (EGL_PLATFORM=drm) prevent that. */

-- 




[EGIT] [core/efl] master 33/67: evas: forgotten convertion from output to engine.

2017-08-25 Thread Cedric BAIL
cedric pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=14f1a0bde7169dad284838a3e439aba62a98ec49

commit 14f1a0bde7169dad284838a3e439aba62a98ec49
Author: Cedric BAIL <ced...@osg.samsung.com>
Date:   Fri Aug 25 10:51:05 2017 -0700

evas: forgotten convertion from output to engine.
---
 src/lib/evas/canvas/evas_render.c | 22 +++---
 1 file changed, 11 insertions(+), 11 deletions(-)

diff --git a/src/lib/evas/canvas/evas_render.c 
b/src/lib/evas/canvas/evas_render.c
index 5d2495c4ff..631bbb39aa 100644
--- a/src/lib/evas/canvas/evas_render.c
+++ b/src/lib/evas/canvas/evas_render.c
@@ -2086,7 +2086,7 @@ evas_render_mapped(Evas_Public_Data *evas, Evas_Object 
*eo_obj,
}
   }
 
-ENFN->context_free(ENDT, ctx);
+ENFN->context_free(ENC, ctx);
 
 // FIXME: needs to cache these maps and
 // keep them only rendering updates
@@ -2096,7 +2096,7 @@ evas_render_mapped(Evas_Public_Data *evas, Evas_Object 
*eo_obj,
  }
else // not "has map"
  {
-ctx = ENFN->context_dup(ENDT, context);
+ctx = ENFN->context_dup(ENC, context);
 if (mapped)
   {
  RD(level, "  child of mapped obj\n");
@@ -2125,7 +2125,7 @@ evas_render_mapped(Evas_Public_Data *evas, Evas_Object 
*eo_obj,
 
if (mask->mask->surface)
  {
-ENFN->context_clip_image_set(ENDT, ctx,
+ENFN->context_clip_image_set(ENC, ctx,
  mask->mask->surface,
  mask->cur->geometry.x 
+ off_x,
  mask->cur->geometry.y 
+ off_y,
@@ -2140,7 +2140,7 @@ evas_render_mapped(Evas_Public_Data *evas, Evas_Object 
*eo_obj,
 
 #ifdef REND_DBG
   int _c, _cx, _cy, _cw, _ch;
-  _c = ENFN->context_clip_get(ENDT, ctx, &_cx, &_cy, &_cw, 
&_ch);
+  _c = ENFN->context_clip_get(ENC, ctx, &_cx, &_cy, &_cw, 
&_ch);
   RD(level, "  draw smart children(clip: [%d] %d,%d %dx%d)\n",
  _c, _cx, _cy, _cw, _ch);
 #endif
@@ -2166,7 +2166,7 @@ evas_render_mapped(Evas_Public_Data *evas, Evas_Object 
*eo_obj,
  else
{
   const Evas_Coord_Rectangle *clip = >cur->geometry;
-  ENFN->context_clip_clip(ENDT, ctx, clip->x + off_x, clip->y 
+ off_y, clip->w, clip->h);
+  ENFN->context_clip_clip(ENC, ctx, clip->x + off_x, clip->y + 
off_y, clip->w, clip->h);
 
   if (obj->cur->clipper && (mapped > 1))
 {
@@ -2218,7 +2218,7 @@ evas_render_mapped(Evas_Public_Data *evas, Evas_Object 
*eo_obj,
 
 if (mask->mask->surface)
   {
- ENFN->context_clip_image_set(ENDT, ctx,
+ ENFN->context_clip_image_set(ENC, ctx,
   
mask->mask->surface,
   
mask->cur->geometry.x + off_x,
   
mask->cur->geometry.y + off_y,
@@ -2229,7 +2229,7 @@ evas_render_mapped(Evas_Public_Data *evas, Evas_Object 
*eo_obj,
 
 #ifdef REND_DBG
   int _c, _cx, _cy, _cw, _ch;
-  _c = ENFN->context_clip_get(ENDT, ctx, &_cx, &_cy, &_cw, 
&_ch);
+  _c = ENFN->context_clip_get(ENC, ctx, &_cx, &_cy, &_cw, 
&_ch);
   RD(level, "  render(clip: [%d] %d,%d %dx%d)\n", _c, _cx, 
_cy, _cw, _ch);
 #endif
 
@@ -2258,14 +2258,14 @@ evas_render_mapped(Evas_Public_Data *evas, Evas_Object 
*eo_obj,
   clipper->cur->cache.clip.y,
   clipper->cur->cache.clip.w,
   clipper->cur->cache.clip.h);
-   ENFN->context_clip_set(ENDT, ctx, x + off_x, y + off_y, 
w, h);
+   ENFN->context_clip_set(ENC, ctx, x + off_x, y + off_y, 
w, h);
if (!_is_obj_in_framespace(obj, evas))
  {
 _evas_render_framespace_context_clip_clip
   (evas, ctx, off_x - evas->framespace.x, 
off_y - evas->framespace.y);
  }
 
-   ENFN->context_clip_clip(ENDT, ctx, ecx, ecy, ecw, ech);
+   ENFN->context_clip_clip(ENC, ctx, ecx, ecy, ecw, ec

[EGIT] [core/efl] master 23/67: evas: refactor ddraw engine to have less useless indirection function call.

2017-08-25 Thread Cedric BAIL
cedric pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=1626b5b8cdb0457c70ba90b216f475a366ccb256

commit 1626b5b8cdb0457c70ba90b216f475a366ccb256
Author: Cedric BAIL <ced...@osg.samsung.com>
Date:   Fri Aug 25 10:49:42 2017 -0700

evas: refactor ddraw engine to have less useless indirection function call.
---
 .../evas/engines/software_ddraw/evas_engine.c  | 36 +++---
 1 file changed, 11 insertions(+), 25 deletions(-)

diff --git a/src/modules/evas/engines/software_ddraw/evas_engine.c 
b/src/modules/evas/engines/software_ddraw/evas_engine.c
index 56bf3def75..a9359226ca 100644
--- a/src/modules/evas/engines/software_ddraw/evas_engine.c
+++ b/src/modules/evas/engines/software_ddraw/evas_engine.c
@@ -18,26 +18,26 @@ struct _Render_Engine
 /* log domain variable */
 int _evas_log_dom_module = -1;
 
+/* engine api this module provides */
+
 static void *
-_output_setup(int  width,
-  int  height,
-  int  rot,
-  HWND window,
-  int  depth,
-  int  fullscreen)
+eng_output_setup(void *engine EINA_UNUSED, void *in, unsigned int w, unsigned 
int h)
 {
+   Evas_Engine_Info_Software_DDraw *info = in;
Render_Engine *re;
Outbuf *ob;
 
re = calloc(1, sizeof(Render_Engine));
-   if (!re)
- return NULL;
+   if (!re) return NULL;
 
evas_software_ddraw_outbuf_init();
 
-   ob = evas_software_ddraw_outbuf_setup(width, height, rot,
+   ob = evas_software_ddraw_outbuf_setup(w, h,
+ info->info.rotation,
  OUTBUF_DEPTH_INHERIT,
- window, depth, fullscreen);
+ info->info.window,
+ info->info.depth,
+ info->info.fullscreen);
if (!ob) goto on_error;
 
if (!evas_render_engine_software_generic_init(>generic, ob, NULL,
@@ -52,7 +52,7 @@ _output_setup(int  width,
  
evas_software_ddraw_outbuf_flush,
  NULL,
  
evas_software_ddraw_outbuf_free,
- width, height))
+ w, h))
  goto on_error;
 
return re;
@@ -63,8 +63,6 @@ _output_setup(int  width,
return NULL;
 }
 
-
-/* engine api this module provides */
 static void
 eng_output_info_setup(void *info)
 {
@@ -73,18 +71,6 @@ eng_output_info_setup(void *info)
einfo->render_mode = EVAS_RENDER_MODE_BLOCKING;
 }
 
-static void *
-eng_output_setup(void *engine EINA_UNUSED, void *in, unsigned int w, unsigned 
int h)
-{
-   Evas_Engine_Info_Software_DDraw *info = in;
-
-   return _output_setup(w, h,
-info->info.rotation,
-info->info.window,
-info->info.depth,
-info->info.fullscreen);
-}
-
 static void
 eng_output_free(void *engine EINA_UNUSED, void *data)
 {

-- 




[EGIT] [core/efl] master 19/67: evas: refactor fb engine to have less useless function redirection.

2017-08-25 Thread Cedric BAIL
cedric pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=8c16402a2c5ee757a2202f3cfd87d4a87f95dea5

commit 8c16402a2c5ee757a2202f3cfd87d4a87f95dea5
Author: Cedric BAIL <ced...@osg.samsung.com>
Date:   Fri Aug 25 10:49:23 2017 -0700

evas: refactor fb engine to have less useless function redirection.
---
 src/modules/evas/engines/fb/evas_engine.c | 29 ++---
 1 file changed, 10 insertions(+), 19 deletions(-)

diff --git a/src/modules/evas/engines/fb/evas_engine.c 
b/src/modules/evas/engines/fb/evas_engine.c
index 227e511478..635d1ae1f2 100644
--- a/src/modules/evas/engines/fb/evas_engine.c
+++ b/src/modules/evas/engines/fb/evas_engine.c
@@ -16,21 +16,26 @@ static Evas_Func func, pfunc;
 /* engine struct data */
 typedef Render_Output_Software_Generic Render_Engine;
 
-/* internal engine routines */
+/* engine api this module provides */
 static void *
-_output_setup(int w, int h, int rot, int vt, int dev, int refresh)
+eng_output_setup(void *engine EINA_UNUSED, void *in, unsigned int w, unsigned 
int h)
 {
+   Evas_Engine_Info_FB *info = in;
Render_Engine *re;
Outbuf *ob;
 
re = calloc(1, sizeof(Render_Engine));
-   if (!re)
- return NULL;
+   if (!re) return NULL;
 
evas_fb_outbuf_fb_init();
 
/* get any stored performance metrics from device */
-   ob = evas_fb_outbuf_fb_setup_fb(w, h, rot, OUTBUF_DEPTH_INHERIT, vt, dev, 
refresh);
+   ob = evas_fb_outbuf_fb_setup_fb(w, h,
+   info->info.rotation,
+   OUTBUF_DEPTH_INHERIT,
+   info->info.virtual_terminal,
+   info->info.device_number,
+   info->info.refresh);
if (!ob) goto on_error;
 
if (!evas_render_engine_software_generic_init(re, ob, NULL,
@@ -60,7 +65,6 @@ _output_setup(int w, int h, int rot, int vt, int dev, int 
refresh)
return NULL;
 }
 
-/* engine api this module provides */
 static void
 eng_output_info_setup(void *info)
 {
@@ -69,19 +73,6 @@ eng_output_info_setup(void *info)
einfo->render_mode = EVAS_RENDER_MODE_BLOCKING;
 }
 
-static void *
-eng_output_setup(void *engine EINA_UNUSED, void *in, unsigned int w, unsigned 
int h)
-{
-   Evas_Engine_Info_FB *info = in;
-
-   return _output_setup(w,
-h,
-info->info.rotation,
-info->info.virtual_terminal,
-info->info.device_number,
-info->info.refresh);
-}
-
 static void
 eng_output_free(void *engine EINA_UNUSED, void *data)
 {

-- 




[EGIT] [core/efl] master 20/67: evas: refactor wayland_shm backend to have less useless function redirection.

2017-08-25 Thread Cedric BAIL
cedric pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=262ab2bd54f4f7e617a262163ee9297fd3604efd

commit 262ab2bd54f4f7e617a262163ee9297fd3604efd
Author: Cedric BAIL <ced...@osg.samsung.com>
Date:   Fri Aug 25 10:49:28 2017 -0700

evas: refactor wayland_shm backend to have less useless function 
redirection.
---
 src/modules/evas/engines/wayland_shm/evas_engine.c | 18 --
 1 file changed, 4 insertions(+), 14 deletions(-)

diff --git a/src/modules/evas/engines/wayland_shm/evas_engine.c 
b/src/modules/evas/engines/wayland_shm/evas_engine.c
index c82eb6af05..b2cbb75874 100644
--- a/src/modules/evas/engines/wayland_shm/evas_engine.c
+++ b/src/modules/evas/engines/wayland_shm/evas_engine.c
@@ -27,10 +27,10 @@ struct _Render_Engine
Render_Output_Software_Generic generic;
 };
 
-/* LOCAL FUNCTIONS */
-static Render_Engine *
-_render_engine_swapbuf_setup(int w, int h, Evas_Engine_Info_Wayland *einfo)
+static void *
+eng_output_setup(void *engine EINA_UNUSED, void *info, unsigned int w, 
unsigned int h)
 {
+   Evas_Engine_Info_Wayland *einfo = info;
Render_Engine *re;
Outbuf *ob;
 
@@ -42,7 +42,7 @@ _render_engine_swapbuf_setup(int w, int h, 
Evas_Engine_Info_Wayland *einfo)
ob = _evas_outbuf_setup(w, h, einfo);
if (!ob) goto err;
 
-   if (!evas_render_engine_software_generic_init(>generic, ob, 
+   if (!evas_render_engine_software_generic_init(>generic, ob,
  _evas_outbuf_swap_mode_get,
  _evas_outbuf_rotation_get,
  NULL,
@@ -99,16 +99,6 @@ eng_output_info_setup(void *info)
einfo->render_mode = EVAS_RENDER_MODE_BLOCKING;
 }
 
-static void *
-eng_output_setup(void *engine EINA_UNUSED, void *info, unsigned int w, 
unsigned int h)
-{
-   Evas_Engine_Info_Wayland *einfo = info;
-
-   LOGFN(__FILE__, __LINE__, __FUNCTION__);
-
-   return _render_engine_swapbuf_setup(w, h, einfo);
-}
-
 static void
 eng_output_resize(void *engine EINA_UNUSED, void *data, int w, int h)
 {

-- 




[EGIT] [core/efl] master 04/67: evas: all GL backend require strict tilebuf, let's make that the default.

2017-08-25 Thread Cedric BAIL
cedric pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=600a5fa76cf8fe5f324f9a0bd962c6aa5ab84f53

commit 600a5fa76cf8fe5f324f9a0bd962c6aa5ab84f53
Author: Cedric BAIL <ced...@osg.samsung.com>
Date:   Fri Aug 25 10:47:48 2017 -0700

evas: all GL backend require strict tilebuf, let's make that the default.
---
 src/modules/evas/engines/eglfs/evas_engine.c | 3 ---
 src/modules/evas/engines/gl_drm/evas_engine.c| 3 ---
 src/modules/evas/engines/gl_generic/Evas_Engine_GL_Generic.h | 2 ++
 src/modules/evas/engines/gl_x11/evas_engine.c| 4 
 src/modules/evas/engines/wayland_egl/evas_engine.c   | 4 
 5 files changed, 2 insertions(+), 14 deletions(-)

diff --git a/src/modules/evas/engines/eglfs/evas_engine.c 
b/src/modules/evas/engines/eglfs/evas_engine.c
index b71babebc9..9bdf1d3da2 100644
--- a/src/modules/evas/engines/eglfs/evas_engine.c
+++ b/src/modules/evas/engines/eglfs/evas_engine.c
@@ -752,9 +752,6 @@ eng_setup(void *engine EINA_UNUSED, void *in, unsigned int 
w, unsigned int h)
 
evas_render_engine_software_generic_merge_mode_set(>generic.software, 
merge_mode);
 
-   if (re->generic.software.tb)
- 
evas_render_engine_software_generic_tile_strict_set(>generic.software, 
EINA_TRUE);
-
evas_outbuf_use(eng_get_ob(re));
 
if (!initted)
diff --git a/src/modules/evas/engines/gl_drm/evas_engine.c 
b/src/modules/evas/engines/gl_drm/evas_engine.c
index 097be67632..ad56991640 100644
--- a/src/modules/evas/engines/gl_drm/evas_engine.c
+++ b/src/modules/evas/engines/gl_drm/evas_engine.c
@@ -1008,9 +1008,6 @@ eng_setup(void *engine EINA_UNUSED, void *in, unsigned 
int w, unsigned int h)
 initted = EINA_TRUE;
  }
 
-   if (re->generic.software.tb)
- 
evas_render_engine_software_generic_tile_strict_set(>generic.software, 
EINA_TRUE);
-
evas_outbuf_use(eng_get_ob(re));
 
return re;
diff --git a/src/modules/evas/engines/gl_generic/Evas_Engine_GL_Generic.h 
b/src/modules/evas/engines/gl_generic/Evas_Engine_GL_Generic.h
index 8a443a6e73..d236a22130 100644
--- a/src/modules/evas/engines/gl_generic/Evas_Engine_GL_Generic.h
+++ b/src/modules/evas/engines/gl_generic/Evas_Engine_GL_Generic.h
@@ -94,6 +94,8 @@ evas_render_engine_gl_generic_init(Render_Engine_GL_Generic 
*re,
 
re->evgl_initted = EINA_FALSE;
 
+   evas_render_engine_software_generic_tile_strict_set(>software, 
EINA_TRUE);
+
return EINA_TRUE;
 }
 
diff --git a/src/modules/evas/engines/gl_x11/evas_engine.c 
b/src/modules/evas/engines/gl_x11/evas_engine.c
index e07c470c50..41a4af51b4 100644
--- a/src/modules/evas/engines/gl_x11/evas_engine.c
+++ b/src/modules/evas/engines/gl_x11/evas_engine.c
@@ -1704,10 +1704,6 @@ eng_setup(void *engine EINA_UNUSED, void *in, unsigned 
int w, unsigned int h)
 initted = 1;
  }
 
-   if (re->generic.software.tb)
- evas_render_engine_software_generic_tile_strict_set
-   (>generic.software, EINA_TRUE);
-
eng_window_use(eng_get_ob(re));
 
return re;
diff --git a/src/modules/evas/engines/wayland_egl/evas_engine.c 
b/src/modules/evas/engines/wayland_egl/evas_engine.c
index 6dd9bc91bb..25b7d67850 100644
--- a/src/modules/evas/engines/wayland_egl/evas_engine.c
+++ b/src/modules/evas/engines/wayland_egl/evas_engine.c
@@ -648,10 +648,6 @@ eng_setup(void *engine EINA_UNUSED, void *info, unsigned 
int w, unsigned int h)
 initted = EINA_TRUE;
  }
 
-   if (re->generic.software.tb)
- evas_render_engine_software_generic_tile_strict_set
-   (>generic.software, EINA_TRUE);
-
eng_window_use(eng_get_ob(re));
 
return re;

-- 




[EGIT] [core/efl] master 46/67: evas: make function to find evas gl context from engine shared across backend.

2017-08-25 Thread Cedric BAIL
cedric pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=89c34cda21e55fa1de7d0295d9a234039d1adbaa

commit 89c34cda21e55fa1de7d0295d9a234039d1adbaa
Author: Cedric BAIL <ced...@osg.samsung.com>
Date:   Fri Aug 25 10:51:56 2017 -0700

evas: make function to find evas gl context from engine shared across 
backend.
---
 .../engines/gl_generic/Evas_Engine_GL_Generic.h| 62 ++
 src/modules/evas/engines/gl_generic/evas_engine.c  | 47 
 2 files changed, 62 insertions(+), 47 deletions(-)

diff --git a/src/modules/evas/engines/gl_generic/Evas_Engine_GL_Generic.h 
b/src/modules/evas/engines/gl_generic/Evas_Engine_GL_Generic.h
index a78e588d55..043d7f71a1 100644
--- a/src/modules/evas/engines/gl_generic/Evas_Engine_GL_Generic.h
+++ b/src/modules/evas/engines/gl_generic/Evas_Engine_GL_Generic.h
@@ -103,4 +103,66 @@ 
evas_render_engine_gl_generic_init(Render_Engine_Software_Generic *engine,
return EINA_TRUE;
 }
 
+static inline Evas_Engine_GL_Context *
+gl_generic_context_get(Render_Output_GL_Generic *output)
+{
+   if (!output->software.ob) return NULL;
+   output->window_use(output->software.ob);
+   return output->window_gl_context_get(output->software.ob);
+
+}
+
+static inline void
+gl_generic_window_use(void *engine)
+{
+   Render_Output_GL_Generic *re = engine;
+
+   re->window_use(re->software.ob);
+}
+
+static inline Evas_Engine_GL_Context *
+gl_generic_context_find(Render_Engine_GL_Generic *engine)
+{
+   Render_Output_GL_Generic *output;
+   Evas_Engine_GL_Context *r = NULL;
+   Eina_List *l;
+
+   EINA_LIST_FOREACH(engine->software.outputs, l, output)
+ {
+r = gl_generic_context_get(output);
+if (r) return r;
+ }
+
+   return r;
+}
+
+static inline void
+gl_generic_window_find(Render_Engine_GL_Generic *engine)
+{
+   Render_Output_GL_Generic *output;
+   Eina_List *l;
+
+   EINA_LIST_FOREACH(engine->software.outputs, l, output)
+ {
+if (!output->software.ob) continue;
+gl_generic_window_use(output);
+break;
+ }
+}
+
+static inline void *
+gl_generic_any_output_get(Render_Engine_GL_Generic *engine)
+{
+   Render_Output_GL_Generic *output;
+   Eina_List *l;
+
+   EINA_LIST_FOREACH(engine->software.outputs, l, output)
+ {
+if (!output->software.ob) continue;
+return output->software.ob;
+ }
+
+   return NULL;
+}
+
 #endif
diff --git a/src/modules/evas/engines/gl_generic/evas_engine.c 
b/src/modules/evas/engines/gl_generic/evas_engine.c
index 2b3f1f4c88..96f9afed1a 100644
--- a/src/modules/evas/engines/gl_generic/evas_engine.c
+++ b/src/modules/evas/engines/gl_generic/evas_engine.c
@@ -49,53 +49,6 @@ int _evas_engine_GL_log_dom = -1;
 # endif
 #endif
 
-static Evas_Engine_GL_Context *
-gl_generic_context_get(Render_Output_GL_Generic *output)
-{
-   if (!output->software.ob) return NULL;
-   output->window_use(output->software.ob);
-   return output->window_gl_context_get(output->software.ob);
-
-}
-
-static void
-gl_generic_window_use(void *engine)
-{
-   Render_Output_GL_Generic *re = engine;
-
-   re->window_use(re->software.ob);
-}
-
-static Evas_Engine_GL_Context *
-gl_generic_context_find(Render_Engine_GL_Generic *engine)
-{
-   Render_Output_GL_Generic *output;
-   Evas_Engine_GL_Context *r = NULL;
-   Eina_List *l;
-
-   EINA_LIST_FOREACH(engine->software.outputs, l, output)
- {
-r = gl_generic_context_get(output);
-if (r) return r;
- }
-
-   return r;
-}
-
-static void
-gl_generic_window_find(Render_Engine_GL_Generic *engine)
-{
-   Render_Output_GL_Generic *output;
-   Eina_List *l;
-
-   EINA_LIST_FOREACH(engine->software.outputs, l, output)
- {
-if (!output->software.ob) continue;
-gl_generic_window_use(output);
-break;
- }
-}
-
 static int eng_gl_image_direct_get(void *data, void *image);
 static int eng_gl_surface_destroy(void *data, void *surface);
 static Eina_Bool eng_gl_surface_lock(void *data, void *surface);

-- 




[EGIT] [core/efl] master 02/67: evas: Render_Engine_Software_Generic is actually Render_Output_Software_Generic.

2017-08-25 Thread Cedric BAIL
cedric pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=bf2439b50112ac4d605b1f4073a358c18676c025

commit bf2439b50112ac4d605b1f4073a358c18676c025
Author: Cedric BAIL <ced...@osg.samsung.com>
Date:   Fri Aug 25 10:47:11 2017 -0700

evas: Render_Engine_Software_Generic is actually 
Render_Output_Software_Generic.
---
 src/modules/evas/engines/buffer/evas_engine.c  |  2 +-
 src/modules/evas/engines/drm/evas_engine.c |  2 +-
 src/modules/evas/engines/fb/evas_engine.c  |  2 +-
 .../engines/gl_generic/Evas_Engine_GL_Generic.h|  2 +-
 .../evas/engines/software_ddraw/evas_engine.c  |  2 +-
 .../evas/engines/software_gdi/evas_engine.c|  2 +-
 .../Evas_Engine_Software_Generic.h | 18 +-
 .../evas/engines/software_generic/evas_engine.c| 40 +++---
 .../evas/engines/software_x11/evas_engine.c|  2 +-
 src/modules/evas/engines/wayland_shm/evas_engine.c |  2 +-
 10 files changed, 37 insertions(+), 37 deletions(-)

diff --git a/src/modules/evas/engines/buffer/evas_engine.c 
b/src/modules/evas/engines/buffer/evas_engine.c
index cb5867e85f..8ea1de643d 100644
--- a/src/modules/evas/engines/buffer/evas_engine.c
+++ b/src/modules/evas/engines/buffer/evas_engine.c
@@ -17,7 +17,7 @@ static Evas_Func func, pfunc;
 
 
 /* engine struct data */
-typedef Render_Engine_Software_Generic Render_Engine;
+typedef Render_Output_Software_Generic Render_Engine;
 
 /* prototypes we will use here */
 static void *_output_setup(int w, int h, void *dest_buffer, int 
dest_buffer_row_bytes, int depth_type, int use_color_key, int alpha_threshold, 
int color_key_r, int color_key_g, int color_key_b, void *(*new_update_region) 
(int x, int y, int w, int h, int *row_bytes), void (*free_update_region) (int 
x, int y, int w, int h, void *data), void *(*switch_buffer) (void *data, void 
*dest_buffer), void *switch_data);
diff --git a/src/modules/evas/engines/drm/evas_engine.c 
b/src/modules/evas/engines/drm/evas_engine.c
index 77c183bdba..a00d670ff4 100644
--- a/src/modules/evas/engines/drm/evas_engine.c
+++ b/src/modules/evas/engines/drm/evas_engine.c
@@ -3,7 +3,7 @@
 
 typedef struct _Render_Engine
 {
-   Render_Engine_Software_Generic generic;
+   Render_Output_Software_Generic generic;
 
Ecore_Drm2_Device *dev;
 } Render_Engine;
diff --git a/src/modules/evas/engines/fb/evas_engine.c 
b/src/modules/evas/engines/fb/evas_engine.c
index fa1125a235..65367f2068 100644
--- a/src/modules/evas/engines/fb/evas_engine.c
+++ b/src/modules/evas/engines/fb/evas_engine.c
@@ -14,7 +14,7 @@ static Eina_List *_outbufs = NULL;
 static Evas_Func func, pfunc;
 
 /* engine struct data */
-typedef Render_Engine_Software_Generic Render_Engine;
+typedef Render_Output_Software_Generic Render_Engine;
 
 /* internal engine routines */
 static void *
diff --git a/src/modules/evas/engines/gl_generic/Evas_Engine_GL_Generic.h 
b/src/modules/evas/engines/gl_generic/Evas_Engine_GL_Generic.h
index 6ee302d400..8a443a6e73 100644
--- a/src/modules/evas/engines/gl_generic/Evas_Engine_GL_Generic.h
+++ b/src/modules/evas/engines/gl_generic/Evas_Engine_GL_Generic.h
@@ -19,7 +19,7 @@ typedef void (*Window_GL_Context_Use)(Context_3D *ctx);
 
 struct _Render_Engine_GL_Generic
 {
-   Render_Engine_Software_Generic software;
+   Render_Output_Software_Generic software;
 
Window_Use window_use;
Window_GL_Context_Get window_gl_context_get;
diff --git a/src/modules/evas/engines/software_ddraw/evas_engine.c 
b/src/modules/evas/engines/software_ddraw/evas_engine.c
index cdb0aa6dc9..9f004b9cd1 100644
--- a/src/modules/evas/engines/software_ddraw/evas_engine.c
+++ b/src/modules/evas/engines/software_ddraw/evas_engine.c
@@ -12,7 +12,7 @@ typedef struct _Render_Engine Render_Engine;
 
 struct _Render_Engine
 {
-   Render_Engine_Software_Generic generic;
+   Render_Output_Software_Generic generic;
 };
 
 /* log domain variable */
diff --git a/src/modules/evas/engines/software_gdi/evas_engine.c 
b/src/modules/evas/engines/software_gdi/evas_engine.c
index 34d9a23fb9..87f581eb26 100644
--- a/src/modules/evas/engines/software_gdi/evas_engine.c
+++ b/src/modules/evas/engines/software_gdi/evas_engine.c
@@ -12,7 +12,7 @@ typedef struct _Render_Engine Render_Engine;
 
 struct _Render_Engine
 {
-   Render_Engine_Software_Generic generic;
+   Render_Output_Software_Generic generic;
 };
 
 
diff --git 
a/src/modules/evas/engines/software_generic/Evas_Engine_Software_Generic.h 
b/src/modules/evas/engines/software_generic/Evas_Engine_Software_Generic.h
index ee85165856..5db2a94017 100644
--- a/src/modules/evas/engines/software_generic/Evas_Engine_Software_Generic.h
+++ b/src/modules/evas/engines/software_generic/Evas_Engine_Software_Generic.h
@@ -25,14 +25,14 @@ typedef enum _Outbuf_Depth
OUTBUF_DEPTH_LAST
 } Outbuf_Depth;
 
-typedef enum 
+typedef enum
 {
MERGE_BOUNDING,
MERGE_FULL,
MERGE_SMART
 } Render_Engine_Merge_Mode;
 
-typedef 

[EGIT] [core/efl] master 05/67: evas: prevent double tilebuf creation/destruction during window resize.

2017-08-25 Thread Cedric BAIL
cedric pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=8ffc0f2b9e2370d2893fcd6ef5309da4d53ebfda

commit 8ffc0f2b9e2370d2893fcd6ef5309da4d53ebfda
Author: Cedric BAIL <ced...@osg.samsung.com>
Date:   Fri Aug 25 10:47:52 2017 -0700

evas: prevent double tilebuf creation/destruction during window resize.
---
 src/modules/evas/engines/eglfs/evas_engine.c   | 14 +++--
 src/modules/evas/engines/gl_drm/evas_engine.c  | 10 -
 src/modules/evas/engines/gl_x11/evas_engine.c  | 24 +++---
 src/modules/evas/engines/wayland_egl/evas_engine.c | 16 ++-
 4 files changed, 12 insertions(+), 52 deletions(-)

diff --git a/src/modules/evas/engines/eglfs/evas_engine.c 
b/src/modules/evas/engines/eglfs/evas_engine.c
index 9bdf1d3da2..6147775b5c 100644
--- a/src/modules/evas/engines/eglfs/evas_engine.c
+++ b/src/modules/evas/engines/eglfs/evas_engine.c
@@ -810,20 +810,12 @@ eng_update(void *engine EINA_UNUSED, void *data, void 
*info, unsigned int w, uns
  w, h,
  info->info.rotation,
  info->info.depth);
+ evas_render_engine_software_generic_update(>generic.software,
+
re->generic.software.ob,
+w, h);
   }
  }
 
-   if (re->generic.software.tb)
- evas_common_tilebuf_free(re->generic.software.tb);
-   re->generic.software.tb =
- evas_common_tilebuf_new(w, h);
-   if (re->generic.software.tb)
- evas_common_tilebuf_set_tile_size(re->generic.software.tb,
-   TILESIZE, TILESIZE);
-
-   if (re->generic.software.tb)
- 
evas_render_engine_software_generic_tile_strict_set(>generic.software, 
EINA_TRUE);
-
evas_outbuf_use(eng_get_ob(re));
 
return 1;
diff --git a/src/modules/evas/engines/gl_drm/evas_engine.c 
b/src/modules/evas/engines/gl_drm/evas_engine.c
index ad56991640..13cdb931a9 100644
--- a/src/modules/evas/engines/gl_drm/evas_engine.c
+++ b/src/modules/evas/engines/gl_drm/evas_engine.c
@@ -1060,16 +1060,6 @@ eng_update(void *engine EINA_UNUSED, void *data, void 
*in, unsigned int w, unsig
   }
  }
 
-   if (re->generic.software.tb)
- evas_common_tilebuf_free(re->generic.software.tb);
-   re->generic.software.tb = evas_common_tilebuf_new(w, h);
-   if (re->generic.software.tb)
- evas_common_tilebuf_set_tile_size(re->generic.software.tb,
-   TILESIZE, TILESIZE);
-
-   if (re->generic.software.tb)
- 
evas_render_engine_software_generic_tile_strict_set(>generic.software, 
EINA_TRUE);
-
evas_outbuf_use(eng_get_ob(re));
 
return 1;
diff --git a/src/modules/evas/engines/gl_x11/evas_engine.c 
b/src/modules/evas/engines/gl_x11/evas_engine.c
index 41a4af51b4..a91bda4f08 100644
--- a/src/modules/evas/engines/gl_x11/evas_engine.c
+++ b/src/modules/evas/engines/gl_x11/evas_engine.c
@@ -1736,10 +1736,8 @@ eng_update(void *engine EINA_UNUSED, void *data, void 
*in, unsigned int w, unsig
 (info->msaa_bits != eng_get_ob(re)->msaa_bits) ||
 (info->info.destination_alpha != eng_get_ob(re)->alpha))
   {
- Outbuf *ob, *ob_old;
+ Outbuf *ob;
 
- ob_old = re->generic.software.ob;
- re->generic.software.ob = NULL;
  gl_wins--;
 
  ob = eng_window_new(info,
@@ -1757,16 +1755,11 @@ eng_update(void *engine EINA_UNUSED, void *data, void 
*in, unsigned int w, unsig
  info->depth_bits,
  info->stencil_bits,
  info->msaa_bits);
- if (!ob)
-   {
-  if (ob_old) eng_window_free(ob_old);
-  return 0;
-   }
+ if (!ob) return 0;
 
  eng_window_use(ob);
- if (ob_old) eng_window_free(ob_old);
- evas_render_engine_software_generic_update(>generic.software, 
ob,
-w, h);
+ evas_render_engine_software_generic_update(>generic.software,
+ob, w, h);
  gl_wins++;
   }
 else if ((eng_get_ob(re)->w != w) ||
@@ -1774,12 +1767,9 @@ eng_update(void *engine EINA_UNUSED, void *data, void 
*in, unsigned int w, unsig
  (eng_get_ob(re)->info->info.rotation != eng_get_ob(re)->rot))
   {
  eng_outbuf_reconfigure(eng_get_ob(re), w, h, 
eng_get_ob(re)->info->info.rotation, 0);
- if (re->generic.software.tb)
-   evas_common_tilebuf_free(re->generic.software.

[EGIT] [core/efl] master 15/67: evas: reduce duplication of merge_mode getenv logic.

2017-08-25 Thread Cedric BAIL
cedric pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=f4afd5f1bd27323ac579dc41da8a12293f798a67

commit f4afd5f1bd27323ac579dc41da8a12293f798a67
Author: Cedric BAIL <ced...@osg.samsung.com>
Date:   Fri Aug 25 10:49:06 2017 -0700

evas: reduce duplication of merge_mode getenv logic.
---
 src/modules/evas/engines/eglfs/evas_engine.c   | 12 +--
 src/modules/evas/engines/gl_drm/evas_engine.c  | 24 +-
 src/modules/evas/engines/gl_x11/evas_engine.c  | 17 +--
 .../Evas_Engine_Software_Generic.h | 23 -
 .../evas/engines/software_x11/evas_engine.c| 17 +--
 src/modules/evas/engines/wayland_egl/evas_engine.c | 23 +
 src/modules/evas/engines/wayland_shm/evas_engine.c | 15 +-
 7 files changed, 24 insertions(+), 107 deletions(-)

diff --git a/src/modules/evas/engines/eglfs/evas_engine.c 
b/src/modules/evas/engines/eglfs/evas_engine.c
index b951bab732..dfbaed886b 100644
--- a/src/modules/evas/engines/eglfs/evas_engine.c
+++ b/src/modules/evas/engines/eglfs/evas_engine.c
@@ -684,7 +684,6 @@ eng_output_setup(void *engine EINA_UNUSED, void *in, 
unsigned int w, unsigned in
Evas_Engine_Info_Eglfs *info = in;
Render_Engine *re = NULL;
Outbuf *ob = NULL;
-   Render_Engine_Merge_Mode merge_mode = MERGE_BOUNDING;
Render_Engine_Swap_Mode swap_mode;
 
swap_mode = evas_render_engine_gl_swap_mode_get(info->info.swap_mode);
@@ -725,16 +724,7 @@ eng_output_setup(void *engine EINA_UNUSED, void *in, 
unsigned int w, unsigned in
 
gl_wins++;
 
-   s = getenv("EVAS_GL_PARTIAL_MERGE");
-   if (s)
- {
-if ((!strcmp(s, "bounding")) || (!strcmp(s, "b")))
-  merge_mode = MERGE_BOUNDING;
-else if ((!strcmp(s, "full")) || (!strcmp(s, "f")))
-  merge_mode = MERGE_FULL;
- }
-
-   evas_render_engine_software_generic_merge_mode_set(>generic.software, 
merge_mode);
+   evas_render_engine_software_generic_merge_mode_set(>generic.software);
 
evas_outbuf_use(eng_get_ob(re));
 
diff --git a/src/modules/evas/engines/gl_drm/evas_engine.c 
b/src/modules/evas/engines/gl_drm/evas_engine.c
index 2072284550..28b21d2459 100644
--- a/src/modules/evas/engines/gl_drm/evas_engine.c
+++ b/src/modules/evas/engines/gl_drm/evas_engine.c
@@ -899,26 +899,6 @@ eng_output_info_setup(void *info)
einfo->render_mode = EVAS_RENDER_MODE_BLOCKING;
 }
 
-static Render_Engine_Merge_Mode
-_eng_merge_mode_get(void)
-{
-   Render_Engine_Merge_Mode merge_mode = MERGE_SMART;
-   const char *s;
-
-   s = getenv("EVAS_GL_PARTIAL_MERGE");
-   if (s)
- {
-if ((!strcmp(s, "bounding")) || (!strcmp(s, "b")))
-  merge_mode = MERGE_BOUNDING;
-else if ((!strcmp(s, "full")) || (!strcmp(s, "f")))
-  merge_mode = MERGE_FULL;
-else if ((!strcmp(s, "smart")) || (!strcmp(s, "s")))
-  merge_mode = MERGE_SMART;
- }
-
-   return merge_mode;
-}
-
 static void *
 eng_output_setup(void *engine EINA_UNUSED, void *in, unsigned int w, unsigned 
int h)
 {
@@ -926,10 +906,8 @@ eng_output_setup(void *engine EINA_UNUSED, void *in, 
unsigned int w, unsigned in
Render_Engine *re = NULL;
Outbuf *ob;
Render_Engine_Swap_Mode swap_mode;
-   Render_Engine_Merge_Mode merge_mode;
 
swap_mode = evas_render_engine_gl_swap_mode_get(info->info.swap_mode);
-   merge_mode = _eng_merge_mode_get();
 
if (!initted)
  {
@@ -984,7 +962,7 @@ eng_output_setup(void *engine EINA_UNUSED, void *in, 
unsigned int w, unsigned in
 
gl_wins++;
 
-   evas_render_engine_software_generic_merge_mode_set(>generic.software, 
merge_mode);
+   evas_render_engine_software_generic_merge_mode_set(>generic.software);
 
if (!initted)
  {
diff --git a/src/modules/evas/engines/gl_x11/evas_engine.c 
b/src/modules/evas/engines/gl_x11/evas_engine.c
index b64733b651..924bb5a945 100644
--- a/src/modules/evas/engines/gl_x11/evas_engine.c
+++ b/src/modules/evas/engines/gl_x11/evas_engine.c
@@ -1581,9 +1581,7 @@ eng_output_setup(void *engine EINA_UNUSED, void *in, 
unsigned int w, unsigned in
Evas_Engine_Info_GL_X11 *info = in;
Render_Engine *re = NULL;
Outbuf *ob = NULL;
-   Render_Engine_Merge_Mode merge_mode = MERGE_SMART;
Render_Engine_Swap_Mode swap_mode;
-   const char *s;
 
swap_mode = evas_render_engine_gl_swap_mode_get(info->swap_mode);
 
@@ -1669,20 +1667,7 @@ eng_output_setup(void *engine EINA_UNUSED, void *in, 
unsigned int w, unsigned in
 
gl_wins++;
 
-   if ((s = getenv("EVAS_GL_PARTIAL_MERGE")))
- {
-if ((!strcmp(s, "bounding")) ||
-(!strcmp(s, "b")))
-  merge_mode = MERGE_BOUNDING;
-else if ((!strcmp(s, "full")) |

[EGIT] [core/efl] master 31/67: evas: add infrastructure to find a gl_context from a GL_Engine.

2017-08-25 Thread Cedric BAIL
cedric pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=b6296c6fb4a59bc9e48bac07f6414f0d8fcf1050

commit b6296c6fb4a59bc9e48bac07f6414f0d8fcf1050
Author: Cedric BAIL <ced...@osg.samsung.com>
Date:   Fri Aug 25 10:50:45 2017 -0700

evas: add infrastructure to find a gl_context from a GL_Engine.
---
 src/modules/evas/engines/gl_generic/evas_engine.c | 16 
 1 file changed, 16 insertions(+)

diff --git a/src/modules/evas/engines/gl_generic/evas_engine.c 
b/src/modules/evas/engines/gl_generic/evas_engine.c
index bba3c263c8..b437999219 100644
--- a/src/modules/evas/engines/gl_generic/evas_engine.c
+++ b/src/modules/evas/engines/gl_generic/evas_engine.c
@@ -66,6 +66,22 @@ gl_generic_window_use(void *engine)
re->window_use(re->software.ob);
 }
 
+static Evas_Engine_GL_Context *
+gl_generic_context_find(Render_Engine_GL_Generic *engine)
+{
+   Render_Output_GL_Generic *output;
+   Evas_Engine_GL_Context *r = NULL;
+   Eina_List *l;
+
+   EINA_LIST_FOREACH(engine->software.outputs, l, output)
+ {
+r = gl_generic_context_get(output);
+if (r) return r;
+ }
+
+   return r;
+}
+
 static int eng_gl_image_direct_get(void *data, void *image);
 static int eng_gl_surface_destroy(void *data, void *surface);
 static Eina_Bool eng_gl_surface_lock(void *data, void *surface);

-- 




[EGIT] [core/efl] master 28/67: evas: refactor the call to window_use.

2017-08-25 Thread Cedric BAIL
cedric pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=46e2e103d7fcc08dbe5b12990c36234ebf13d3c1

commit 46e2e103d7fcc08dbe5b12990c36234ebf13d3c1
Author: Cedric BAIL <ced...@osg.samsung.com>
Date:   Fri Aug 25 10:50:31 2017 -0700

evas: refactor the call to window_use.
---
 src/modules/evas/engines/gl_generic/evas_engine.c | 121 +-
 1 file changed, 47 insertions(+), 74 deletions(-)

diff --git a/src/modules/evas/engines/gl_generic/evas_engine.c 
b/src/modules/evas/engines/gl_generic/evas_engine.c
index 0de805db36..ef9bf2a367 100644
--- a/src/modules/evas/engines/gl_generic/evas_engine.c
+++ b/src/modules/evas/engines/gl_generic/evas_engine.c
@@ -58,6 +58,14 @@ gl_generic_context_get(Render_Output_GL_Generic *output)
 
 }
 
+static void
+gl_generic_window_use(void *engine)
+{
+   Render_Output_GL_Generic *re = engine;
+
+   re->window_use(re->software.ob);
+}
+
 static int eng_gl_image_direct_get(void *data, void *image);
 static int eng_gl_surface_destroy(void *data, void *surface);
 static Eina_Bool eng_gl_surface_lock(void *data, void *surface);
@@ -186,7 +194,6 @@ eng_image_colorspace_get(void *engine EINA_UNUSED, void 
*image)
 static void *
 eng_image_alpha_set(void *engine, void *image, int has_alpha)
 {
-   Render_Output_GL_Generic *re = engine;
Evas_GL_Image *im;
 
if (!image) return NULL;
@@ -197,7 +204,7 @@ eng_image_alpha_set(void *engine, void *image, int 
has_alpha)
 im->alpha = has_alpha;
 return image;
  }
-   re->window_use(re->software.ob);
+   gl_generic_window_use(engine);
if ((im->tex) && (im->tex->pt->dyn.img))
  {
 im->alpha = has_alpha;
@@ -269,7 +276,6 @@ eng_image_data_direct_get(void *engine EINA_UNUSED, void 
*image, int plane,
 static void
 eng_image_colorspace_set(void *engine, void *image, Evas_Colorspace cspace)
 {
-   Render_Output_GL_Generic *re = engine;
Evas_GL_Image *im;
 
if (!image) return;
@@ -277,7 +283,7 @@ eng_image_colorspace_set(void *engine, void *image, 
Evas_Colorspace cspace)
if (im->native.data) return;
/* FIXME: can move to gl_common */
if (im->cs.space == cspace) return;
-   re->window_use(re->software.ob);
+   gl_generic_window_use(engine);
evas_gl_common_image_alloc_ensure(im);
switch (cspace)
  {
@@ -385,7 +391,6 @@ static void *
 eng_image_native_set(void *engine, void *image, void *native)
 {
   Evas_Engine_GL_Context *gl_context;
-  Render_Output_GL_Generic *re = engine;
   Evas_Native_Surface *ns = native;
   Evas_GL_Image *im = image, *im2 = NULL;
   uint32_t texid;
@@ -393,7 +398,7 @@ eng_image_native_set(void *engine, void *image, void 
*native)
   unsigned int tex = 0;
   unsigned int fbo = 0;
 
-  gl_context = gl_generic_context_get(re);
+  gl_context = gl_generic_context_get(engine);
 
   if (!im)
 {
@@ -426,7 +431,7 @@ eng_image_native_set(void *engine, void *image, void 
*native)
 }
   if ((!ns) && (!im->native.data)) return im;
 
-  re->window_use(re->software.ob);
+  gl_generic_window_use(engine);
 
   if (im->native.data)
 {
@@ -508,10 +513,9 @@ static void *
 eng_image_load(void *engine, const char *file, const char *key, int *error, 
Evas_Image_Load_Opts *lo)
 {
Evas_Engine_GL_Context *gl_context;
-   Render_Output_GL_Generic *re = engine;
 
*error = EVAS_LOAD_ERROR_NONE;
-   gl_context = gl_generic_context_get(re);
+   gl_context = gl_generic_context_get(engine);
return evas_gl_common_image_load(gl_context, file, key, lo, error);
 }
 
@@ -519,10 +523,9 @@ static void *
 eng_image_mmap(void *engine, Eina_File *f, const char *key, int *error, 
Evas_Image_Load_Opts *lo)
 {
Evas_Engine_GL_Context *gl_context;
-   Render_Output_GL_Generic *re = engine;
 
*error = EVAS_LOAD_ERROR_NONE;
-   gl_context = gl_generic_context_get(re);
+   gl_context = gl_generic_context_get(engine);
return evas_gl_common_image_mmap(gl_context, f, key, lo, error);
 }
 
@@ -530,9 +533,8 @@ static void *
 eng_image_new_from_data(void *engine, int w, int h, DATA32 *image_data, int 
alpha, Evas_Colorspace cspace)
 {
Evas_Engine_GL_Context *gl_context;
-   Render_Output_GL_Generic *re = engine;
 
-   gl_context = gl_generic_context_get(re);
+   gl_context = gl_generic_context_get(engine);
return evas_gl_common_image_new_from_data(gl_context, w, h, image_data, 
alpha, cspace);
 }
 
@@ -540,19 +542,16 @@ static void *
 eng_image_new_from_copied_data(void *engine, int w, int h, DATA32 *image_data, 
int alpha, Evas_Colorspace cspace)
 {
Evas_Engine_GL_Context *gl_context;
-   Render_Output_GL_Generic *re = engine;
 
-   gl_context = gl_generic_context_get(re);
+   gl_context = gl_generic_context_get(engine);
return evas_gl_common_image_new_from_copied_data(gl_context, w, h, 
image_data, alpha, cspace);
 }
 
 void
 eng_image_free(void *engine, void *image)
 {
-   Render_Output_GL_Generi

[EGIT] [core/efl] master 08/67: evas: nobody actually call the tile size set API.

2017-08-25 Thread Cedric BAIL
cedric pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=8017fab1006e103c7138d72a5e61bba2588a2cd8

commit 8017fab1006e103c7138d72a5e61bba2588a2cd8
Author: Cedric BAIL <ced...@osg.samsung.com>
Date:   Fri Aug 25 10:48:05 2017 -0700

evas: nobody actually call the tile size set API.
---
 src/lib/evas/include/evas_private.h  |  1 -
 .../engines/software_generic/Evas_Engine_Software_Generic.h  | 10 ++
 src/modules/evas/engines/software_generic/evas_engine.c  | 12 
 3 files changed, 2 insertions(+), 21 deletions(-)

diff --git a/src/lib/evas/include/evas_private.h 
b/src/lib/evas/include/evas_private.h
index 294dfb57b1..4e939dad67 100644
--- a/src/lib/evas/include/evas_private.h
+++ b/src/lib/evas/include/evas_private.h
@@ -1400,7 +1400,6 @@ struct _Evas_Func
 
void (*output_free) (void *engine, void *data);
void (*output_resize)   (void *engine, void *data, int w, 
int h);
-   void (*output_tile_size_set)(void *engine, void *data, int w, 
int h);
void (*output_redraws_rect_add) (void *engine, void *data, int x, 
int y, int w, int h);
void (*output_redraws_rect_del) (void *engine, void *data, int x, 
int y, int w, int h);
void (*output_redraws_clear)(void *engine, void *data);
diff --git 
a/src/modules/evas/engines/software_generic/Evas_Engine_Software_Generic.h 
b/src/modules/evas/engines/software_generic/Evas_Engine_Software_Generic.h
index 01751a216f..5db2a94017 100644
--- a/src/modules/evas/engines/software_generic/Evas_Engine_Software_Generic.h
+++ b/src/modules/evas/engines/software_generic/Evas_Engine_Software_Generic.h
@@ -71,10 +71,6 @@ struct _Render_Output_Software_Generic
 
unsigned int w, h;
 
-   struct {
-  unsigned int w, h;
-   } tile;
-
Render_Engine_Swap_Mode swap_mode;
Render_Engine_Merge_Mode merge_mode;
 
@@ -129,13 +125,11 @@ 
evas_render_engine_software_generic_init(Render_Output_Software_Generic *re,
re->lost_back = 0;
re->tile_strict = 0;
 
-   re->tile.w = TILESIZE;
-   re->tile.h = TILESIZE;
re->tb = evas_common_tilebuf_new(w, h);
if (!re->tb) return EINA_FALSE;
 
/* in preliminary tests 16x16 gave highest framerates */
-   evas_common_tilebuf_set_tile_size(re->tb, re->tile.w, re->tile.h);
+   evas_common_tilebuf_set_tile_size(re->tb, TILESIZE, TILESIZE);
 
return EINA_TRUE;
 }
@@ -181,7 +175,7 @@ 
evas_render_engine_software_generic_update(Render_Output_Software_Generic *re,
evas_common_tilebuf_free(re->tb);
re->tb = evas_common_tilebuf_new(w, h);
if (!re->tb) return EINA_FALSE;
-   evas_common_tilebuf_set_tile_size(re->tb, re->tile.w, re->tile.h);
+   evas_common_tilebuf_set_tile_size(re->tb, TILESIZE, TILESIZE);
evas_render_engine_software_generic_tile_strict_set(re, re->tile_strict);
return EINA_TRUE;
 }
diff --git a/src/modules/evas/engines/software_generic/evas_engine.c 
b/src/modules/evas/engines/software_generic/evas_engine.c
index a97e14a3e5..baede8f25d 100644
--- a/src/modules/evas/engines/software_generic/evas_engine.c
+++ b/src/modules/evas/engines/software_generic/evas_engine.c
@@ -3917,17 +3917,6 @@ eng_output_resize(void *engine EINA_UNUSED, void *data, 
int w, int h)
 }
 
 static void
-eng_output_tile_size_set(void *engine EINA_UNUSED, void *data, int w, int h)
-{
-   Render_Output_Software_Generic *re;
-
-   re = (Render_Output_Software_Generic *)data;
-   re->tile.w = w;
-   re->tile.h = h;
-   evas_common_tilebuf_set_tile_size(re->tb, w, h);
-}
-
-static void
 eng_output_redraws_rect_add(void *engine EINA_UNUSED, void *data, int x, int 
y, int w, int h)
 {
Render_Output_Software_Generic *re;
@@ -4676,7 +4665,6 @@ static Evas_Func func =
  NULL, // eng_update
  NULL, // eng_output_free
  eng_output_resize,
- eng_output_tile_size_set,
  eng_output_redraws_rect_add,
  eng_output_redraws_rect_del,
  eng_output_redraws_clear,

-- 




<    1   2   3   4   5   6   7   8   9   10   >