[EGIT] [apps/empc] master 01/01: fix build with a build dir

2017-09-03 Thread Jean-Philippe Andre
jpeg pushed a commit to branch master.

http://git.enlightenment.org/apps/empc.git/commit/?id=f7622dffe3fb867709905658708476a1d9ad1df2

commit f7622dffe3fb867709905658708476a1d9ad1df2
Author: Jean-Philippe Andre 
Date:   Mon Sep 4 12:10:59 2017 +0900

fix build with a build dir
---
 src/bin/Makefile.mk   | 1 +
 src/enlightenment/Makefile.mk | 1 +
 src/modules/Makefile.mk   | 1 +
 3 files changed, 3 insertions(+)

diff --git a/src/bin/Makefile.mk b/src/bin/Makefile.mk
index 3764d9f..74190db 100644
--- a/src/bin/Makefile.mk
+++ b/src/bin/Makefile.mk
@@ -5,6 +5,7 @@ src/bin/empdd
 src_bin_empc_CPPFLAGS = \
 $(AM_CFLAGS) \
 -I$(top_builddir) \
+-I$(top_builddir)/src/bin \
 -I$(top_srcdir)/data/themes \
 @EFL_CFLAGS@ \
 @ELM_CFLAGS@ \
diff --git a/src/enlightenment/Makefile.mk b/src/enlightenment/Makefile.mk
index 489158a..a8cfe91 100644
--- a/src/enlightenment/Makefile.mk
+++ b/src/enlightenment/Makefile.mk
@@ -19,6 +19,7 @@ $(ELDBUS_SRC)
 
 src_enlightenment_module_la_CPPFLAGS = \
 -I$(top_builddir) \
+-I$(top_builddir)/src/bin \
 -I$(top_srcdir)/src/bin \
 -I$(top_srcdir)/src/modules \
 @E_CFLAGS@ \
diff --git a/src/modules/Makefile.mk b/src/modules/Makefile.mk
index 8d6cfcc..7eaa7c2 100644
--- a/src/modules/Makefile.mk
+++ b/src/modules/Makefile.mk
@@ -246,6 +246,7 @@ $(mod_cppflags) \
 @ELM_CFLAGS@ \
 @EIO_CFLAGS@ \
 -I$(top_srcdir)/src/bin \
+-I$(top_builddir)/src/bin \
 -I$(top_builddir)
 
 src_modules_auto_playlist_manager_la_LIBADD = \

-- 




[EGIT] [tools/edi] master 01/01: build: Add crude meson/ninja support

2017-07-11 Thread Jean-Philippe Andre
jpeg pushed a commit to branch master.

http://git.enlightenment.org/tools/edi.git/commit/?id=9a5eb35e60fa32dee520966e465e66d2a4bb5245

commit 9a5eb35e60fa32dee520966e465e66d2a4bb5245
Author: Jean-Philippe Andre 
Date:   Thu Jul 6 00:22:08 2017 +0900

build: Add crude meson/ninja support

This only uses "build" as build folder. Very simplistic.
---
 src/lib/Makefile.am|   1 +
 src/lib/edi_build_provider.c   |   6 +-
 src/lib/edi_build_provider_meson.c | 174 +
 3 files changed, 180 insertions(+), 1 deletion(-)

diff --git a/src/lib/Makefile.am b/src/lib/Makefile.am
index f6a126c..859af21 100644
--- a/src/lib/Makefile.am
+++ b/src/lib/Makefile.am
@@ -27,6 +27,7 @@ edi_build_provider_make.c \
 edi_build_provider_cmake.c \
 edi_build_provider_cargo.c \
 edi_build_provider_python.c \
+edi_build_provider_meson.c \
 edi_build_provider.c \
 edi_builder.c \
 edi_create.c \
diff --git a/src/lib/edi_build_provider.c b/src/lib/edi_build_provider.c
index 520ac31..60ddb79 100644
--- a/src/lib/edi_build_provider.c
+++ b/src/lib/edi_build_provider.c
@@ -11,6 +11,7 @@ extern Edi_Build_Provider _edi_build_provider_make;
 extern Edi_Build_Provider _edi_build_provider_cmake;
 extern Edi_Build_Provider _edi_build_provider_cargo;
 extern Edi_Build_Provider _edi_build_provider_python;
+extern Edi_Build_Provider _edi_build_provider_meson;
 
 EAPI Edi_Build_Provider *edi_build_provider_for_project_get()
 {
@@ -26,11 +27,12 @@ EAPI Edi_Build_Provider 
*edi_build_provider_for_project_path_get(const char *pat
  return &_edi_build_provider_make;
if (_edi_build_provider_cmake.path_supported_is(path))
  return &_edi_build_provider_cmake;
-
if (_edi_build_provider_cargo.path_supported_is(path))
  return &_edi_build_provider_cargo;
if (_edi_build_provider_python.path_supported_is(path))
  return &_edi_build_provider_python;
+   if (_edi_build_provider_meson.path_supported_is(path))
+ return &_edi_build_provider_meson;
 
return NULL;
 }
@@ -45,6 +47,8 @@ EAPI Edi_Build_Provider *edi_build_provider_for_id_get(const 
char *id)
  return &_edi_build_provider_cargo;
if (!strcmp("python", id))
  return &_edi_build_provider_python;
+   if (!strcmp("meson", id))
+ return &_edi_build_provider_meson;
 
return NULL;
 }
diff --git a/src/lib/edi_build_provider_meson.c 
b/src/lib/edi_build_provider_meson.c
new file mode 100644
index 000..b6bc591
--- /dev/null
+++ b/src/lib/edi_build_provider_meson.c
@@ -0,0 +1,174 @@
+#ifdef HAVE_CONFIG
+# include "config.h"
+#endif
+
+#include 
+#include 
+#include 
+#include 
+
+#include "Edi.h"
+
+#include "edi_private.h"
+
+typedef struct {
+   char *basedir;
+   char *builddir;
+   char *fulldir; /* basedir + builddir */
+} Meson_Data;
+
+static Eina_Bool
+_meson_project_supported(const char *path)
+{
+   return edi_path_relative_exists(path, "meson.build");
+}
+
+static Meson_Data *
+_meson_data_get(void)
+{
+   // FIXME: I hate static globals
+   // FIXME: this needs to be freed on project change / shutdown!
+   static Meson_Data *md = NULL;
+
+   if (md) return md;
+
+   md = calloc(1, sizeof(*md));
+   md->basedir = strdup(edi_project_get());
+   md->builddir = strdup("build"); // FIXME: "build" dir needs to be 
user-defined
+   md->fulldir = edi_path_append(md->basedir, md->builddir);
+   return md;
+}
+
+static Eina_Bool
+_meson_configured_check(const char *dir)
+{
+   const char *build_ninja;
+
+   build_ninja = eina_slstr_steal_new(edi_path_append(dir, "build.ninja"));
+   if (ecore_file_exists(build_ninja))
+ return EINA_TRUE;
+
+   return EINA_FALSE;
+}
+
+static Eina_Bool
+_meson_file_hidden_is(const char *file)
+{
+   if (!file || strlen(file) == 0)
+ return EINA_FALSE;
+
+   static const char *hidden_exts[] = {
+  ".o", ".so", ".lo",
+  ".ninja", ".ninja", ".ninja_deps", ".ninja_log",
+  "compile_commands.json", "meson-logs", "meson-private", "@exe"
+   };
+
+   if (ecore_file_is_dir(file) && _meson_configured_check(file))
+ return EINA_TRUE;
+
+   for (size_t k = 0; k < EINA_C_ARRAY_LENGTH(hidden_exts); k++)
+ if (eina_str_has_extension(file, hidden_exts[k]))
+   return EINA_TRUE;
+
+   return EINA_FALSE;
+}
+
+static Eina_Bool
+_meson_project_runnable_is(const char *path)
+{
+   return ecore_file_can_exec(path);
+}
+
+static Ecore_Exe *
+_meson_ninja_do(Meson_Data *md, const char *arg)
+{
+   const char *cmd;
+
+   cmd = eina_slstr_printf("ninja -C %s %s", md->fulldir, arg ?: "");
+   return ecore_exe_pipe_run(cmd,
+ ECORE_EXE_PIPE_READ_LINE_BUFFERED | 
ECORE_EXE_PIPE_READ |
+ ECORE_EXE_PIPE_ERROR_LIN

[EGIT] [tools/edi] master 02/02: main: Fix some invalid API usages

2017-07-05 Thread Jean-Philippe Andre
jpeg pushed a commit to branch master.

http://git.enlightenment.org/tools/edi.git/commit/?id=3caa121b1250d8b376650c7bf552465461df3f25

commit 3caa121b1250d8b376650c7bf552465461df3f25
Author: Jean-Philippe Andre 
Date:   Tue Jul 4 18:35:39 2017 +0900

main: Fix some invalid API usages

1. toolbar items are not objects
2. main menu should not be manually packed, it's handled by the
   window itself
3. show last is recommended, rather than show + add subobjects,
   especially for a window (note: i hate this in principle)
---
 src/bin/edi_main.c | 24 +---
 1 file changed, 13 insertions(+), 11 deletions(-)

diff --git a/src/bin/edi_main.c b/src/bin/edi_main.c
index 2939592..68c0073 100644
--- a/src/bin/edi_main.c
+++ b/src/bin/edi_main.c
@@ -344,7 +344,6 @@ _edi_toolbar_separator_add(Evas_Object *tb)
Evas_Object *sep;
sep = elm_toolbar_item_append(tb, NULL, NULL, NULL, 0);
elm_toolbar_item_separator_set(sep, EINA_TRUE);
-   evas_object_show(sep);
 }
 
 static Evas_Object *
@@ -1080,7 +1079,7 @@ _edi_menu_about_cb(void *data EINA_UNUSED, Evas_Object 
*obj EINA_UNUSED,
 static void
 _edi_menu_setup(Evas_Object *win)
 {
-   Evas_Object *menu;
+   Evas_Object *menu = elm_win_main_menu_get(win);
Elm_Object_Item *menu_it;
static Eina_Bool setup = EINA_FALSE;
 
@@ -1154,12 +1153,12 @@ _edi_toolbar_item_add(Evas_Object *tb, const char 
*icon, const char *name, Evas_
 }
 
 static Evas_Object *
-edi_toolbar_setup(Evas_Object *win)
+edi_toolbar_setup(Evas_Object *parent)
 {
Evas_Object *tb;
Elm_Object_Item *tb_it;
 
-   tb = elm_toolbar_add(win);
+   tb = elm_toolbar_add(parent);
elm_toolbar_horizontal_set(tb, EINA_FALSE);
elm_toolbar_align_set(tb, 0.0);
elm_toolbar_shrink_mode_set(tb, ELM_TOOLBAR_SHRINK_SCROLL);
@@ -1340,7 +1339,7 @@ Eina_Bool
 edi_open(const char *inputpath)
 {
Evas_Object *win, *hbx, *vbx, *tb, *content;
-   const char *winname;
+   char *winname;
char *path;
 
if (!edi_project_set(inputpath))
@@ -1356,10 +1355,12 @@ edi_open(const char *inputpath)
 
winname = _edi_win_title_get();
win = elm_win_util_standard_add("main", winname);
-   free((char*)winname);
+   free(winname);
if (!win) return EINA_FALSE;
 
_edi_main_win = win;
+   _edi_menu_setup(win);
+
elm_win_focus_highlight_enabled_set(win, EINA_TRUE);
evas_object_smart_callback_add(win, "delete,request", _edi_exit, NULL);
evas_object_event_callback_add(win, EVAS_CALLBACK_RESIZE, _edi_resize_cb, 
NULL);
@@ -1373,6 +1374,7 @@ edi_open(const char *inputpath)
evas_object_show(hbx);
 
tb = edi_toolbar_setup(hbx);
+   elm_box_pack_start(hbx, tb);
_edi_toolbar = tb;
_edi_toolbar_set_visible(!_edi_project_config->gui.toolbar_hidden);
 
@@ -1389,11 +1391,6 @@ edi_open(const char *inputpath)
evas_object_size_hint_align_set(content, EVAS_HINT_FILL, EVAS_HINT_FILL);
elm_box_pack_end(vbx, content);
 
-   ERR("Loaded project at %s", path);
-   evas_object_resize(win, _edi_project_config->gui.width * 
elm_config_scale_get(),
-  _edi_project_config->gui.height * 
elm_config_scale_get());
-   evas_object_show(win);
-
_edi_config_project_add(path);
_edi_open_tabs();
edi_scm_init();
@@ -1406,6 +1403,11 @@ edi_open(const char *inputpath)
ecore_event_handler_add(EDI_EVENT_FILE_CHANGED, _edi_file_changed, NULL);
ecore_event_handler_add(EDI_EVENT_FILE_SAVED, _edi_file_saved, NULL);
 
+   ERR("Loaded project at %s", path);
+   evas_object_resize(win, _edi_project_config->gui.width * 
elm_config_scale_get(),
+  _edi_project_config->gui.height * 
elm_config_scale_get());
+   evas_object_show(win);
+
free(path);
return EINA_TRUE;
 }

-- 




[EGIT] [tools/edi] master 01/02: Revert "menu: hide by default until we can fix elm menu calcs"

2017-07-05 Thread Jean-Philippe Andre
jpeg pushed a commit to branch master.

http://git.enlightenment.org/tools/edi.git/commit/?id=4ee5f05982d6096c697c12710f96c4ab05e7f9ee

commit 4ee5f05982d6096c697c12710f96c4ab05e7f9ee
Author: Jean-Philippe Andre 
Date:   Tue Jul 4 15:00:16 2017 +0900

Revert "menu: hide by default until we can fix elm menu calcs"

This reverts commit 863b3d7ab3e0356fcb17e8b1254f3d9c8d38ee96.
---
 src/bin/edi_main.c | 24 ++--
 1 file changed, 2 insertions(+), 22 deletions(-)

diff --git a/src/bin/edi_main.c b/src/bin/edi_main.c
index 02d8d45..2939592 100644
--- a/src/bin/edi_main.c
+++ b/src/bin/edi_main.c
@@ -1336,25 +1336,6 @@ _win_delete_cb(void *data EINA_UNUSED, Evas_Object *obj 
EINA_UNUSED, void *event
edi_close();
 }
 
-static void
-_win_cb_key_down(void *data, Evas *e EINA_UNUSED,
- Evas_Object *obj EINA_UNUSED, void *event)
-{
-   Eina_Bool ctrl, alt, shift;
-   Evas_Event_Key_Down *ev = event;
-   Evas_Object *win = data;
-
-   ctrl = evas_key_modifier_is_set(ev->modifiers, "Ctrl");
-   alt = evas_key_modifier_is_set(ev->modifiers, "Alt");
-   shift = evas_key_modifier_is_set(ev->modifiers, "Shift");
-
-   if (!ctrl && alt && !shift)
- {
-if (!strcmp(ev->key, "f"))
-  _edi_menu_setup(win);
- }
-}
-
 Eina_Bool
 edi_open(const char *inputpath)
 {
@@ -1401,6 +1382,8 @@ edi_open(const char *inputpath)
elm_box_pack_end(hbx, vbx);
evas_object_show(vbx);
 
+   _edi_menu_setup(win);
+
content = edi_content_setup(vbx, path);
evas_object_size_hint_weight_set(content, EVAS_HINT_EXPAND, 
EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(content, EVAS_HINT_FILL, EVAS_HINT_FILL);
@@ -1423,9 +1406,6 @@ edi_open(const char *inputpath)
ecore_event_handler_add(EDI_EVENT_FILE_CHANGED, _edi_file_changed, NULL);
ecore_event_handler_add(EDI_EVENT_FILE_SAVED, _edi_file_saved, NULL);
 
-   evas_object_event_callback_add(win, EVAS_CALLBACK_KEY_DOWN,
-  _win_cb_key_down, win);
-
free(path);
return EINA_TRUE;
 }

-- 




[EGIT] [admin/devs] master 01/01: conr2d: Make conr2d a developer

2017-04-17 Thread Jean-Philippe Andre
jpeg pushed a commit to branch master.

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

commit e3fe203b543e19a41fc45cf50ee06a065be0c59e
Author: Jean-Philippe Andre 
Date:   Mon Apr 17 19:53:16 2017 +0900

conr2d: Make conr2d a developer
---
 {probies => developers}/conr2d/icon-big.png| Bin
 {probies => developers}/conr2d/icon-map.png| Bin
 {probies => developers}/conr2d/icon-med.png| Bin
 {probies => developers}/conr2d/icon-sml.png| Bin
 {probies => developers}/conr2d/id_rsa.pub  |   0
 {probies => developers}/conr2d/id_rsa_home.pub |   0
 {probies => developers}/conr2d/info.txt|   0
 7 files changed, 0 insertions(+), 0 deletions(-)

diff --git a/probies/conr2d/icon-big.png b/developers/conr2d/icon-big.png
similarity index 100%
rename from probies/conr2d/icon-big.png
rename to developers/conr2d/icon-big.png
diff --git a/probies/conr2d/icon-map.png b/developers/conr2d/icon-map.png
similarity index 100%
rename from probies/conr2d/icon-map.png
rename to developers/conr2d/icon-map.png
diff --git a/probies/conr2d/icon-med.png b/developers/conr2d/icon-med.png
similarity index 100%
rename from probies/conr2d/icon-med.png
rename to developers/conr2d/icon-med.png
diff --git a/probies/conr2d/icon-sml.png b/developers/conr2d/icon-sml.png
similarity index 100%
rename from probies/conr2d/icon-sml.png
rename to developers/conr2d/icon-sml.png
diff --git a/probies/conr2d/id_rsa.pub b/developers/conr2d/id_rsa.pub
similarity index 100%
rename from probies/conr2d/id_rsa.pub
rename to developers/conr2d/id_rsa.pub
diff --git a/probies/conr2d/id_rsa_home.pub b/developers/conr2d/id_rsa_home.pub
similarity index 100%
rename from probies/conr2d/id_rsa_home.pub
rename to developers/conr2d/id_rsa_home.pub
diff --git a/probies/conr2d/info.txt b/developers/conr2d/info.txt
similarity index 100%
rename from probies/conr2d/info.txt
rename to developers/conr2d/info.txt

-- 




[EGIT] [tools/expedite] master 01/01: images: Fix YUV and other image data tests

2017-01-10 Thread Jean-Philippe Andre
jpeg pushed a commit to branch master.

http://git.enlightenment.org/tools/expedite.git/commit/?id=0529ce56b6fb01e9651e76461e9608e15a040fb3

commit 0529ce56b6fb01e9651e76461e9608e15a040fb3
Author: Jean-Philippe Andre 
Date:   Wed Jan 11 10:52:33 2017 +0900

images: Fix YUV and other image data tests
---
 src/bin/image_data_argb.c  |  60 +-
 src/bin/image_data_argb_alpha.c|  47 
 src/bin/image_data_ycbcr601pl.c|  70 
 ...mage_data_ycbcr601pl_map_nearest_solid_rotate.c |  67 ---
 src/bin/image_data_ycbcr601pl_map_solid_rotate.c   |  66 ---
 src/bin/image_data_ycbcr601pl_wide_stride.c| 122 -
 6 files changed, 174 insertions(+), 258 deletions(-)

diff --git a/src/bin/image_data_argb.c b/src/bin/image_data_argb.c
index 5707f36..d5889ce 100644
--- a/src/bin/image_data_argb.c
+++ b/src/bin/image_data_argb.c
@@ -20,13 +20,12 @@ static Evas_Object *o_images[1];
 /* setup */
 static void _setup(void)
 {
-   int i;
Evas_Object *o;
-   void *pixels;
-   Eina_Slice slice;
+   Eina_Slice sl;
 
-   pixels = malloc(sizeof (int) * 640 * 480);
-   for (i = 0; i < 1; i++)
+   sl.len = 640 * 480 * 4;
+   sl.mem = malloc(sl.len);
+   for (int i = 0; i < 1; i++)
  {
 o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
 o_images[i] = o;
@@ -35,50 +34,53 @@ static void _setup(void)
 efl_gfx_fill_set(o, 0, 0, 640, 480);
 efl_gfx_size_set(o, 640, 480);
 efl_gfx_visible_set(o, EINA_TRUE);
-slice = (Eina_Slice)EINA_SLICE_STR(pixels);
-efl_gfx_buffer_copy_set(o_images[i], &slice, 640, 480, 640 * sizeof 
(int), EFL_GFX_COLORSPACE_ARGB, 0);
+efl_gfx_buffer_managed_set(o, &sl, 640, 480, 0, 
EFL_GFX_COLORSPACE_ARGB, 0);
  }
-   free(pixels);
done = 0;
 }
 
 /* cleanup */
 static void _cleanup(void)
 {
-   int i;
-   for (i = 0; i < 1; i++) efl_del(o_images[i]);
+   for (int i = 0; i < 1; i++)
+ {
+Evas_Object *o = o_images[i];
+Eina_Slice sl = {};
+
+efl_gfx_buffer_managed_get(o, &sl, 0);
+free((void *) sl.mem);
+efl_del(o);
+ }
 }
 
 /* loop - do things */
 static void _loop(double t, int f)
 {
-   int i, st;
-   Evas_Coord x, y, w, h;
-   Eina_Rw_Slice rw_slice;
-
-   for (i = 0; i < 1; i++)
+   for (int i = 0; i < 1; i++)
  {
-unsigned int result, *p;
-int length;
+Evas_Object *o = o_images[i];
+unsigned int *data, *p;
+Evas_Coord x, y, w, h;
+Eina_Rw_Slice sl = {};
+int st;
 
 w = 640;
 h = 480;
 x = (win_w / 2) - (w / 2);
 y = (win_h / 2) - (h / 2);
-efl_gfx_position_set(o_images[i], x, y);
-efl_gfx_size_set(o_images[i], w, h);
-efl_gfx_fill_set(o_images[i], 0, 0, w, h);
-result = efl_gfx_buffer_map(o_images[i], &rw_slice,
-  EFL_GFX_BUFFER_ACCESS_MODE_WRITE,
-  0, 0, 0, 0, EFL_GFX_COLORSPACE_ARGB, 0,
-  &st);
-if (!result)
+efl_gfx_position_set(o, x, y);
+efl_gfx_size_set(o, w, h);
+efl_gfx_fill_set(o, 0, 0, w, h);
+efl_gfx_buffer_map(o, &sl, EFL_GFX_BUFFER_ACCESS_MODE_WRITE,
+   0, 0, 0, 0, EFL_GFX_COLORSPACE_ARGB, 0, &st);
+data = sl.mem;
+if (!data)
   {
  fprintf(stderr, "ERROR: Failed to map image!\n");
-   continue;
+ continue;
   }
 st = st >> 2;
-p = rw_slice.mem;
+p = sl.mem;
 for (y = 0; y < h; y++)
   {
  for (x = 0; x < w; x++)
@@ -88,8 +90,8 @@ static void _loop(double t, int f)
}
  p += (st - w);
   }
-efl_gfx_buffer_unmap(o_images[i], &rw_slice);
-efl_gfx_buffer_update_add(o_images[i], 0, 0, w, h);
+efl_gfx_buffer_unmap(o, &sl);
+efl_gfx_buffer_update_add(o, 0, 0, w, h);
  }
FPS_STD(NAME);
 }
diff --git a/src/bin/image_data_argb_alpha.c b/src/bin/image_data_argb_alpha.c
index a4cdabe..79f4c54 100644
--- a/src/bin/image_data_argb_alpha.c
+++ b/src/bin/image_data_argb_alpha.c
@@ -20,12 +20,12 @@ static Evas_Object *o_images[1];
 /* setup */
 static void _setup(void)
 {
-   int i;
Evas_Object *o;
-   void *pixels;
+   Eina_Slice sl;
 
-   pixels = malloc(sizeof (int) * 640 * 480);
-   for (i = 0; i < 1; i++)
+   sl.len = 640 * 480 * 4;
+   sl.mem = malloc(sl.len);
+   for (int i = 0; i < 1; i++)
  {
 o = efl_add(EFL_CANVAS_IMAGE_CLASS, evas);
 o_images[i] = o;
@@ -34,17 +34,23 @@ static void _setup(void)
 efl_gfx_fill_set(o, 0, 0, 640, 480);
 efl_gfx_size_set(o, 640, 480);
 efl_gfx_visible_set(o, EINA_TRUE);
-efl_gfx_buffer_copy_set(

[EGIT] [apps/eruler] master 01/01: main: Fix crash on shutdown

2016-11-30 Thread Jean-Philippe Andre
jpeg pushed a commit to branch master.

http://git.enlightenment.org/apps/eruler.git/commit/?id=ef5c03207c0985a3b42f96d77fcbef995ea86298

commit ef5c03207c0985a3b42f96d77fcbef995ea86298
Author: Jean-Philippe Andre 
Date:   Wed Nov 30 21:18:02 2016 +0900

main: Fix crash on shutdown

Don't let _event_del access an already freed zone.
---
 src/bin/main.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/bin/main.c b/src/bin/main.c
index 7df9f04..5ccad6a 100644
--- a/src/bin/main.c
+++ b/src/bin/main.c
@@ -2393,6 +2393,9 @@ zone_del(Zone *zone)
 * their lists.
 */
 
+   evas_object_event_callback_del_full(zone->event, EVAS_CALLBACK_DEL, 
_event_del, zone);
+
+
free(zone);
zones = eina_list_remove(zones, zone);
 }

-- 




[EGIT] [tools/edi] master 01/01: editor: Fix crash when resizing without any code open

2016-11-29 Thread Jean-Philippe Andre
jpeg pushed a commit to branch master.

http://git.enlightenment.org/tools/edi.git/commit/?id=886b6356bd3678ec2768c9a7a6084d82e51137ef

commit 886b6356bd3678ec2768c9a7a6084d82e51137ef
Author: Jean-Philippe Andre 
Date:   Wed Nov 30 15:22:45 2016 +0900

editor: Fix crash when resizing without any code open
---
 src/bin/editor/edi_editor.c | 12 +++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/src/bin/editor/edi_editor.c b/src/bin/editor/edi_editor.c
index a8b3c71..317c01d 100644
--- a/src/bin/editor/edi_editor.c
+++ b/src/bin/editor/edi_editor.c
@@ -553,11 +553,20 @@ _edi_editor_config_changed(void *data, int type 
EINA_UNUSED, void *event EINA_UN
return ECORE_CALLBACK_RENEW;
 }
 
+static void
+_editor_del_cb(void *data, Evas *e EINA_UNUSED, Evas_Object *o EINA_UNUSED, 
void *event_info EINA_UNUSED)
+{
+   Ecore_Event_Handler *ev_handler = data;
+
+   ecore_event_handler_del(ev_handler);
+}
+
 Evas_Object *
 edi_editor_add(Evas_Object *parent, Edi_Mainview_Item *item)
 {
Evas_Object *vbox, *box, *searchbar, *statusbar;
Evas_Modifier_Mask ctrl, shift, alt;
+   Ecore_Event_Handler *ev_handler;
Evas *e;
 
Elm_Code *code;
@@ -627,7 +636,8 @@ edi_editor_add(Evas_Object *parent, Edi_Mainview_Item *item)
(void)!evas_object_key_grab(widget, "f", ctrl, shift | alt, 1);
 
evas_object_data_set(vbox, "editor", editor);
-   ecore_event_handler_add(EDI_EVENT_CONFIG_CHANGED, 
_edi_editor_config_changed, widget);
+   ev_handler = ecore_event_handler_add(EDI_EVENT_CONFIG_CHANGED, 
_edi_editor_config_changed, widget);
+   evas_object_event_callback_add(vbox, EVAS_CALLBACK_DEL, _editor_del_cb, 
ev_handler);
 
return vbox;
 }

-- 




[EGIT] [editors/vim-configs] master 01/01: edc: Add 'required' keyword

2016-11-09 Thread Jean-Philippe Andre
jpeg pushed a commit to branch master.

http://git.enlightenment.org/editors/vim-configs.git/commit/?id=220b2a1ed48b81b542cd733597cea10ec07f0c5f

commit 220b2a1ed48b81b542cd733597cea10ec07f0c5f
Author: Jean-Philippe Andre 
Date:   Thu Nov 10 10:43:28 2016 +0900

edc: Add 'required' keyword
---
 syntax/edc.vim | 1 +
 1 file changed, 1 insertion(+)

diff --git a/syntax/edc.vim b/syntax/edc.vim
index ec99cc0..c822fb4 100644
--- a/syntax/edc.vim
+++ b/syntax/edc.vim
@@ -52,6 +52,7 @@ syn keyword   edcLabelinsert_before insert_after 
contained
 syn keywordedcLabelscript_recursion contained
 syn keywordedcLabellimit broadcast_signal targets target_group 
groups size_range contained
 syn keywordedcLabelselect_mode cursor_mode repch
+syn keywordedcLabelrequired contained
 " LazEDC synonyms
 syn keywordedcLabelbefore after ignore pointer alt_font clip  
contained
 

-- 




[EGIT] [tools/expedite] master 01/01: ui: Fix build break due to eo api changes (input events)

2016-08-29 Thread Jean-Philippe Andre
jpeg pushed a commit to branch master.

http://git.enlightenment.org/tools/expedite.git/commit/?id=19657b6d255daf17088981a6fdec3b6a46b55a7b

commit 19657b6d255daf17088981a6fdec3b6a46b55a7b
Author: Jean-Philippe Andre 
Date:   Tue Aug 30 15:45:39 2016 +0900

ui: Fix build break due to eo api changes (input events)
---
 src/bin/ui.c | 22 +++---
 1 file changed, 11 insertions(+), 11 deletions(-)

diff --git a/src/bin/ui.c b/src/bin/ui.c
index fad356f..4018f35 100644
--- a/src/bin/ui.c
+++ b/src/bin/ui.c
@@ -258,8 +258,8 @@ _ui_select(void)
 static void
 _ui_key(void *data EINA_UNUSED, const Eo_Event *event)
 {
-   Efl_Event_Key *ev = event->info;
-   const char *keyname = efl_event_key_name_get(ev);
+   Efl_Input_Key *ev = event->info;
+   const char *keyname = efl_input_key_name_get(ev);
 
if (!keyname) return;
 
@@ -300,12 +300,12 @@ static int down_menu_sel = 0;
 static void
 _ui_mouse_down(void *data EINA_UNUSED, const Eo_Event *event)
 {
-   Efl_Event_Pointer *ev = event->info;
+   Efl_Input_Pointer *ev = event->info;
 
-   if (efl_event_pointer_button_get(ev) != 1) return;
+   if (efl_input_pointer_button_get(ev) != 1) return;
if (menu_active)
  {
-efl_event_pointer_position_get(ev, &down_x, &down_y);
+efl_input_pointer_position_get(ev, &down_x, &down_y);
 down_menu_sel = menu_sel;
  }
 }
@@ -313,14 +313,14 @@ _ui_mouse_down(void *data EINA_UNUSED, const Eo_Event 
*event)
 static void
 _ui_mouse_up(void *data EINA_UNUSED, const Eo_Event *event)
 {
-   Efl_Event_Pointer *ev = event->info;
+   Efl_Input_Pointer *ev = event->info;
 
-   if (efl_event_pointer_button_get(ev) != 1) return;
+   if (efl_input_pointer_button_get(ev) != 1) return;
if (menu_active)
  {
 Evas_Coord dx, dy, x, y;
 
-efl_event_pointer_position_get(ev, &x, &y);
+efl_input_pointer_position_get(ev, &x, &y);
 dx = x - down_x;
 dy = y - down_y;
 if dx * dx) + (dy * dy)) < (20 * 20)) &&
@@ -337,14 +337,14 @@ _ui_mouse_up(void *data EINA_UNUSED, const Eo_Event 
*event)
 static void
 _ui_mouse_move(void *data EINA_UNUSED, const Eo_Event *event)
 {
-   Efl_Event_Pointer *ev = event->info;
+   Efl_Input_Pointer *ev = event->info;
 
-   if (efl_event_pointer_button_get(ev) != 1) return;
+   if (efl_input_pointer_button_get(ev) != 1) return;
if (menu_active)
  {
 Evas_Coord x;
 
-efl_event_pointer_position_get(ev, &x, NULL);
+efl_input_pointer_position_get(ev, &x, NULL);
 menu_sel = down_menu_sel + ((x - down_x) / 25);
 /* scroll */
 if (menu_sel < 0) menu_sel = 0;

-- 




[EGIT] [tools/enventor] master 01/01: clang: Fix warnings and compilation errors

2016-08-09 Thread Jean-Philippe Andre
jpeg pushed a commit to branch master.

http://git.enlightenment.org/tools/enventor.git/commit/?id=3af6ede5e558c7e6d352bdccf381fd662b7fa5a5

commit 3af6ede5e558c7e6d352bdccf381fd662b7fa5a5
Author: Jean-Philippe Andre 
Date:   Wed Aug 10 15:05:13 2016 +0900

clang: Fix warnings and compilation errors

enventor wouldn't compile with clang. Also, it would print
a lot of warnings.
---
 src/bin/console.c|  2 +-
 src/bin/file_browser.c   |  6 +++---
 src/bin/file_mgr.c   |  2 +-
 src/bin/help.c   |  4 ++--
 src/bin/live_edit.c  |  1 -
 src/bin/main.c   |  6 +++---
 src/include/console.h|  2 +-
 src/lib/auto_comp.c  |  1 +
 src/lib/ctxpopup.c   |  2 +-
 src/lib/dummy_obj.c  |  4 ++--
 src/lib/edc_editor.c |  2 +-
 src/lib/edc_parser.c |  6 --
 src/lib/enventor_smart.c |  5 -
 src/lib/reference.c  |  3 +--
 src/lib/syntax_color.c   | 14 +++---
 src/lib/syntax_indent.c  |  2 +-
 src/lib/wireframes_obj.c |  7 ---
 17 files changed, 37 insertions(+), 32 deletions(-)

diff --git a/src/bin/console.c b/src/bin/console.c
index 7ba99d1..1eabfae 100644
--- a/src/bin/console.c
+++ b/src/bin/console.c
@@ -85,7 +85,7 @@ set_console_error_msg(Evas_Object *console, const char *src)
free(color_msg);
 }
 
-static char*
+char*
 error_msg_syntax_color_set(char *text)
 {
char *color_error_msg;
diff --git a/src/bin/file_browser.c b/src/bin/file_browser.c
index 0522bf3..9dbbb84 100644
--- a/src/bin/file_browser.c
+++ b/src/bin/file_browser.c
@@ -132,7 +132,7 @@ file_genlist_item_append(brows_file *file, Elm_Object_Item 
*parent_it,
//Keep Main Item
if (file->main)
  {
-brows_data *bd = g_bd;
+bd = g_bd;
 bd->main_it = file->it;
  }
 
@@ -261,7 +261,7 @@ gl_contract_request_cb(void *data EINA_UNUSED, Evas_Object 
*obj EINA_UNUSED, voi
 }
 
 static void
-gl_expanded_cb(void *data EINA_UNUSED, Evas_Object *obj, void *event_info)
+gl_expanded_cb(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void 
*event_info)
 {
brows_data *bd = g_bd;
if (!bd) return;
@@ -300,7 +300,7 @@ gl_expanded_cb(void *data EINA_UNUSED, Evas_Object *obj, 
void *event_info)
 }
 
 static void
-gl_contracted_cb(void *data EINA_UNUSED, Evas_Object *obj, void *event_info)
+gl_contracted_cb(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void 
*event_info)
 {
brows_data *bd = g_bd;
if (!bd) return;
diff --git a/src/bin/file_mgr.c b/src/bin/file_mgr.c
index 597b75a..ba9d6f3 100644
--- a/src/bin/file_mgr.c
+++ b/src/bin/file_mgr.c
@@ -289,7 +289,6 @@ file_mgr_main_file_set(const char *path)
   }
  }
 
-   Eina_List *list;
Enventor_Item *it;
 
//If this file is already openend with sub file, remove it.
@@ -457,4 +456,5 @@ file_mgr_file_open(const char *file_path)
 
//This selected file hasn't been opened yet, so let's open this file newly.
file_mgr_sub_file_add(file_path, EINA_TRUE);
+   return EINA_TRUE;
 }
diff --git a/src/bin/help.c b/src/bin/help.c
index 6be9d2f..1c63bca 100644
--- a/src/bin/help.c
+++ b/src/bin/help.c
@@ -41,7 +41,7 @@ win_moved_cb(void *data EINA_UNUSED, Evas_Object *obj,
 }
 
 static void
-list_item_selected_cb(void *data, Evas_Object *obj, void *event_info)
+list_item_selected_cb(void *data, Evas_Object *obj EINA_UNUSED, void 
*event_info EINA_UNUSED)
 {
Evas_Object *layout;
Evas_Object *label;
@@ -100,7 +100,7 @@ list_item_selected_cb(void *data, Evas_Object *obj, void 
*event_info)
 }
 
 static void
-button_clicked_cb(void *data, Evas_Object *obj, void *event_info)
+button_clicked_cb(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void 
*event_info EINA_UNUSED)
 {
Evas_Object *layout = g_layout;
Evas_Object *list = elm_object_part_content_get(layout, "swallow_list");
diff --git a/src/bin/live_edit.c b/src/bin/live_edit.c
index d3e9a20..535372f 100644
--- a/src/bin/live_edit.c
+++ b/src/bin/live_edit.c
@@ -1957,7 +1957,6 @@ info_text_init(live_data *ld)
int i;
Evas *e = evas_object_evas_get(ld->layout);
double scale = elm_config_scale_get();
-   Evas_Object *view_obj = view_obj_get(ld);
for (i = 0; i < Info_Text_Cnt; i++)
  {
 Evas_Object *text = evas_object_text_add(e);
diff --git a/src/bin/main.c b/src/bin/main.c
index 1d58782..ead19bc 100644
--- a/src/bin/main.c
+++ b/src/bin/main.c
@@ -473,7 +473,7 @@ enventor_live_view_resized_cb(void *data EINA_UNUSED,
 }
 
 static void
-enventor_live_view_loaded_cb(void *data EINA_UNUSED, Enventor_Object *obj,
+enventor_live_view_loaded_cb(void *data EINA_UNUSED, Enventor_Object *obj 
EINA_UNUSED,
  void *event_info EINA_UNUSED)
 {
base_edc_navigator_group_update();
@@ -556,8 +556,8 @@ enventor_ctxpopup_dismissed_cb(void *data EINA_UNUSED, 
Enventor_Object *obj,
 }
 
 static void
-enventor_file_open_requested_cb(void *data EINA_UNUSED, Enventor_Object *obj,
-

[EGIT] [tools/expedite] master 01/02: Fix compilation for git master (1.18-alpha)

2016-07-19 Thread Jean-Philippe Andre
jpeg pushed a commit to branch master.

http://git.enlightenment.org/tools/expedite.git/commit/?id=95d6a6cd9a390af5f603879cd56f030ef6842289

commit 95d6a6cd9a390af5f603879cd56f030ef6842289
Author: Jean-Philippe Andre 
Date:   Tue Jul 19 18:21:56 2016 +0900

Fix compilation for git master (1.18-alpha)
---
 src/bin/about.c|  10 +-
 src/bin/font_effect_blur_alpha.c   |   2 +-
 src/bin/font_effect_blur_color.c   |   2 +-
 src/bin/image_blend_border.c   |   4 +-
 src/bin/image_blend_border_recolor.c   |   4 +-
 src/bin/image_blend_fade_pow2_unscaled.c   |   4 +-
 src/bin/image_blend_fade_unscaled.c|   4 +-
 src/bin/image_blend_many_smooth_same_scaled.c  |   4 +-
 src/bin/image_blend_nearest_same_scaled.c  |   4 +-
 src/bin/image_blend_nearest_scaled.c   |   4 +-
 src/bin/image_blend_nearest_solid_same_scaled.c|   4 +-
 src/bin/image_blend_nearest_solid_scaled.c |   4 +-
 src/bin/image_blend_occlude1.c |   4 +-
 src/bin/image_blend_occlude1_few.c |   4 +-
 src/bin/image_blend_occlude1_many.c|   4 +-
 src/bin/image_blend_occlude1_very_many.c   |   4 +-
 src/bin/image_blend_occlude2.c |   4 +-
 src/bin/image_blend_occlude2_few.c |   4 +-
 src/bin/image_blend_occlude2_many.c|   4 +-
 src/bin/image_blend_occlude2_very_many.c   |   4 +-
 src/bin/image_blend_occlude3.c |   4 +-
 src/bin/image_blend_occlude3_few.c |   4 +-
 src/bin/image_blend_occlude3_many.c|   4 +-
 src/bin/image_blend_occlude3_very_many.c   |   4 +-
 src/bin/image_blend_smooth_same_scaled.c   |   4 +-
 src/bin/image_blend_smooth_scaled.c|   4 +-
 src/bin/image_blend_smooth_solid_same_scaled.c |   4 +-
 src/bin/image_blend_smooth_solid_scaled.c  |   4 +-
 src/bin/image_blend_solid_border.c |   4 +-
 src/bin/image_blend_solid_fade_pow2_unscaled.c |   4 +-
 src/bin/image_blend_solid_fade_unscaled.c  |   4 +-
 src/bin/image_blend_solid_middle_border.c  |   4 +-
 src/bin/image_blend_solid_middle_unscaled.c|   4 +-
 src/bin/image_blend_solid_unscaled.c   |   4 +-
 src/bin/image_blend_unscaled.c |   4 +-
 src/bin/image_crossfade.c  |   6 +-
 src/bin/image_data_argb.c  |   4 +-
 src/bin/image_data_argb_alpha.c|   4 +-
 src/bin/image_data_ycbcr601pl.c|   4 +-
 ...mage_data_ycbcr601pl_map_nearest_solid_rotate.c |   8 +-
 src/bin/image_data_ycbcr601pl_map_solid_rotate.c   |   8 +-
 src/bin/image_data_ycbcr601pl_wide_stride.c|   4 +-
 src/bin/image_map_3d_1.c   |   8 +-
 src/bin/image_map_3d_2.c   |   8 +-
 src/bin/image_map_3d_3.c   |   8 +-
 src/bin/image_map_3d_4.c   |   8 +-
 src/bin/image_map_3d_5.c   |   8 +-
 src/bin/image_map_3d_6.c   |   8 +-
 src/bin/image_map_3d_flow.c|  14 +--
 src/bin/image_map_color_alpha_nearest_rotate.c |   8 +-
 .../image_map_color_alpha_nearest_solid_rotate.c   |   8 +-
 src/bin/image_map_color_alpha_rotate.c |   8 +-
 src/bin/image_map_color_alpha_solid_rotate.c   |   8 +-
 src/bin/image_map_color_nearest_rotate.c   |   8 +-
 src/bin/image_map_color_nearest_solid_rotate.c |   8 +-
 src/bin/image_map_color_rotate.c   |   8 +-
 src/bin/image_map_color_solid_rotate.c |   8 +-
 src/bin/image_map_nearest_rotate.c |   8 +-
 src/bin/image_map_nearest_solid_rotate.c   |   8 +-
 src/bin/image_map_rotate.c |   8 +-
 src/bin/image_map_solid_rotate.c   |   8 +-
 src/bin/image_mask.c   |   8 +-
 src/bin/image_mask_10.c|  12 +--
 src/bin/image_mask_11.c|  12 +--
 src/bin/image_mask_12.c|   8 +-
 src/bin/image_mask_13.c|   8 +-
 src/bin/image_mask_2.c |   8 +-
 src/bin/image_mask_3.c |   8 +-
 src/bin/image_mask_4.c |   8 +-
 src/bin/image_mask_5.c |   8 +-
 src/bin/image_mask_6.c |   8 +-
 src/bin/image_mask_7.c |   8 +-
 src/bin/image_mask_8.c |   8 +-
 src/bin/image_mask_9.c |  12 +--
 src/bin/image_quality_scale.c  |   4 +-
 src/bin/line_blend.c   |   2 +-
 src/bin/poly_blend.c

[EGIT] [tools/expedite] master 02/02: Switch back to eo_del.

2016-07-19 Thread Jean-Philippe Andre
jpeg pushed a commit to branch master.

http://git.enlightenment.org/tools/expedite.git/commit/?id=ffa005ea3de26b4219f32c285cb1665bb1366163

commit ffa005ea3de26b4219f32c285cb1665bb1366163
Author: Jean-Philippe Andre 
Date:   Tue Jul 19 18:25:00 2016 +0900

Switch back to eo_del.

This was a brutal eo_unref -> eo_del. Should be good enough.
---
 src/bin/about.c  | 2 +-
 src/bin/image_blend_border.c | 2 +-
 src/bin/image_blend_border_recolor.c | 2 +-
 src/bin/image_blend_fade_pow2_unscaled.c | 2 +-
 src/bin/image_blend_fade_unscaled.c  | 2 +-
 src/bin/image_blend_many_smooth_same_scaled.c| 2 +-
 src/bin/image_blend_nearest_same_scaled.c| 2 +-
 src/bin/image_blend_nearest_scaled.c | 2 +-
 src/bin/image_blend_nearest_solid_same_scaled.c  | 2 +-
 src/bin/image_blend_nearest_solid_scaled.c   | 2 +-
 src/bin/image_blend_occlude1.c   | 2 +-
 src/bin/image_blend_occlude1_few.c   | 2 +-
 src/bin/image_blend_occlude1_many.c  | 2 +-
 src/bin/image_blend_occlude1_very_many.c | 2 +-
 src/bin/image_blend_occlude2.c   | 2 +-
 src/bin/image_blend_occlude2_few.c   | 2 +-
 src/bin/image_blend_occlude2_many.c  | 2 +-
 src/bin/image_blend_occlude2_very_many.c | 2 +-
 src/bin/image_blend_occlude3.c   | 2 +-
 src/bin/image_blend_occlude3_few.c   | 2 +-
 src/bin/image_blend_occlude3_many.c  | 2 +-
 src/bin/image_blend_occlude3_very_many.c | 2 +-
 src/bin/image_blend_smooth_same_scaled.c | 2 +-
 src/bin/image_blend_smooth_scaled.c  | 2 +-
 src/bin/image_blend_smooth_solid_same_scaled.c   | 2 +-
 src/bin/image_blend_smooth_solid_scaled.c| 2 +-
 src/bin/image_blend_solid_border.c   | 2 +-
 src/bin/image_blend_solid_fade_pow2_unscaled.c   | 2 +-
 src/bin/image_blend_solid_fade_unscaled.c| 2 +-
 src/bin/image_blend_solid_middle_border.c| 2 +-
 src/bin/image_blend_solid_middle_unscaled.c  | 2 +-
 src/bin/image_blend_solid_unscaled.c | 2 +-
 src/bin/image_blend_unscaled.c   | 2 +-
 src/bin/image_crossfade.c| 2 +-
 src/bin/image_data_argb.c| 2 +-
 src/bin/image_data_argb_alpha.c  | 2 +-
 src/bin/image_data_ycbcr601pl.c  | 2 +-
 src/bin/image_data_ycbcr601pl_map_nearest_solid_rotate.c | 2 +-
 src/bin/image_data_ycbcr601pl_map_solid_rotate.c | 2 +-
 src/bin/image_data_ycbcr601pl_wide_stride.c  | 2 +-
 src/bin/image_map_3d_1.c | 2 +-
 src/bin/image_map_3d_2.c | 2 +-
 src/bin/image_map_3d_3.c | 2 +-
 src/bin/image_map_3d_4.c | 2 +-
 src/bin/image_map_3d_5.c | 2 +-
 src/bin/image_map_3d_6.c | 2 +-
 src/bin/image_map_3d_flow.c  | 4 ++--
 src/bin/image_map_color_alpha_nearest_rotate.c   | 2 +-
 src/bin/image_map_color_alpha_nearest_solid_rotate.c | 2 +-
 src/bin/image_map_color_alpha_rotate.c   | 2 +-
 src/bin/image_map_color_alpha_solid_rotate.c | 2 +-
 src/bin/image_map_color_nearest_rotate.c | 2 +-
 src/bin/image_map_color_nearest_solid_rotate.c   | 2 +-
 src/bin/image_map_color_rotate.c | 2 +-
 src/bin/image_map_color_solid_rotate.c   | 2 +-
 src/bin/image_map_nearest_rotate.c   | 2 +-
 src/bin/image_map_nearest_solid_rotate.c | 2 +-
 src/bin/image_map_rotate.c   | 2 +-
 src/bin/image_map_solid_rotate.c | 2 +-
 src/bin/image_mask.c | 2 +-
 src/bin/image_mask_10.c  | 4 ++--
 src/bin/image_mask_11.c  | 4 ++--
 src/bin/image_mask_12.c  | 4 ++--
 src/bin/image_mask_13.c  | 4 ++--
 src/bin/image_mask_2.c   | 2 +-
 src/bin/image_mask_3.c   | 2 +-
 src/bin/image_mask_4.c   | 4 ++--
 src/bin/image_mask_5.c   | 4 ++--
 src/bin/image_mask_6.c   | 4 ++--
 src/bin/image_mask_7.c   | 4 ++--
 src/bin/image_mask_8.c   | 4 ++--
 

[EGIT] [admin/devs] master 01/01: developers: Add key for Simotek

2016-06-07 Thread Jean-Philippe Andre
jpeg pushed a commit to branch master.

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

commit bcffe357c90cf0bcc83067a7d380a397ba40278d
Author: Jean-Philippe Andre 
Date:   Wed Jun 8 10:59:47 2016 +0900

developers: Add key for Simotek

Welcome to Simon Lees.

In order to help on the E releases, Simon needs a developer
access. Here's a chat log from yesterday:

00:07 <@zmike> TAsn: can you arrange for Simotek to get commit access to 
the e20 branch?
00:08 <@zmike> also I guess he probably needs access to copy files to 
download.e.org
00:08 < TAsn> zmike, doesn't he have commit access?
00:08 <@zmike> no
00:08 < TAsn> zmike, just give him commit access

I also agree with the above, sorry for bypassing the usual democratic
vote.
---
 developers/simotek/icon-big.png | Bin 0 -> 49466 bytes
 developers/simotek/id_rsa.pub   |   1 +
 developers/simotek/info.txt |  10 ++
 3 files changed, 11 insertions(+)

diff --git a/developers/simotek/icon-big.png b/developers/simotek/icon-big.png
new file mode 100644
index 000..0c8cc3e
Binary files /dev/null and b/developers/simotek/icon-big.png differ
diff --git a/developers/simotek/id_rsa.pub b/developers/simotek/id_rsa.pub
new file mode 100644
index 000..e397aec
--- /dev/null
+++ b/developers/simotek/id_rsa.pub
@@ -0,0 +1 @@
+ssh-rsa 
B3NzaC1yc2EDAQABAAACAQC1Ewg4OG+BjkVsbTE+oYXDhuoeTC32h6jZPVDnHW0mQaZl1anxkOY3Tg67czzo3Fvzwqln5fe1qtRpGNoOLOLcShZmyojQdTFLJHYOQmuGzcj0dSu9KegSMim6pkrBT2mFAlKq2ytOPnhL9Y9ZUP13dc4i+Sa8sw4gqeKTI6rscm1hMhCTF3pihR2JVHhynjfpcNQjDZucLrSCNGYbeY2aWzi4OqOswV4KHllrZOIM8+JBnDXtGtfiAewqh8bGMngcTdS741YO+FzHEzGmnQgyH7GSNAWuZGwkGtU/qJjoszaE7YYzo3pdRF5ZAmP3bREYpnZbM9U8Xt9JYsKb7kmmYYDcFG6jNzpY90koRnOe85/hMWyGru14fHFfgod4+sfaOoPnB13e7wsxvm/kW/Tj+mzmNwuRqYVsxUHi4LkbF54ROD0xFaaA+xh2ht/tvQYNWlrR
 [...]
diff --git a/developers/simotek/info.txt b/developers/simotek/info.txt
new file mode 100644
index 000..7fcdb79
--- /dev/null
+++ b/developers/simotek/info.txt
@@ -0,0 +1,10 @@
+Login: simotek
+IRC Nick:  simotek
+Name:  Simon Lees
+Location:  Adelaide Australia
+E-Mail:sfl...@suse.de
+WWW:   http://simotek.net
+Managing:  Long Term Releases
+Contributing:  packaging, intergration
+Group: Release Management, Packaging
+Platform:  openSUSE

-- 




[EGIT] [tools/expedite] master 01/01: Fix compilation - use eo_unref and buffer map

2016-05-26 Thread Jean-Philippe Andre
jpeg pushed a commit to branch master.

http://git.enlightenment.org/tools/expedite.git/commit/?id=74007f65bca31abd3f0a7aad67829f62397c3877

commit 74007f65bca31abd3f0a7aad67829f62397c3877
Author: Jean-Philippe Andre 
Date:   Thu May 26 18:29:05 2016 +0900

Fix compilation - use eo_unref and buffer map

Remove eo api usage for TEXT and LINE objects.
This is a very quickly made patch, in order to test. Expedite
tests might need to be fixed up a little bit more if we use eo_halt.

Running expedite spews out TONS of errors.
---
 src/bin/about.c  |  2 +-
 src/bin/image_blend_border.c |  2 +-
 src/bin/image_blend_border_recolor.c |  2 +-
 src/bin/image_blend_fade_pow2_unscaled.c |  2 +-
 src/bin/image_blend_fade_unscaled.c  |  2 +-
 src/bin/image_blend_many_smooth_same_scaled.c|  2 +-
 src/bin/image_blend_nearest_same_scaled.c|  2 +-
 src/bin/image_blend_nearest_scaled.c |  2 +-
 src/bin/image_blend_nearest_solid_same_scaled.c  |  2 +-
 src/bin/image_blend_nearest_solid_scaled.c   |  2 +-
 src/bin/image_blend_occlude1.c   |  2 +-
 src/bin/image_blend_occlude1_few.c   |  2 +-
 src/bin/image_blend_occlude1_many.c  |  2 +-
 src/bin/image_blend_occlude1_very_many.c |  2 +-
 src/bin/image_blend_occlude2.c   |  2 +-
 src/bin/image_blend_occlude2_few.c   |  2 +-
 src/bin/image_blend_occlude2_many.c  |  2 +-
 src/bin/image_blend_occlude2_very_many.c |  2 +-
 src/bin/image_blend_occlude3.c   |  2 +-
 src/bin/image_blend_occlude3_few.c   |  2 +-
 src/bin/image_blend_occlude3_many.c  |  2 +-
 src/bin/image_blend_occlude3_very_many.c |  2 +-
 src/bin/image_blend_smooth_same_scaled.c |  2 +-
 src/bin/image_blend_smooth_scaled.c  |  2 +-
 src/bin/image_blend_smooth_solid_same_scaled.c   |  2 +-
 src/bin/image_blend_smooth_solid_scaled.c|  2 +-
 src/bin/image_blend_solid_border.c   |  2 +-
 src/bin/image_blend_solid_fade_pow2_unscaled.c   |  2 +-
 src/bin/image_blend_solid_fade_unscaled.c|  2 +-
 src/bin/image_blend_solid_middle_border.c|  4 ++--
 src/bin/image_blend_solid_middle_unscaled.c  |  4 ++--
 src/bin/image_blend_solid_unscaled.c |  2 +-
 src/bin/image_blend_unscaled.c   |  2 +-
 src/bin/image_crossfade.c|  2 +-
 src/bin/image_data_argb.c| 15 ---
 src/bin/image_data_argb_alpha.c  | 16 
 src/bin/image_data_ycbcr601pl.c  |  4 +---
 src/bin/image_data_ycbcr601pl_map_nearest_solid_rotate.c |  9 +
 src/bin/image_data_ycbcr601pl_map_solid_rotate.c |  9 +
 src/bin/image_data_ycbcr601pl_wide_stride.c  | 10 +-
 src/bin/image_map_3d_1.c |  2 +-
 src/bin/image_map_3d_2.c |  2 +-
 src/bin/image_map_3d_3.c |  2 +-
 src/bin/image_map_3d_4.c |  2 +-
 src/bin/image_map_3d_5.c |  2 +-
 src/bin/image_map_3d_6.c |  2 +-
 src/bin/image_map_3d_flow.c  |  4 ++--
 src/bin/image_map_color_alpha_nearest_rotate.c   |  2 +-
 src/bin/image_map_color_alpha_nearest_solid_rotate.c |  2 +-
 src/bin/image_map_color_alpha_rotate.c   |  2 +-
 src/bin/image_map_color_alpha_solid_rotate.c |  2 +-
 src/bin/image_map_color_nearest_rotate.c |  2 +-
 src/bin/image_map_color_nearest_solid_rotate.c   |  2 +-
 src/bin/image_map_color_rotate.c |  2 +-
 src/bin/image_map_color_solid_rotate.c   |  2 +-
 src/bin/image_map_nearest_rotate.c   |  2 +-
 src/bin/image_map_nearest_solid_rotate.c |  2 +-
 src/bin/image_map_rotate.c   |  2 +-
 src/bin/image_map_solid_rotate.c |  2 +-
 src/bin/image_mask.c |  2 +-
 src/bin/image_mask_10.c  |  4 ++--
 src/bin/image_mask_11.c  |  4 ++--
 src/bin/image_mask_12.c  |  4 ++--
 src/bin/image_mask_13.c  |  4 ++--
 src/bin/image_mask_2.c   |  2 +-
 src/bin/image_mask_3.c   |  2 +-
 src/bin

[EGIT] [tools/edi] master 01/01: elm_code: unbreak previous commit

2016-05-16 Thread Jean-Philippe ANDRE
jpeg pushed a commit to branch master.

http://git.enlightenment.org/tools/edi.git/commit/?id=0f0fa5f455911809c317d78f42c5c4cd1492f2ba

commit 0f0fa5f455911809c317d78f42c5c4cd1492f2ba
Author: Jean-Philippe ANDRE 
Date:   Mon May 16 23:15:21 2016 +0900

elm_code: unbreak previous commit

logs could not be scrolled anymore, because the
scroll cb would scroll back to the end.
---
 elm_code/src/lib/widget/elm_code_widget.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/elm_code/src/lib/widget/elm_code_widget.c 
b/elm_code/src/lib/widget/elm_code_widget.c
index f3de34c..da6987e 100644
--- a/elm_code/src/lib/widget/elm_code_widget.c
+++ b/elm_code/src/lib/widget/elm_code_widget.c
@@ -1596,6 +1596,8 @@ _elm_code_widget_resize(Elm_Code_Widget *widget, 
Elm_Code_Line *newline)
   }
  }
 
+   if (!newline) return;
+
if (pd->gravity_x == 1.0 || pd->gravity_y == 1.0)
  _elm_code_widget_scroll_by(widget,
 (pd->gravity_x == 1.0 && ww > old_width) ? ww - old_width : 0,

-- 




[EGIT] [tools/edi] master 01/01: elm_code: fix crash from previous commits

2016-05-16 Thread Jean-Philippe ANDRE
jpeg pushed a commit to branch master.

http://git.enlightenment.org/tools/edi.git/commit/?id=df2f46f5da02243a54bc934559d70356f0a68339

commit df2f46f5da02243a54bc934559d70356f0a68339
Author: Jean-Philippe ANDRE 
Date:   Mon May 16 19:52:35 2016 +0900

elm_code: fix crash from previous commits

sorry! i'm afraid this is not 100% stable yet
---
 elm_code/src/lib/widget/elm_code_widget.c | 9 +++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/elm_code/src/lib/widget/elm_code_widget.c 
b/elm_code/src/lib/widget/elm_code_widget.c
index 01a0e24..8d4871c 100644
--- a/elm_code/src/lib/widget/elm_code_widget.c
+++ b/elm_code/src/lib/widget/elm_code_widget.c
@@ -1521,6 +1521,7 @@ _elm_code_widget_resize(Elm_Code_Widget *widget, 
Elm_Code_Line *newline)
int w, h, cw, ch, gutter;
unsigned int line_width;
Elm_Code_Widget_Data *pd;
+   Eina_Bool neww = EINA_FALSE;
 
pd = eo_data_scope_get(widget, ELM_CODE_WIDGET_CLASS);
gutter = elm_obj_code_widget_text_left_gutter_width_get(widget);
@@ -1545,10 +1546,14 @@ _elm_code_widget_resize(Elm_Code_Widget *widget, 
Elm_Code_Line *newline)
   }
 line_width = elm_code_widget_line_text_column_width_get(widget, line);
 if ((int) line_width + gutter + 1 > w)
-  w = (int) line_width + gutter + 1;
+  {
+ neww = EINA_TRUE;
+ w = (int) line_width + gutter + 1;
+  }
  }
else
  {
+neww = EINA_TRUE;
 EINA_LIST_FOREACH(pd->code->file->lines, item, line)
   {
  line_width = elm_code_widget_line_text_column_width_get(widget, 
line);
@@ -1565,7 +1570,7 @@ _elm_code_widget_resize(Elm_Code_Widget *widget, 
Elm_Code_Line *newline)
  wh = h*ch;
pd->col_count = ww/cw + 1;
 
-   if (newline)
+   if (newline && !neww)
  {
 grid = eina_list_nth(pd->grids, newline->number - 1);
 evas_object_textgrid_size_set(grid, pd->col_count, 1);

-- 




[EGIT] [tools/edi] master 01/01: elm_code: remove useless variable

2016-05-16 Thread Jean-Philippe ANDRE
jpeg pushed a commit to branch master.

http://git.enlightenment.org/tools/edi.git/commit/?id=898e9b2c68fe6b7834983e23323af8d41d613ab5

commit 898e9b2c68fe6b7834983e23323af8d41d613ab5
Author: Jean-Philippe ANDRE 
Date:   Mon May 16 19:33:57 2016 +0900

elm_code: remove useless variable
---
 elm_code/src/lib/widget/elm_code_widget.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/elm_code/src/lib/widget/elm_code_widget.c 
b/elm_code/src/lib/widget/elm_code_widget.c
index 4593a83..01a0e24 100644
--- a/elm_code/src/lib/widget/elm_code_widget.c
+++ b/elm_code/src/lib/widget/elm_code_widget.c
@@ -1521,7 +1521,6 @@ _elm_code_widget_resize(Elm_Code_Widget *widget, 
Elm_Code_Line *newline)
int w, h, cw, ch, gutter;
unsigned int line_width;
Elm_Code_Widget_Data *pd;
-   Eina_Bool neww = EINA_FALSE;
 
pd = eo_data_scope_get(widget, ELM_CODE_WIDGET_CLASS);
gutter = elm_obj_code_widget_text_left_gutter_width_get(widget);
@@ -1550,7 +1549,6 @@ _elm_code_widget_resize(Elm_Code_Widget *widget, 
Elm_Code_Line *newline)
  }
else
  {
-neww = EINA_TRUE;
 EINA_LIST_FOREACH(pd->code->file->lines, item, line)
   {
  line_width = elm_code_widget_line_text_column_width_get(widget, 
line);
@@ -1573,7 +1571,7 @@ _elm_code_widget_resize(Elm_Code_Widget *widget, 
Elm_Code_Line *newline)
 evas_object_textgrid_size_set(grid, pd->col_count, 1);
 evas_object_size_hint_min_set(grid, w*cw, ch);
  }
-   else if (neww)
+   else
  {
 EINA_LIST_FOREACH(pd->grids, item, grid)
   {

-- 




[EGIT] [tools/edi] master 01/01: elm_code: Fix scroller size when appending new lines

2016-05-16 Thread Jean-Philippe ANDRE
jpeg pushed a commit to branch master.

http://git.enlightenment.org/tools/edi.git/commit/?id=5e39dd9be47b36d1cabdbe6be94e7377c4f14bbc

commit 5e39dd9be47b36d1cabdbe6be94e7377c4f14bbc
Author: Jean-Philippe ANDRE 
Date:   Mon May 16 19:28:11 2016 +0900

elm_code: Fix scroller size when appending new lines

This tries to optimize the new box size calc in case
we're adding a new line, by not walking all the objects
again.
---
 elm_code/src/lib/widget/elm_code_widget.c | 67 +--
 1 file changed, 46 insertions(+), 21 deletions(-)

diff --git a/elm_code/src/lib/widget/elm_code_widget.c 
b/elm_code/src/lib/widget/elm_code_widget.c
index 025ca91..4593a83 100644
--- a/elm_code/src/lib/widget/elm_code_widget.c
+++ b/elm_code/src/lib/widget/elm_code_widget.c
@@ -50,7 +50,7 @@ Eina_Unicode status_icons[] = {
  } \
 } while (0)
 
-static void _elm_code_widget_resize(Elm_Code_Widget *widget);
+static void _elm_code_widget_resize(Elm_Code_Widget *widget, Elm_Code_Line 
*newline);
 
 EAPI Evas_Object *
 elm_code_widget_add(Evas_Object *parent, Elm_Code *code)
@@ -389,14 +389,19 @@ _elm_code_widget_fill_line(Elm_Code_Widget *widget, 
Elm_Code_Line *line)
 }
 
 static void
-_elm_code_widget_fill_range(Elm_Code_Widget *widget, unsigned int first_row, 
unsigned int last_row)
+_elm_code_widget_fill_range(Elm_Code_Widget *widget, unsigned int first_row, 
unsigned int last_row,
+Elm_Code_Line *newline)
 {
Elm_Code_Line *line;
unsigned int y;
Elm_Code_Widget_Data *pd;
 
pd = eo_data_scope_get(widget, ELM_CODE_WIDGET_CLASS);
-   _elm_code_widget_resize(widget);
+   _elm_code_widget_resize(widget, newline);
+
+   // if called from new line cb, no need to update whole range unless visible
+   if (newline && !elm_obj_code_widget_line_visible_get(widget, newline))
+ return;
 
for (y = first_row; y <= last_row; y++)
  {
@@ -407,7 +412,7 @@ _elm_code_widget_fill_range(Elm_Code_Widget *widget, 
unsigned int first_row, uns
 }
 
 static void
-_elm_code_widget_refresh(Elm_Code_Widget *widget)
+_elm_code_widget_refresh(Elm_Code_Widget *widget, Elm_Code_Line *line)
 {
Evas_Coord scroll_y, scroll_h, oy;
unsigned int first_row, last_row;
@@ -427,7 +432,7 @@ _elm_code_widget_refresh(Elm_Code_Widget *widget)
if (last_row > elm_code_file_lines_get(pd->code->file))
  last_row = elm_code_file_lines_get(pd->code->file);
 
-   _elm_code_widget_fill_range(widget, first_row, last_row);
+   _elm_code_widget_fill_range(widget, first_row, last_row, line);
 }
 
 static void
@@ -437,7 +442,7 @@ _elm_code_widget_fill(Elm_Code_Widget *widget)
 
pd = eo_data_scope_get(widget, ELM_CODE_WIDGET_CLASS);
 
-   _elm_code_widget_fill_range(widget, 1, 
elm_code_file_lines_get(pd->code->file));
+   _elm_code_widget_fill_range(widget, 1, 
elm_code_file_lines_get(pd->code->file), NULL);
 }
 
 static Eina_Bool
@@ -445,17 +450,11 @@ _elm_code_widget_line_cb(void *data, const Eo_Event 
*event)
 {
Elm_Code_Line *line;
Elm_Code_Widget *widget;
-   Eina_Bool visible;
 
line = (Elm_Code_Line *)event->info;
widget = (Elm_Code_Widget *)data;
 
-   visible = elm_obj_code_widget_line_visible_get(widget, line);
-   if (!visible)
- return EO_CALLBACK_CONTINUE;
-
-   // FIXME refresh just the row unless we have resized (by being the result 
of a row append)
-   _elm_code_widget_refresh(widget);
+   _elm_code_widget_refresh(widget, line);
 
return EO_CALLBACK_CONTINUE;
 }
@@ -478,7 +477,7 @@ _elm_code_widget_selection_cb(void *data, const Eo_Event 
*event EINA_UNUSED)
 
widget = (Elm_Code_Widget *)data;
 
-   _elm_code_widget_refresh(widget);
+   _elm_code_widget_refresh(widget, NULL);
return EO_CALLBACK_CONTINUE;
 }
 
@@ -501,7 +500,7 @@ _elm_code_widget_resize_cb(void *data, Evas *e EINA_UNUSED, 
Evas_Object *obj EIN
 
widget = (Elm_Code_Widget *)data;
 
-   _elm_code_widget_refresh(widget);
+   _elm_code_widget_refresh(widget, NULL);
 }
 
 static Eina_Bool
@@ -1339,7 +1338,7 @@ _elm_code_widget_focused_event_cb(void *data, Evas_Object 
*obj,
pd->focussed = EINA_TRUE;
 
_elm_code_widget_update_focus_directions(widget);
-   _elm_code_widget_refresh(obj);
+   _elm_code_widget_refresh(obj, NULL);
 }
 
 static void
@@ -1353,7 +1352,7 @@ _elm_code_widget_unfocused_event_cb(void *data, 
Evas_Object *obj,
pd = eo_data_scope_get(widget, ELM_CODE_WIDGET_CLASS);
 
pd->focussed = EINA_FALSE;
-   _elm_code_widget_refresh(obj);
+   _elm_code_widget_refresh(obj, NULL);
 }
 
 EOLIAN static Eina_Bool
@@ -1513,7 +1512,7 @@ _elm_code_widget_ensure_n_grid_rows(Elm_Code_Widget 
*widget, int rows)
 }
 
 static void
-_elm_code_widget_resize(Elm_Code_Widget *widget)
+_elm_code_widget_resize(Elm_Code_Widget *widget, Elm_Code_Line *newline)
 {
Elm_Code_Line *line;
Eina_List *item;
@@ -1522,6 +1521,7 @@ _elm_code_widget_resize(Elm_Code_Widget *widget)
i

[EGIT] [tools/edi] master 01/02: tests: add a test case for log viewer

2016-05-16 Thread Jean-Philippe ANDRE
jpeg pushed a commit to branch master.

http://git.enlightenment.org/tools/edi.git/commit/?id=69cb737f0765957dc977aa09451fc18e63c8d531

commit 69cb737f0765957dc977aa09451fc18e63c8d531
Author: Jean-Philippe ANDRE 
Date:   Mon May 16 01:24:42 2016 +0900

tests: add a test case for log viewer

there is a bug that i'm tracking down... this is a good
test case for it
---
 elm_code/src/bin/elm_code_test_main.c | 88 ++-
 1 file changed, 77 insertions(+), 11 deletions(-)

diff --git a/elm_code/src/bin/elm_code_test_main.c 
b/elm_code/src/bin/elm_code_test_main.c
index a1840a6..92049d5 100644
--- a/elm_code/src/bin/elm_code_test_main.c
+++ b/elm_code/src/bin/elm_code_test_main.c
@@ -87,7 +87,7 @@ _elm_code_test_welcome_setup(Evas_Object *parent)
 }
 
 static Evas_Object *
-_elm_code_test_editor_setup(Evas_Object *parent)
+_elm_code_test_editor_setup(Evas_Object *parent, Eina_Bool log)
 {
Elm_Code *code;
Elm_Code_Line *line;
@@ -100,14 +100,17 @@ _elm_code_test_editor_setup(Evas_Object *parent)
elm_obj_code_widget_show_whitespace_set(widget, EINA_TRUE);
elm_obj_code_widget_line_numbers_set(widget, EINA_TRUE);
 
-   _append_line(code->file, "Edit me :)");
-   _append_line(code->file, "");
-   _append_line(code->file, "");
-   _append_line(code->file, "...Please?");
-
-   line = elm_code_file_line_get(code->file, 1);
-   elm_code_line_token_add(line, 5, 6, 1, ELM_CODE_TOKEN_TYPE_COMMENT);
-   elm_code_callback_fire(code, &ELM_CODE_EVENT_LINE_LOAD_DONE, line);
+   if (!log)
+ {
+_append_line(code->file, "Edit me :)");
+_append_line(code->file, "");
+_append_line(code->file, "");
+_append_line(code->file, "...Please?");
+
+line = elm_code_file_line_get(code->file, 1);
+elm_code_line_token_add(line, 5, 6, 1, ELM_CODE_TOKEN_TYPE_COMMENT);
+elm_code_callback_fire(code, &ELM_CODE_EVENT_LINE_LOAD_DONE, line);
+ }
 
evas_object_size_hint_weight_set(widget, EVAS_HINT_EXPAND, 
EVAS_HINT_EXPAND);
evas_object_size_hint_align_set(widget, EVAS_HINT_FILL, EVAS_HINT_FILL);
@@ -164,6 +167,36 @@ _elm_code_test_diff_setup(Evas_Object *parent)
return diff;
 }
 
+static Eina_Bool
+_elm_code_test_log_timer(void *data)
+{
+   Elm_Code *code = data;
+   static int line = 0;
+   char buf[250];
+
+   sprintf(buf, "line %d", ++line);
+   _append_line(code->file, buf);
+
+   return ECORE_CALLBACK_RENEW;
+}
+
+static void
+_elm_code_test_log_clicked(void *data, Evas_Object *obj, void *event_info 
EINA_UNUSED)
+{
+   static Ecore_Timer *t = NULL;
+
+   if (t)
+ {
+elm_object_text_set(obj, "Start");
+ecore_timer_del(t);
+t = NULL;
+return;
+ }
+
+   t = ecore_timer_add(0.05, _elm_code_test_log_timer, data);
+   elm_object_text_set(obj, "Stop");
+}
+
 static void
 _elm_code_test_welcome_editor_cb(void *data, Evas_Object *obj EINA_UNUSED, 
void *event_info EINA_UNUSED)
 {
@@ -172,7 +205,31 @@ _elm_code_test_welcome_editor_cb(void *data, Evas_Object 
*obj EINA_UNUSED, void
naviframe = (Evas_Object *)data;
screen = elm_box_add(naviframe);
evas_object_size_hint_weight_set(screen, EVAS_HINT_EXPAND, 
EVAS_HINT_EXPAND);
-   elm_box_pack_end(screen, _elm_code_test_editor_setup(screen));
+   elm_box_pack_end(screen, _elm_code_test_editor_setup(screen, EINA_FALSE));
+   evas_object_show(screen);
+
+   elm_naviframe_item_push(naviframe, "Editor",
+   NULL, NULL, screen, NULL);
+}
+
+static void
+_elm_code_test_welcome_log_cb(void *data, Evas_Object *obj EINA_UNUSED, void 
*event_info EINA_UNUSED)
+{
+   Evas_Object *naviframe, *screen, *o, *code;
+
+   naviframe = (Evas_Object *)data;
+   screen = elm_box_add(naviframe);
+   evas_object_size_hint_weight_set(screen, EVAS_HINT_EXPAND, 
EVAS_HINT_EXPAND);
+
+   code = _elm_code_test_editor_setup(screen, EINA_TRUE);
+   elm_box_pack_end(screen, code);
+
+   o = elm_button_add(screen);
+   elm_object_text_set(o, "log");
+   evas_object_smart_callback_add(o, "clicked", _elm_code_test_log_clicked, 
elm_obj_code_widget_code_get(code));
+   elm_box_pack_end(screen, o);
+   evas_object_show(o);
+
evas_object_show(screen);
 
elm_naviframe_item_push(naviframe, "Editor",
@@ -190,7 +247,7 @@ _elm_code_test_welcome_mirror_cb(void *data, Evas_Object 
*obj EINA_UNUSED, void
elm_box_homogeneous_set(screen, EINA_TRUE);
evas_object_size_hint_weight_set(screen, EVAS_HINT_EXPAND, 
EVAS_HINT_EXPAND);
 
-   widget = _elm_code_test_editor_setup(screen);
+   widget = _elm_code_test_editor_setup(screen, EINA_FALSE);
code = elm_obj_code_widget_code_get(widget);
elm_box_pack_end(screen, widget);
 
@@ -265,6 +322,15 @@ elm_code_test_win_setup(void)
evas_object_show(button);
 
b

[EGIT] [tools/edi] master 02/02: elm_code: Fix log test case

2016-05-16 Thread Jean-Philippe ANDRE
jpeg pushed a commit to branch master.

http://git.enlightenment.org/tools/edi.git/commit/?id=faf97a905c20fc2f69a000979f1a5788c28d104d

commit faf97a905c20fc2f69a000979f1a5788c28d104d
Author: Jean-Philippe ANDRE 
Date:   Mon May 16 18:03:25 2016 +0900

elm_code: Fix log test case

An uninitialized variable was causing all the trouble.
Somehow I believe this is not the complete fix, as
grid probably shouldn't be NULL.
---
 elm_code/src/lib/widget/elm_code_widget.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/elm_code/src/lib/widget/elm_code_widget.c 
b/elm_code/src/lib/widget/elm_code_widget.c
index daf7b18..025ca91 100644
--- a/elm_code/src/lib/widget/elm_code_widget.c
+++ b/elm_code/src/lib/widget/elm_code_widget.c
@@ -97,7 +97,7 @@ _elm_code_widget_cell_size_get(Elm_Code_Widget *widget, 
Evas_Coord *width, Evas_
 {
Elm_Code_Widget_Data *pd;
Evas_Object *grid;
-   Evas_Coord w, h;
+   Evas_Coord w = 0, h = 0;
 
pd = eo_data_scope_get(widget, ELM_CODE_WIDGET_CLASS);
 

-- 




[EGIT] [tools/edi] master 01/01: welcome: show after resize

2016-05-15 Thread Jean-Philippe ANDRE
jpeg pushed a commit to branch master.

http://git.enlightenment.org/tools/edi.git/commit/?id=4a759dfaf66152ea78d4b7e4cfb857d11850e70e

commit 4a759dfaf66152ea78d4b7e4cfb857d11850e70e
Author: Jean-Philippe ANDRE 
Date:   Mon May 16 00:14:20 2016 +0900

welcome: show after resize

The other way around does not guarantee the proper size.
---
 src/bin/screens/edi_welcome.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/bin/screens/edi_welcome.c b/src/bin/screens/edi_welcome.c
index a9a75dc..76fae90 100644
--- a/src/bin/screens/edi_welcome.c
+++ b/src/bin/screens/edi_welcome.c
@@ -462,8 +462,8 @@ Evas_Object *edi_welcome_show()
 NULL);
 
elm_naviframe_item_title_enabled_set(item, EINA_FALSE, EINA_FALSE);
+   evas_object_resize(win, ELM_SCALE_SIZE(480), ELM_SCALE_SIZE(260));
evas_object_show(win);
-   evas_object_resize(win, 480 * elm_config_scale_get(), 260 * 
elm_config_scale_get());
 
return win;
 }

-- 




[EGIT] [admin/devs] master 01/01: probies: Add spacegrapher

2015-03-17 Thread Jean-Philippe Andre
jpeg pushed a commit to branch master.

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

commit c0eb522f602bf1b6d79aa66690de4e25358bd93c
Author: Jean-Philippe Andre 
Date:   Wed Mar 18 09:38:07 2015 +0900

probies: Add spacegrapher

Welcome to Dongyeon Kim!
---
 probies/spacegrapher/icon-big.png | Bin 0 -> 50351 bytes
 probies/spacegrapher/icon-map.png | Bin 0 -> 1729 bytes
 probies/spacegrapher/icon-med.png | Bin 0 -> 15056 bytes
 probies/spacegrapher/icon-sml.png | Bin 0 -> 5036 bytes
 probies/spacegrapher/id_rsa.pub   |   1 +
 probies/spacegrapher/info.txt |  10 ++
 6 files changed, 11 insertions(+)

diff --git a/probies/spacegrapher/icon-big.png 
b/probies/spacegrapher/icon-big.png
new file mode 100644
index 000..898eb7f
Binary files /dev/null and b/probies/spacegrapher/icon-big.png differ
diff --git a/probies/spacegrapher/icon-map.png 
b/probies/spacegrapher/icon-map.png
new file mode 100644
index 000..be4be1c
Binary files /dev/null and b/probies/spacegrapher/icon-map.png differ
diff --git a/probies/spacegrapher/icon-med.png 
b/probies/spacegrapher/icon-med.png
new file mode 100644
index 000..5f8085b
Binary files /dev/null and b/probies/spacegrapher/icon-med.png differ
diff --git a/probies/spacegrapher/icon-sml.png 
b/probies/spacegrapher/icon-sml.png
new file mode 100644
index 000..bd8519f
Binary files /dev/null and b/probies/spacegrapher/icon-sml.png differ
diff --git a/probies/spacegrapher/id_rsa.pub b/probies/spacegrapher/id_rsa.pub
new file mode 100644
index 000..0d3457c
--- /dev/null
+++ b/probies/spacegrapher/id_rsa.pub
@@ -0,0 +1 @@
+ssh-rsa 
B3NzaC1yc2EDAQABAAABAQC/A43WrqvC8Ykj6c16aypMufbhVAIjymXenq0K9kumu75BDhPRibOhzX2K+b+TloYdHk2mzu3o2M8NxNIxcLBRHNeoNBiGUmRwTot8eWkfMYdEEu55+FoQEHxU/9Lb/boQ/gie3A4WFtjznKY+KOabzC6ap46Kdj/gFmlxE+vg7Kwaod2UprfdYB/N7Q3D1eV3ZpvsSvCIrrS+N91L+L9HBArmogkWCcHUJBGl1jfGvUcoLGfywh1yajcSNuLc7KMlE+gEeV13f6ssOLJOEhiXMyi6eL2MyfeANTPZ2vmbeJyQUmgkwICiJgvlnLz/dGm4AYxiKsXKKOw5rcugXZAt
 dy5@samsung.com
diff --git a/probies/spacegrapher/info.txt b/probies/spacegrapher/info.txt
new file mode 100644
index 000..452ffe0
--- /dev/null
+++ b/probies/spacegrapher/info.txt
@@ -0,0 +1,10 @@
+Login:spacegrapher
+IRC Nick: spacegrapher
+Name: Dongyeon Kim
+Location: Suwon, Korea
+E-Mail:   spiffm...@gmail.com
+WWW:  None
+Contributing: Evas
+Group:Libraries
+Platform: Ubuntu (Linux), Windows 7
+GeoData:  37.258876, 127.056252

-- 




[EGIT] [admin/devs] master 01/01: dev/jpeg: Update info.txt and add avatar picture

2015-03-17 Thread Jean-Philippe Andre
jpeg pushed a commit to branch master.

http://git.enlightenment.org/admin/devs.git/commit/?id=7aa30838d53394833f95b87add8c36d51279f2c8

commit 7aa30838d53394833f95b87add8c36d51279f2c8
Author: Jean-Philippe Andre 
Date:   Wed Mar 18 09:16:25 2015 +0900

dev/jpeg: Update info.txt and add avatar picture
---
 developers/jpeg/icon-big.png | Bin 0 -> 42049 bytes
 developers/jpeg/icon-map.png | Bin 0 -> 1723 bytes
 developers/jpeg/icon-med.png | Bin 0 -> 9301 bytes
 developers/jpeg/icon-sml.png | Bin 0 -> 3030 bytes
 developers/jpeg/info.txt |   8 
 5 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/developers/jpeg/icon-big.png b/developers/jpeg/icon-big.png
new file mode 100644
index 000..640e84b
Binary files /dev/null and b/developers/jpeg/icon-big.png differ
diff --git a/developers/jpeg/icon-map.png b/developers/jpeg/icon-map.png
new file mode 100644
index 000..67e73ec
Binary files /dev/null and b/developers/jpeg/icon-map.png differ
diff --git a/developers/jpeg/icon-med.png b/developers/jpeg/icon-med.png
new file mode 100644
index 000..f659a2f
Binary files /dev/null and b/developers/jpeg/icon-med.png differ
diff --git a/developers/jpeg/icon-sml.png b/developers/jpeg/icon-sml.png
new file mode 100644
index 000..966adca
Binary files /dev/null and b/developers/jpeg/icon-sml.png differ
diff --git a/developers/jpeg/info.txt b/developers/jpeg/info.txt
index 6fc8fb4..1ced519 100644
--- a/developers/jpeg/info.txt
+++ b/developers/jpeg/info.txt
@@ -5,7 +5,7 @@ Name:       Jean-Philippe ANDRE
 Location:  Seoul, Korea
 E-Mail:j...@videolan.org, jp.an...@samsung.com
 WWW:   none
-Managing:  none
-Contributing:  Evas (cserve2)
-Group: Libraries
-Platform:  Ubuntu, Arch (Linux)
+Managing:  evas
+Contributing:  Evas: GL, filters, masking, cserve2
+Group: Core, Libraries
+Platform:  Arch (Linux)

-- 




[EGIT] [tools/expedite] master 01/01: Add arcconfig file

2015-02-11 Thread Jean-Philippe Andre
jpeg pushed a commit to branch master.

http://git.enlightenment.org/tools/expedite.git/commit/?id=accb76125ff60037d215ed4d752426ce69dca553

commit accb76125ff60037d215ed4d752426ce69dca553
Author: Jean-Philippe Andre 
Date:   Wed Feb 11 17:09:00 2015 +0900

Add arcconfig file

Differential Revision: https://phab.enlightenment.org/D1961
---
 .arcconfig | 4 
 1 file changed, 4 insertions(+)

diff --git a/.arcconfig b/.arcconfig
new file mode 100644
index 000..0bddbcc
--- /dev/null
+++ b/.arcconfig
@@ -0,0 +1,4 @@
+{
+  "project_id" : "expedite",
+  "conduit_uri" : "https://phab.enlightenment.org/";
+}

-- 




[EGIT] [editors/vim-configs] master 01/01: EDC: Add some new keywords and LazEDC support

2015-01-14 Thread Jean-Philippe Andre
jpeg pushed a commit to branch master.

http://git.enlightenment.org/editors/vim-configs.git/commit/?id=2e78e1dca9e448c16284a0a8673c5f1d87f43b93

commit 2e78e1dca9e448c16284a0a8673c5f1d87f43b93
Author: Jean-Philippe Andre 
Date:   Thu Jan 15 15:23:24 2015 +0900

EDC: Add some new keywords and LazEDC support

Whitespace changes included, use git show -w
---
 syntax/edc.vim | 45 +
 1 file changed, 29 insertions(+), 16 deletions(-)

diff --git a/syntax/edc.vim b/syntax/edc.vim
index 6d87d70..15790ec 100644
--- a/syntax/edc.vim
+++ b/syntax/edc.vim
@@ -16,11 +16,14 @@ syn keyword edcBlockimages data fonts collections 
group contained
 syn keywordedcBlockpart parts dragable description contained
 syn keywordedcBlocktext font fill origin size image proxy contained
 syn keywordedcBlockprograms program styles style contained
-syn keywordedcBlockgradient spectra spectrum contained
-syn keywordedcBlockcolor_classes color_class rel1 rel2 contained
-syn keywordedcBlockitems item file params externals contained
-syn keywordedcBlockmap rotation perspective script lua_script 
contained
-syn keyword edcBlockset
+syn keywordedcBlockgradient spectra spectrum contained
+syn keywordedcBlockcolor_classes color_class rel1 rel2 contained
+syn keywordedcBlockitems item file params externals contained
+syn keywordedcBlockmap rotation perspective script lua_script 
contained
+syn keywordedcBlockset
+syn keywordedcBlocksequence link contained
+" LazEDC blocks
+syn keywordedcBlockdesc rect swallow textblock box table external 
spacer contained
 
 syn keywordedcLabelitem name alias min max type effect contained
 syn keywordedcLabelmouse_events repeat_events clip_to contained
@@ -32,7 +35,7 @@ syn keyword   edcLabelsource5 source6 multiline 
pointer_mode contained
 syn keywordedcLabelstate visible step aspect fixed middle contained
 syn keywordedcLabelaspect_preference ellipsis elipsis image 
contained
 syn keywordedcLabelrelative offset to to_x to_y contained
-syn keyword edcLabel source_visible source_clip contained
+syn keywordedcLabelsource_visible source_clip contained
 syn keywordedcLabelborder border_scale border_scale_by scale_hint 
color color2 color3 font size contained
 syn keywordedcLabelsignal action transition in filter contained
 syn keywordedcLabeltarget after fit align contained
@@ -46,16 +49,23 @@ syn keyword edcLabelon perspective light 
perspective_on contained
 syn keywordedcLabelbackface_cull alpha center focus zplane focal 
contained
 syn keywordedcLabelint double string external script_only contained
 syn keywordedcLabelinsert_before insert_after contained
+syn keywordedcLabelscript_recursion contained
+syn keywordedcLabellimit broadcast_signal targets target_group 
groups size_range contained
+" LazEDC synonyms
+syn keywordedcLabelbefore after ignore pointer alt_font clip  
contained
 
-syn keywordedcConstant COMP RAW LOSSY NONE ON_HOLD AUTOGRAB NOGRAB
-syn keywordedcConstant TEXT IMAGE RECT TEXTBLOCK SWALLOW GRADIENT GROUP
-syn keywordedcConstant SPACER
-syn keywordedcConstant NONE PLAIN OUTLINE SOFT_OUTLINE SHADOW PROXY
-syn keywordedcConstant SOFT_SHADOW OUTLINE_SHADOW OUTLINE_SOFT_SHADOW
+" LazEDC shorthand
+syn keywordedcLazShort broadcast nobroadcast mouse nomouse repeat 
norepeat precise noprecise noscale vis hid contained
+
+syn keywordedcConstant COMP RAW LOSSY NONE ON_HOLD AUTOGRAB NOGRAB
+syn keywordedcConstant TEXT IMAGE RECT TEXTBLOCK SWALLOW GRADIENT GROUP
+syn keywordedcConstant SPACER
+syn keywordedcConstant NONE PLAIN OUTLINE SOFT_OUTLINE SHADOW PROXY
+syn keywordedcConstant SOFT_SHADOW OUTLINE_SHADOW OUTLINE_SOFT_SHADOW
 syn keywordedcConstant GLOW FAR_SHADOW FAR_SOFT_SHADOW
-syn keyword edcConstant BOTTOM_RIGHT BOTTOM BOTTOM_LEFT LEFT
-syn keyword edcConstant TOP_LEFT TOP TOP_RIGHT RIGHT
-syn keywordedcConstant STATE_SET ACTION_STOP SIGNAL_EMIT FOCUS_SET
+syn keywordedcConstant BOTTOM_RIGHT BOTTOM BOTTOM_LEFT LEFT
+syn keywordedcConstant TOP_LEFT TOP TOP_RIGHT RIGHT
+syn keywordedcConstant STATE_SET ACTION_STOP SIGNAL_EMIT FOCUS_SET
 syn keywordedcConstant DRAG_VAL_SET DRAG_VAL_STEP DRAG_VAL_PAGE
 syn keywordedcConstant LINEAR SINUSOIDAL ACCELERATE DECELERATE
 syn keywordedcConstant LIN DECEL DIVIS BOUNCE SPRING CURRENT
@@ -63,12 +73,14 @@ syn keyword edcConstant ACCEL_FAC DECEL_FAC SIN_FAC 
DIVISOR_INTERP
 syn keywordedcConstant ACCELERATE_FACTOR DECELERATE_FACTOR
 syn keyword

[EGIT] [tools/expedite] master 02/02: Fix support of --count from command line

2014-10-21 Thread Jean-Philippe Andre
jpeg pushed a commit to branch master.

http://git.enlightenment.org/tools/expedite.git/commit/?id=0a40a870395f6d181767dabadce753224376f89a

commit 0a40a870395f6d181767dabadce753224376f89a
Author: Jean-Philippe Andre 
Date:   Wed Oct 22 15:49:25 2014 +0900

Fix support of --count from command line

expedite would never exit after N loops
---
 src/bin/main.c | 2 ++
 src/bin/main.h | 1 +
 src/bin/ui.c   | 3 ++-
 3 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/bin/main.c b/src/bin/main.c
index 77e192e..0f4b777 100644
--- a/src/bin/main.c
+++ b/src/bin/main.c
@@ -9,6 +9,7 @@ const char *profile = "n800";
 const char *choosen_engine = NULL;
 int win_w = 720, win_h = 420;
 int loops = LOOPS;
+int one_test = 0;
 Eina_Bool fullscreen = EINA_FALSE;
 Eina_Bool cmp_report = EINA_FALSE;
 
@@ -1326,6 +1327,7 @@ main(int argc, char **argv)
  }
else if (test > 0)
  {
+one_test = 1;
 ui_num(test);
  }
 
diff --git a/src/bin/main.h b/src/bin/main.h
index 5a861eb..4f373b5 100644
--- a/src/bin/main.h
+++ b/src/bin/main.h
@@ -47,6 +47,7 @@ extern "C"
 extern Evas *evas;
 extern int   win_w, win_h;
 extern int   loops;
+extern int   one_test;
 extern const char *choosen_engine;
 extern Eina_Bool fullscreen;
 extern Eina_Bool cmp_report;
diff --git a/src/bin/ui.c b/src/bin/ui.c
index 243ab11..147075d 100644
--- a/src/bin/ui.c
+++ b/src/bin/ui.c
@@ -504,6 +504,7 @@ ui_num(int n)
 if (!mi->test)
   return;
 menu_sel = n;
+if (one_test) test_item = menu_sel;
 _ui_select();
  }
 }
@@ -714,7 +715,7 @@ ui_fps(double fps)
 
 test_item++;
 mi = eina_list_nth(menu, test_item);
-if (!mi->test)
+if (one_test || !mi->test)
   {
  char datestr[1024];
  struct tm *tim;

-- 




[EGIT] [tools/expedite] master 01/02: UI main loop: Fix indentation

2014-10-21 Thread Jean-Philippe Andre
jpeg pushed a commit to branch master.

http://git.enlightenment.org/tools/expedite.git/commit/?id=0774f2ceeb51ebe1f7f723f48e13adb94009aea7

commit 0774f2ceeb51ebe1f7f723f48e13adb94009aea7
Author: Jean-Philippe Andre 
Date:   Wed Oct 22 15:18:53 2014 +0900

UI main loop: Fix indentation
---
 src/bin/ui.c | 46 +++---
 1 file changed, 23 insertions(+), 23 deletions(-)

diff --git a/src/bin/ui.c b/src/bin/ui.c
index 9f2402b..243ab11 100644
--- a/src/bin/ui.c
+++ b/src/bin/ui.c
@@ -756,29 +756,29 @@ ui_fps(double fps)
   loops,
   choosen_engine,
   fullscreen);
-else
-  printf("\n#Test Result#\n"
- "evas fps speed: %5.2f\n"
- "evas fps speed(weighted): %5.2f\n"
- "testcase count: %i\n"
- "date: %s\n"
- "evas version: %i.%i.%i.%i\n"
- "profile: %s\n"
- "window size: %i, %i\n"
- "loop count: %i\n"
- "engine: %s\n"
- "full screen: %i\n",
- (fps / t_count),
- (wfps / avgw) / t_count,
- t_count,
- datestr,
- evas_version->major, evas_version->minor, evas_version->micro,
- evas_version->revision,
- profile,
- win_w, win_h,
- loops,
- choosen_engine,
- fullscreen);
+ else
+   printf("\n#Test Result#\n"
+  "evas fps speed: %5.2f\n"
+  "evas fps speed(weighted): %5.2f\n"
+  "testcase count: %i\n"
+  "date: %s\n"
+  "evas version: %i.%i.%i.%i\n"
+  "profile: %s\n"
+  "window size: %i, %i\n"
+  "loop count: %i\n"
+  "engine: %s\n"
+  "full screen: %i\n",
+  (fps / t_count),
+  (wfps / avgw) / t_count,
+  t_count,
+  datestr,
+  evas_version->major, evas_version->minor, 
evas_version->micro,
+  evas_version->revision,
+  profile,
+  win_w, win_h,
+  loops,
+  choosen_engine,
+  fullscreen);
 
  ecore_main_loop_quit();
   }

-- 




[EGIT] [core/elementary] master 01/01: elm_cnp: Break after we found the target we were looking for

2014-07-08 Thread Jean-Philippe Andre
jpeg pushed a commit to branch master.

http://git.enlightenment.org/core/elementary.git/commit/?id=6805e484a2c95ec2ec3cbd18fd859d278e0705e4

commit 6805e484a2c95ec2ec3cbd18fd859d278e0705e4
Author: Jean-Philippe Andre 
Date:   Mon Jun 30 11:50:56 2014 +0900

elm_cnp: Break after we found the target we were looking for

Basic optimization of the search.
---
 src/lib/elm_cnp.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/lib/elm_cnp.c b/src/lib/elm_cnp.c
index a9028f4..2ce7e3e 100644
--- a/src/lib/elm_cnp.c
+++ b/src/lib/elm_cnp.c
@@ -632,6 +632,7 @@ _x11_selection_notify(void *udata EINA_UNUSED, int type 
EINA_UNUSED, void *event
   _x11_atoms[i].notify(sel, ev);
}
  else cnp_debug("Ignored: No handler!\n");
+ break;
   }
  }
return ECORE_CALLBACK_PASS_ON;

-- 




[EGIT] [core/elementary] master 01/01: Win32: Fix some compilation warnings

2014-06-10 Thread Jean-Philippe Andre
jpeg pushed a commit to branch master.

http://git.enlightenment.org/core/elementary.git/commit/?id=0be8fbac975e6dc30e488ef9ada7bcb636153df7

commit 0be8fbac975e6dc30e488ef9ada7bcb636153df7
Author: Jean-Philippe Andre 
Date:   Wed Jun 11 14:04:48 2014 +0900

Win32: Fix some compilation warnings

Reported by vtorri, thanks
---
 src/bin/test_genlist.c   | 2 +-
 src/lib/elm_main.c   | 1 +
 src/lib/elm_prefs_data.c | 4 +++-
 src/modules/prefs/elm_datetime.c | 5 +++--
 src/modules/prefs/elm_entry.c| 2 +-
 5 files changed, 9 insertions(+), 5 deletions(-)

diff --git a/src/bin/test_genlist.c b/src/bin/test_genlist.c
index d629356..c366a96 100644
--- a/src/bin/test_genlist.c
+++ b/src/bin/test_genlist.c
@@ -3262,7 +3262,7 @@ _genlist_renew(Evas_Object *obj, const char *style)
 
for (i = 0; i < 50; i++)
  {
-elm_genlist_item_append(obj, ic, (void *)(long)i, NULL,
+elm_genlist_item_append(obj, ic, (void *)(uintptr_t)i, NULL,
 ELM_GENLIST_ITEM_NONE, NULL, NULL);
  }
elm_genlist_item_class_free(ic);
diff --git a/src/lib/elm_main.c b/src/lib/elm_main.c
index 341ae6a..16b60e3 100644
--- a/src/lib/elm_main.c
+++ b/src/lib/elm_main.c
@@ -891,6 +891,7 @@ elm_quicklaunch_prepare(intargc,
 #else
(void)argc;
(void)argv;
+   (void)cwd;
return EINA_FALSE;
 #endif
 }
diff --git a/src/lib/elm_prefs_data.c b/src/lib/elm_prefs_data.c
index 88d4900..2789db9 100644
--- a/src/lib/elm_prefs_data.c
+++ b/src/lib/elm_prefs_data.c
@@ -464,7 +464,9 @@ _eet_data_save(const Elm_Prefs_Data *prefs_data,
 
  if (eina_value_get(&(item->value), &val))
{
-  tm = gmtime(&(val.tv_sec));
+  time_t gmt = val.tv_sec;
+
+  tm = gmtime(&gmt);
 
   it->value.d.y = tm->tm_year + 1900;
   it->value.d.m = tm->tm_mon + 1;
diff --git a/src/modules/prefs/elm_datetime.c b/src/modules/prefs/elm_datetime.c
index 10cd219..72c9f79 100644
--- a/src/modules/prefs/elm_datetime.c
+++ b/src/modules/prefs/elm_datetime.c
@@ -55,13 +55,14 @@ elm_prefs_datetime_value_set(Evas_Object *obj,
 {
struct timeval val;
struct tm *t;
+   time_t gmt;
 
if (eina_value_type_get(value) != EINA_VALUE_TYPE_TIMEVAL)
  return EINA_FALSE;
 
eina_value_get(value, &val);
-
-   t = gmtime(&(val.tv_sec));
+   gmt = val.tv_sec;
+   t = gmtime(&gmt);
 
if (elm_datetime_value_set(obj, t)) return EINA_TRUE;
 
diff --git a/src/modules/prefs/elm_entry.c b/src/modules/prefs/elm_entry.c
index 6bbf9f8..e6cf68f 100644
--- a/src/modules/prefs/elm_entry.c
+++ b/src/modules/prefs/elm_entry.c
@@ -17,7 +17,7 @@ _color_change_do(void *data)
Evas_Object *obj = data;
int color;
 
-   color = (int)(long)evas_object_data_get(obj, "current_color");
+   color = (int)(uintptr_t)evas_object_data_get(obj, "current_color");
switch (color)
  {
   case 0:

-- 




[EGIT] [core/elementary] elementary-1.9 01/01: elm_test: Set PACKAGE_LIB_DIR to fix windows runtime

2014-05-20 Thread Jean-Philippe Andre
jpeg pushed a commit to branch elementary-1.9.

http://git.enlightenment.org/core/elementary.git/commit/?id=cc459126203c64fc8a567eb8c32a5578d38c1067

commit cc459126203c64fc8a567eb8c32a5578d38c1067
Author: Jean-Philippe Andre 
Date:   Tue May 20 12:27:29 2014 +0900

elm_test: Set PACKAGE_LIB_DIR to fix windows runtime
---
 src/bin/test.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/bin/test.c b/src/bin/test.c
index bfd0294..f07eebc 100644
--- a/src/bin/test.c
+++ b/src/bin/test.c
@@ -882,6 +882,7 @@ elm_main(int argc, char **argv)
 
/* tell elm about our app so it can figure out where to get files */
elm_app_compile_bin_dir_set(PACKAGE_BIN_DIR);
+   elm_app_compile_lib_dir_set(PACKAGE_LIB_DIR);
elm_app_compile_data_dir_set(PACKAGE_DATA_DIR);
elm_app_info_set(elm_main, "elementary", "images/logo.png");
 

-- 




[EGIT] [core/elementary] master 01/01: elm_test: Set PACKAGE_LIB_DIR to fix windows runtime

2014-05-20 Thread Jean-Philippe Andre
jpeg pushed a commit to branch master.

http://git.enlightenment.org/core/elementary.git/commit/?id=e54cf0872417755fb27e2ff332a08973046ab4b1

commit e54cf0872417755fb27e2ff332a08973046ab4b1
Author: Jean-Philippe Andre 
Date:   Tue May 20 12:27:29 2014 +0900

elm_test: Set PACKAGE_LIB_DIR to fix windows runtime
---
 src/bin/test.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/bin/test.c b/src/bin/test.c
index 268f739..9ff36fd 100644
--- a/src/bin/test.c
+++ b/src/bin/test.c
@@ -890,6 +890,7 @@ elm_main(int argc, char **argv)
 
/* tell elm about our app so it can figure out where to get files */
elm_app_compile_bin_dir_set(PACKAGE_BIN_DIR);
+   elm_app_compile_lib_dir_set(PACKAGE_LIB_DIR);
elm_app_compile_data_dir_set(PACKAGE_DATA_DIR);
elm_app_info_set(elm_main, "elementary", "images/logo.png");
 

-- 




[EGIT] [core/elementary] master 01/01: elm_cnp: Fix build for windows (ecore_x)

2014-05-19 Thread Jean-Philippe Andre
jpeg pushed a commit to branch master.

http://git.enlightenment.org/core/elementary.git/commit/?id=60c0a8d9c9e82445c319cee5e775eaeba151befe

commit 60c0a8d9c9e82445c319cee5e775eaeba151befe
Author: Jean-Philippe Andre 
Date:   Tue May 20 11:32:19 2014 +0900

elm_cnp: Fix build for windows (ecore_x)
---
 src/lib/elm_cnp.c | 6 --
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/lib/elm_cnp.c b/src/lib/elm_cnp.c
index 2d5f4b9..7c02611 100644
--- a/src/lib/elm_cnp.c
+++ b/src/lib/elm_cnp.c
@@ -181,15 +181,19 @@ static Eina_List *cont_drag_tg = NULL; /* List of 
Item_Container_Drag_Info */
 static void _cont_obj_mouse_up( void *data, Evas *e, Evas_Object *obj, void 
*event_info);
 static void _cont_obj_mouse_move( void *data, Evas *e, Evas_Object *obj, void 
*event_info);
 static void _all_drop_targets_cbs_del(void *data, Evas *e, Evas_Object *obj, 
void *info);
+#ifdef HAVE_ELEMENTARY_X
 static Ecore_X_Window _x11_elm_widget_xwin_get(const Evas_Object *obj);
+#endif
 
 static Eina_Bool
 _drag_cancel_animate(void *data EINA_UNUSED, double pos)
 {  /* Animation to "move back" drag-window */
if (pos >= 0.99)
  {
+#ifdef HAVE_ELEMENTARY_X
 Ecore_X_Window xdragwin = _x11_elm_widget_xwin_get(data);
 ecore_x_window_ignore_set(xdragwin, 0);
+#endif
 evas_object_del(data);
 return ECORE_CALLBACK_CANCEL;
  }
@@ -304,8 +308,6 @@ static Eina_Bool  _x11_dnd_leave(void 
*data EINA_UNUSED, int
 static Eina_Bool  _x11_drag_mouse_up(void *data, int etype 
EINA_UNUSED, void *event);
 static void   _x11_drag_move(void *data EINA_UNUSED, 
Ecore_X_Xdnd_Position *pos);
 
-static Ecore_X_Window _x11_elm_widget_xwin_get   (const Evas_Object 
*obj);
-
 static Eina_Bool _x11_elm_cnp_init   (void);
 static Eina_Bool _x11_elm_cnp_selection_set  (Ecore_X_Window xwin, 
Evas_Object *obj, Elm_Sel_Type selection, Elm_Sel_Format format, const void 
*selbuf, size_t buflen);
 static void  _x11_elm_cnp_selection_loss_callback_set(Evas_Object *obj 
EINA_UNUSED, Elm_Sel_Type selection, Elm_Selection_Loss_Cb func, const void 
*data);

-- 




[EGIT] [core/elementary] master 01/01: edc: Fix multibuttonentry alignments

2014-05-13 Thread Jean-Philippe Andre
jpeg pushed a commit to branch master.

http://git.enlightenment.org/core/elementary.git/commit/?id=3590c5b6c3b06dfdec20c5bcbe5c79263a00a58c

commit 3590c5b6c3b06dfdec20c5bcbe5c79263a00a58c
Author: Jean-Philippe Andre 
Date:   Wed May 14 15:29:02 2014 +0900

edc: Fix multibuttonentry alignments

Following the edc padding behaviour change
---
 data/themes/edc/elm/multibuttonentry.edc | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/data/themes/edc/elm/multibuttonentry.edc 
b/data/themes/edc/elm/multibuttonentry.edc
index 5ea8428..26df93f 100644
--- a/data/themes/edc/elm/multibuttonentry.edc
+++ b/data/themes/edc/elm/multibuttonentry.edc
@@ -24,7 +24,7 @@ group { name: "elm/multibuttonentry/label/default";
text_class: "multibuttonentry_label";
 }
 rel1.offset: 2 2;
-rel2.offset: -3 -3;
+rel2.offset: -3 -5;
  }
  description { state: "no_text" 0.0;
 inherit: "default" 0.0;
@@ -56,7 +56,7 @@ group { name: "elm/multibuttonentry/guidetext/default";
  effect: SHADOW BOTTOM;
  description { state: "default" 0.0;
 rel1.offset: 2 2;
-rel2.offset: -3 -3;
+rel2.offset: -3 -4;
 color: FN_COL_DISABLE;
 text { font: FNBD; size: 10;
min: 0 1;

-- 




[EGIT] [core/elementary] master 02/02: edc: Also fix frame and button offsets

2014-05-13 Thread Jean-Philippe Andre
jpeg pushed a commit to branch master.

http://git.enlightenment.org/core/elementary.git/commit/?id=e87009eac79694a9b7e9403b0e662cb2d14c2f2e

commit e87009eac79694a9b7e9403b0e662cb2d14c2f2e
Author: Jean-Philippe Andre 
Date:   Tue May 13 17:54:03 2014 +0900

edc: Also fix frame and button offsets

Since SHADOW adds one pixel padding, the whole object size
was calculated with one extra pixel. Let's add it back
to keep the overall visual balance of buttons.

A few other widgets might visually change after the edje
padding fix:

- Check (looks better)
- Naviframe (smaller height)
- E date widget
- ...

But I did not see anything "weird" that needs fixing.
---
 data/themes/edc/elm/button.edc | 6 +++---
 data/themes/edc/elm/frame.edc  | 6 +++---
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/data/themes/edc/elm/button.edc b/data/themes/edc/elm/button.edc
index 568d5c5..96adc8c 100644
--- a/data/themes/edc/elm/button.edc
+++ b/data/themes/edc/elm/button.edc
@@ -153,7 +153,7 @@ group { name: "elm/button/base/default";
 rel1.relative: 1.0 0.0;
 rel1.to_x: "elm.swallow.content";
 rel1.to_y: "base";
-rel2.offset: -7 -7;
+rel2.offset: -7 -8;
 rel2.to: "base";
 color_class: "button_text";
 color3: 255 255 255 255;
@@ -806,7 +806,7 @@ group { name: "elm/button/base/hoversel_vertical/default";
 rel1.to_y: "base";
 rel2.to_y: "base";
 rel2.to_x: "select_line";
-rel2.offset: -2 -7;
+rel2.offset: -2 -8;
 rel2.relative: 0.0 1.0;
 text.text_class: "hoversel";
 text.ellipsis: -1;
@@ -1059,7 +1059,7 @@ group { name: 
"elm/button/base/hoversel_vertical_entry/default";
 rel1.relative: 1.0 0.0;
 rel1.to_x: "elm.swallow.content";
 rel1.to_y: "base";
-rel2.offset: -7 -7;
+rel2.offset: -7 -8;
 rel2.to: "base";
 color_class: "hoversel_text";
 color3: 255 255 255 255;
diff --git a/data/themes/edc/elm/frame.edc b/data/themes/edc/elm/frame.edc
index bc29811..e2e8aa1 100644
--- a/data/themes/edc/elm/frame.edc
+++ b/data/themes/edc/elm/frame.edc
@@ -66,7 +66,7 @@ group { name: "elm/frame/base/default";
 rel1.offset: 1 2;
 rel1.to_x: "edge1";
 rel2.relative: 0.0 0.0;
-rel2.offset: -2 2;
+rel2.offset: -2 1;
 rel2.to_x: "edge2";
 align: 0.0 0.0;
 color: FN_COL_DISABLE;
@@ -83,7 +83,7 @@ group { name: "elm/frame/base/default";
 rel1.relative: 0.0 1.0;
 rel1.offset: 5 0;
 rel1.to_y: "elm.text";
-rel2.offset: -6 -6;
+rel2.offset: -6 -7;
  }
   }
   part { name: "elm.swallow.content"; type: SWALLOW;
@@ -93,7 +93,7 @@ group { name: "elm/frame/base/default";
 rel1.relative: 0.0 1.0;
 rel1.offset: 5 0;
 rel1.to_y: "elm.text";
-rel2.offset: -6 -6;
+rel2.offset: -6 -7;
  }
  description { state: "collapsed" 0.0;
 inherit: "default" 0.0;

-- 




[EGIT] [core/elementary] master 01/02: edc: Fix E titlebars after text padding changes

2014-05-13 Thread Jean-Philippe Andre
jpeg pushed a commit to branch master.

http://git.enlightenment.org/core/elementary.git/commit/?id=bb2b204ae77c534ac90dd215446c9d1056240574

commit bb2b204ae77c534ac90dd215446c9d1056240574
Author: Jean-Philippe Andre 
Date:   Tue May 13 16:12:22 2014 +0900

edc: Fix E titlebars after text padding changes

See EFL 5bf1f0c9187525cf40782b26d7fa49d2676f91bb:

  edje_calc: Don't add padding twice to text objects

  Text objects declared in Edje will see their padding added twice,
  as the Evas_Object_Text itself contains the padding already.

  This WILL break some EDC files. It's a bug nonetheless.
---
 data/themes/edc/border.edc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/data/themes/edc/border.edc b/data/themes/edc/border.edc
index 838f419..5d0ca5e 100644
--- a/data/themes/edc/border.edc
+++ b/data/themes/edc/border.edc
@@ -81,7 +81,7 @@ group { name: "e/widgets/border/default/border";
  description { state: "default" 0.0;
 image.normal: "vgrad_med_lighter.png";
 rel2.to_y: "title2";
-rel2.offset: -1 -4;
+rel2.offset: -1 0;
 fill.smooth: 0;
 TILED_HORIZ(120)
 color_class: "border_frame";

-- 




[EGIT] [core/elementary] master 01/01: test_dnd: Fix build for windows

2014-05-12 Thread Jean-Philippe Andre
jpeg pushed a commit to branch master.

http://git.enlightenment.org/core/elementary.git/commit/?id=ee7ad21b3bd2eb131a07abbcadd7cd249c175d1d

commit ee7ad21b3bd2eb131a07abbcadd7cd249c175d1d
Author: Jean-Philippe Andre 
Date:   Mon May 12 18:52:24 2014 +0900

test_dnd: Fix build for windows

There is no strndup (with our compilation flags).
---
 src/bin/test_dnd.c | 25 -
 1 file changed, 20 insertions(+), 5 deletions(-)

diff --git a/src/bin/test_dnd.c b/src/bin/test_dnd.c
index 9b5c0fb..d799a04 100644
--- a/src/bin/test_dnd.c
+++ b/src/bin/test_dnd.c
@@ -203,6 +203,21 @@ _grid_item_getcb(Evas_Object *obj, Evas_Coord x, 
Evas_Coord y, int *xposret, int
return item;
 }
 
+static inline char *
+_strndup(const char *str, size_t len)
+{
+   size_t slen = strlen(str);
+   char *ret;
+
+   if (slen > len) slen = len;
+   ret = malloc (slen + 1);
+   if (!ret) return NULL;
+
+   if (slen > 0) memcpy(ret, str, slen);
+   ret[slen] = '\0';
+   return ret;
+}
+
 static Eina_Bool
 _gl_dropcb(void *data EINA_UNUSED, Evas_Object *obj, Elm_Object_Item *it, 
Elm_Selection_Data *ev, int xposret EINA_UNUSED, int yposret)
 {  /* This function is called when data is dropped on the genlist */
@@ -212,7 +227,7 @@ _gl_dropcb(void *data EINA_UNUSED, Evas_Object *obj, 
Elm_Object_Item *it, Elm_Se
if (ev->len <= 0)
  return EINA_FALSE;
 
-   char *dd = strndup(ev->data, ev->len);
+   char *dd = _strndup(ev->data, ev->len);
if (!dd) return EINA_FALSE;
char *p = dd;
 
@@ -267,7 +282,7 @@ _grid_dropcb(void *data EINA_UNUSED, Evas_Object *obj, 
Elm_Object_Item *it, Elm_
if (ev->len <= 0)
  return EINA_FALSE;
 
-   char *dd = strndup(ev->data, ev->len);
+   char *dd = _strndup(ev->data, ev->len);
if (!dd) return EINA_FALSE;
char *p = dd;
char *s = _drag_data_extract(&p);
@@ -962,7 +977,7 @@ static Eina_Bool _drop_box_button_new_cb(void *data, 
Evas_Object *obj, Elm_Selec
if (ev->len <= 0)
  return EINA_FALSE;
 
-   char *dd = strndup(ev->data, ev->len);
+   char *dd = _strndup(ev->data, ev->len);
if (!dd) return EINA_FALSE;
char *p = dd;
char *s = _drag_data_extract(&p);
@@ -996,7 +1011,7 @@ static Eina_Bool _drop_but_icon_change_cb(void *data, 
Evas_Object *obj, Elm_Sele
if (ev->len <= 0)
  return EINA_FALSE;
 
-   char *dd = strndup(ev->data, ev->len);
+   char *dd = _strndup(ev->data, ev->len);
if (!dd) return EINA_FALSE;
char *p = dd;
char *s = _drag_data_extract(&p);
@@ -1024,7 +1039,7 @@ static Eina_Bool _drop_bg_change_cb(void *data 
EINA_UNUSED, Evas_Object *obj, El
if (ev->len <= 0)
  return EINA_FALSE;
 
-   char *dd = strndup(ev->data, ev->len);
+   char *dd = _strndup(ev->data, ev->len);
if (!dd) return EINA_FALSE;
char *p = dd;
char *s = _drag_data_extract(&p);

-- 




[EGIT] [core/elementary] master 01/01: elm_map: Fix compilation warning/error

2014-05-11 Thread Jean-Philippe Andre
jpeg pushed a commit to branch master.

http://git.enlightenment.org/core/elementary.git/commit/?id=634d309d8592eb85a3b0616f3462c89fd9350a86

commit 634d309d8592eb85a3b0616f3462c89fd9350a86
Author: Jean-Philippe Andre 
Date:   Mon May 12 15:44:18 2014 +0900

elm_map: Fix compilation warning/error

ELM_WIDGET_DATA_GET_OR_RETURN can take a VA_ARGS if the function
should return something.
---
 src/lib/elm_map.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/lib/elm_map.c b/src/lib/elm_map.c
index abdc95e..5b32b55 100644
--- a/src/lib/elm_map.c
+++ b/src/lib/elm_map.c
@@ -3806,7 +3806,7 @@ _elm_map_pan_class_constructor(Eo_Class *klass)
 EOLIAN static Eina_Bool
 _elm_map_elm_widget_theme_apply(Eo *obj, Elm_Map_Data *sd EINA_UNUSED)
 {
-   ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd);
+   ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd, EINA_FALSE);
Eina_Bool int_ret = EINA_FALSE;
eo_do_super(obj, MY_CLASS, int_ret = elm_obj_widget_theme_apply());
if (!int_ret) return EINA_FALSE;

-- 




[EGIT] [apps/terminology] master 01/01: Compilation: Align EDJ to CC

2014-05-11 Thread Jean-Philippe Andre
jpeg pushed a commit to branch master.

http://git.enlightenment.org/apps/terminology.git/commit/?id=66a517be2fc177698d801acdc7ffec159faec560

commit 66a517be2fc177698d801acdc7ffec159faec560
Author: Jean-Philippe Andre 
Date:   Mon May 12 15:08:36 2014 +0900

Compilation: Align EDJ to CC
---
 data/themes/Makefile.am   | 2 +-
 data/themes/nyanology/Makefile.am | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/data/themes/Makefile.am b/data/themes/Makefile.am
index 5323e40..7c88b44 100644
--- a/data/themes/Makefile.am
+++ b/data/themes/Makefile.am
@@ -20,7 +20,7 @@ base16_ocean_dark.edj
 
 AM_V_EDJ = $(am__v_EDJ_$(V))
 am__v_EDJ_ = $(am__v_EDJ_$(AM_DEFAULT_VERBOSITY))
-am__v_EDJ_0 = @echo "  EDJ   " $@;
+am__v_EDJ_0 = @echo "  EDJ " $@;
 
 EXTRA_DIST = \
 default.edc \
diff --git a/data/themes/nyanology/Makefile.am 
b/data/themes/nyanology/Makefile.am
index aae8fce..ef8b091 100644
--- a/data/themes/nyanology/Makefile.am
+++ b/data/themes/nyanology/Makefile.am
@@ -14,7 +14,7 @@ nyanology.edj
 
 AM_V_EDJ = $(am__v_EDJ_$(V))
 am__v_EDJ_ = $(am__v_EDJ_$(AM_DEFAULT_VERBOSITY))
-am__v_EDJ_0 = @echo "  EDJ   " $@;
+am__v_EDJ_0 = @echo "  EDJ " $@;
 
 EXTRA_DIST = \
 nyanology.edc

-- 




[EGIT] [core/elementary] master 01/01: Compilation: Align EDJ, EOLIAN and EPB to CC

2014-05-11 Thread Jean-Philippe Andre
jpeg pushed a commit to branch master.

http://git.enlightenment.org/core/elementary.git/commit/?id=71d9556e2334c56d4e1be2051f9e3ded570e4f48

commit 71d9556e2334c56d4e1be2051f9e3ded570e4f48
Author: Jean-Philippe Andre 
Date:   Mon May 12 15:09:03 2014 +0900

Compilation: Align EDJ, EOLIAN and EPB to CC
---
 Makefile_Elm_Helpers.am   | 4 ++--
 Makefile_Eolian_Helper.am | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/Makefile_Elm_Helpers.am b/Makefile_Elm_Helpers.am
index f26ceb7..9ca1822 100644
--- a/Makefile_Elm_Helpers.am
+++ b/Makefile_Elm_Helpers.am
@@ -6,7 +6,7 @@ endif
 
 AM_V_EPB = $(am__v_EPB_@AM_V@)
 am__v_EPB_ = $(am__v_EPB_@AM_DEFAULT_V@)
-am__v_EPB_0 = @echo "  EPB   " $@;
+am__v_EPB_0 = @echo "  EPB " $@;
 
 EDJE_CC = @edje_cc@
 EDJE_CC_FLAGS_VERBOSE = $(EDJE_CC_FLAGS_VERBOSE_@AM_V@)
@@ -16,4 +16,4 @@ EDJE_CC_FLAGS = $(EDJE_CC_FLAGS_VERBOSE) -fastdecomp -id 
$(srcdir) -fd $(srcdir)
 
 AM_V_EDJ = $(am__v_EDJ_@AM_V@)
 am__v_EDJ_ = $(am__v_EDJ_@AM_DEFAULT_V@)
-am__v_EDJ_0 = @echo "  EDJ   " $@;
+am__v_EDJ_0 = @echo "  EDJ " $@;
diff --git a/Makefile_Eolian_Helper.am b/Makefile_Eolian_Helper.am
index fed2e66..168f659 100644
--- a/Makefile_Eolian_Helper.am
+++ b/Makefile_Eolian_Helper.am
@@ -8,7 +8,7 @@ endif
 
 AM_V_EOL = $(am__v_EOL_@AM_V@)
 am__v_EOL_ = $(am__v_EOL_@AM_DEFAULT_V@)
-am__v_EOL_0 = @echo "  EOLIAN   " $@;
+am__v_EOL_0 = @echo "  EOLIAN  " $@;
 
 SUFFIXES = .eo .eo.c .eo.h .eo.legacy.h
 

-- 




[EGIT] [core/elementary] master 01/01: Makefile: Add @EVIL_LIBS@ for access_output

2014-04-10 Thread Jean-Philippe Andre
jpeg pushed a commit to branch master.

http://git.enlightenment.org/core/elementary.git/commit/?id=1314261f59cd8265414a1918ab71ec9fdf2df8b8

commit 1314261f59cd8265414a1918ab71ec9fdf2df8b8
Author: Jean-Philippe Andre 
Date:   Thu Apr 10 16:07:05 2014 +0900

Makefile: Add @EVIL_LIBS@ for access_output

Thanks Adrien for the report and fix.
---
 src/modules/access_output/Makefile.am | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/modules/access_output/Makefile.am 
b/src/modules/access_output/Makefile.am
index fd3b2c2..bb88b81 100644
--- a/src/modules/access_output/Makefile.am
+++ b/src/modules/access_output/Makefile.am
@@ -31,6 +31,6 @@ pkg_LTLIBRARIES = module.la
 
 module_la_SOURCES = mod.c
 
-module_la_LIBADD = @ELEMENTARY_LIBS@ $(top_builddir)/src/lib/libelementary.la
+module_la_LIBADD = @ELEMENTARY_LIBS@ $(top_builddir)/src/lib/libelementary.la 
@EVIL_LIBS@
 module_la_LDFLAGS = -module @EFL_LTMODULE_FLAGS@
 module_la_LIBTOOLFLAGS = --tag=disable-static

-- 




[EGIT] [tools/expedite] master 02/02: Fix previous commit's API usage and improve layout

2014-03-24 Thread Jean-Philippe Andre
jpeg pushed a commit to branch master.

http://git.enlightenment.org/tools/expedite.git/commit/?id=26ba629f0028dbde90bdbb9dc581aa0005a90bd5

commit 26ba629f0028dbde90bdbb9dc581aa0005a90bd5
Author: Jean-Philippe Andre 
Date:   Tue Mar 25 11:54:04 2014 +0900

Fix previous commit's API usage and improve layout

Font effects now have "padding_set" which will fix the geometry
of the text object. Thanks to Jaeun for preparing this work :)
---
 src/bin/font_effect_blur_alpha.c | 23 +--
 src/bin/font_effect_blur_color.c | 15 +++
 2 files changed, 20 insertions(+), 18 deletions(-)

diff --git a/src/bin/font_effect_blur_alpha.c b/src/bin/font_effect_blur_alpha.c
index 4b5f49d..8f812c9 100644
--- a/src/bin/font_effect_blur_alpha.c
+++ b/src/bin/font_effect_blur_alpha.c
@@ -16,29 +16,25 @@
 
 /* standard var */
 static int done = 0;
+extern int win_w, win_h;
 /* private data */
-static Evas_Object *bg;
 static Evas_Object *text;
-
-extern int win_w, win_h;
-
+static const int MAX_BLUR = 100;
 
 /* setup */
 static void _setup(void)
 {
 
Evas_Object *o;
-   o = evas_object_rectangle_add(evas);
-   evas_object_color_set(o, 0, 0, 0, 255);
-   evas_object_resize(o, win_w, win_h);
-   evas_object_show(o);
-   bg = o;
+   int w,h;
 
o = evas_object_text_add(evas);
evas_object_color_set(o, 0, 0, 0, 255);
evas_object_text_font_set(o, "Vera-Bold", 80);
evas_object_text_text_set(o, "Font Effect");
evas_object_show(o);
+   evas_object_geometry_get(o, NULL, NULL, &w, &h);
+   evas_object_move(o, (win_w / 2) - (w / 2) - MAX_BLUR, (win_h / 2) - (h / 2) 
- MAX_BLUR);
text = o;
 
done = 0;
@@ -47,17 +43,16 @@ static void _setup(void)
 /* cleanup */
 static void _cleanup(void)
 {
-   evas_object_del(bg);
evas_object_del(text);
 }
 
 /* loop - do things */
 static void _loop(double t, int f)
 {
-   char buf[128];
-   char *str = "blur(%d);";
-   sprintf(buf, str, ((f % 50) + 1));
-   evas_object_text_filter_program_set(text, buf);
+   char buf[256];
+   char *str = "padding_set(%d);blur(%d,color=black);";
+   sprintf(buf, str, MAX_BLUR, ((f % MAX_BLUR) + 1));
+   eo_do(text, evas_obj_text_filter_program_set(buf));
 
FPS_STD(NAME);
 }
diff --git a/src/bin/font_effect_blur_color.c b/src/bin/font_effect_blur_color.c
index d3c5cca..875f440 100644
--- a/src/bin/font_effect_blur_color.c
+++ b/src/bin/font_effect_blur_color.c
@@ -19,17 +19,24 @@ static int done = 0;
 /* private data */
 static Evas_Object *text;
 
+extern int win_w, win_h;
+static const int MAX_BLUR = 100;
+
 
 /* setup */
 static void _setup(void)
 {
 
Evas_Object *o;
+   int w, h;
+
o = evas_object_text_add(evas);
evas_object_color_set(o, 0, 0, 0, 255);
evas_object_text_font_set(o, "Vera-Bold", 80);
evas_object_text_text_set(o, "Font Effect");
evas_object_show(o);
+   evas_object_geometry_get(o, NULL, NULL, &w, &h);
+   evas_object_move(o, (win_w / 2) - (w / 2) - MAX_BLUR, (win_h / 2) - (h / 2) 
- MAX_BLUR);
text = o;
 
done = 0;
@@ -44,10 +51,10 @@ static void _cleanup(void)
 /* loop - do things */
 static void _loop(double t, int f)
 {
-   char buf[128];
-   char *str = "buffer:a(rgba);blend(dst=a, color=blue);blur(%d, src=a);";
-   sprintf(buf, str, ((f % 50) + 1));
-   evas_object_text_filter_program_set(text, buf);
+   char buf[256];
+   char *str = 
"buffer:a(rgba);padding_set(%d);blend(dst=a,color=darkblue);blur(%d,src=a);";
+   sprintf(buf, str, MAX_BLUR, ((f % MAX_BLUR) + 1));
+   eo_do(text, evas_obj_text_filter_program_set(buf));
 
FPS_STD(NAME);
 }

-- 




[EGIT] [core/efl] master 01/01: Evas filters: Use GL_FRAMEBUFFER instead of GL_READ_FRAMEBUFFER

2014-03-07 Thread Jean-Philippe Andre
jpeg pushed a commit to branch master.

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

commit a6950567a3adc34402d02a3b37d715818c4f9533
Author: Jean-Philippe Andre 
Date:   Fri Mar 7 17:45:16 2014 +0900

Evas filters: Use GL_FRAMEBUFFER instead of GL_READ_FRAMEBUFFER

GL_READ_FRAMEBUFFER isn't defined when compiling for Wayland
Thanks Stefan for the report.

Also, import GL_FRAMEBUFFER overrides from other GL files, so
that it points to the proper extension (_OES or _EXT if applicable).
---
 src/modules/evas/engines/gl_x11/evas_engine.c | 14 --
 1 file changed, 12 insertions(+), 2 deletions(-)

diff --git a/src/modules/evas/engines/gl_x11/evas_engine.c 
b/src/modules/evas/engines/gl_x11/evas_engine.c
index cc44704..96d2726 100644
--- a/src/modules/evas/engines/gl_x11/evas_engine.c
+++ b/src/modules/evas/engines/gl_x11/evas_engine.c
@@ -3425,9 +3425,19 @@ eng_gl_surface_read_pixels(void *data, void *surface,
 return EINA_FALSE;
  }
 
-   glsym_glBindFramebuffer(GL_READ_FRAMEBUFFER, im->tex->pt->fb);
+#ifdef GL_GLES
+# ifndef GL_FRAMEBUFFER
+#  define GL_FRAMEBUFFER GL_FRAMEBUFFER_OES
+# endif
+#else
+# ifndef GL_FRAMEBUFFER
+#  define GL_FRAMEBUFFER GL_FRAMEBUFFER_EXT
+# endif
+#endif
+
+   glsym_glBindFramebuffer(GL_FRAMEBUFFER, im->tex->pt->fb);
glsym_glReadPixels(x, y, w, h, GL_BGRA, GL_UNSIGNED_BYTE, pixels);
-   glsym_glBindFramebuffer(GL_READ_FRAMEBUFFER, 0);
+   glsym_glBindFramebuffer(GL_FRAMEBUFFER, 0);
return EINA_TRUE;
 }
 ////

-- 




[EGIT] [core/efl] master 02/08: Evas gl_x11: Add support for glReadPixels

2014-03-06 Thread Jean-Philippe Andre
jpeg pushed a commit to branch master.

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

commit 59f5216391ab6919dd03b629ece62ba01b82284b
Author: Jean-Philippe Andre 
Date:   Thu Mar 6 17:42:24 2014 +0900

Evas gl_x11: Add support for glReadPixels

This will be needed by the filters for proxy rendering,
for textures and maps (displacement).

Add new engine functions to unleash the (sluggish) power of glReadPixels.
The idea is to be able to bypass glReadPixels later, so 3 new APIs are
added:
- surface_lock
- surface_read_pixels
- surface_unlock
They must be called in that order.

Note (for history):
glReadPixels was always getting the wrong data during first draw,
but the right data during a redraw...
Why? Well simply because for OpenGL itself, the image had never
been drawn in teh first place! Only the Evas GL context knew
about the image drawing, as it was queued somewhere in the pipe.

One line solution: Call evas_gl_common_context_flush before
doing anything else.
---
 src/lib/evas/include/evas_private.h|  5 +-
 .../evas/engines/gl_common/evas_gl_common.h|  3 ++
 .../evas/engines/gl_common/evas_gl_context.c   |  3 ++
 src/modules/evas/engines/gl_x11/evas_engine.c  | 62 ++
 .../evas/engines/software_generic/evas_engine.c|  3 ++
 5 files changed, 75 insertions(+), 1 deletion(-)

diff --git a/src/lib/evas/include/evas_private.h 
b/src/lib/evas/include/evas_private.h
index 95dd249..9650805 100644
--- a/src/lib/evas/include/evas_private.h
+++ b/src/lib/evas/include/evas_private.h
@@ -907,8 +907,11 @@ struct _Evas_Func
void *(*gl_proc_address_get)  (void *data, const char *name);
int  (*gl_native_surface_get) (void *data, void *surface, void 
*native_surface);
void *(*gl_api_get)   (void *data);
-   void (*gl_direct_override_get)   (void *data, int *override, int 
*force_off);
+   void (*gl_direct_override_get)(void *data, int *override, int 
*force_off);
void (*gl_get_pixels_set) (void *data, void *get_pixels, void 
*get_pixels_data, void *obj);
+   Eina_Bool (*gl_surface_lock)  (void *data, void *surface);
+   Eina_Bool (*gl_surface_read_pixels)   (void *data, void *surface, int x, 
int y, int w, int h, Evas_Colorspace cspace, void *pixels);
+   Eina_Bool (*gl_surface_unlock)(void *data, void *surface);
 
int  (*image_load_error_get)  (void *data, void *image);
int  (*font_run_end_get)  (void *data, Evas_Font_Set *font, 
Evas_Font_Instance **script_fi, Evas_Font_Instance **cur_fi, Evas_Script_Type 
script, const Eina_Unicode *text, int run_len);
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 a6b624d..3f5bab2 100644
--- a/src/modules/evas/engines/gl_common/evas_gl_common.h
+++ b/src/modules/evas/engines/gl_common/evas_gl_common.h
@@ -628,6 +628,7 @@ struct _Evas_GL_Image
unsigned charcached : 1;
unsigned charalpha : 1;
unsigned chartex_only : 1;
+   unsigned charlocked : 1; // gl_surface_lock/unlock
 };
 
 struct _Evas_GL_Font_Texture
@@ -838,6 +839,8 @@ extern void   (*glsym_glReleaseShaderCompiler)(void);
 extern void  *(*glsym_glMapBuffer)(GLenum a, GLenum b);
 extern GLboolean  (*glsym_glUnmapBuffer)  (GLenum a);
 
+extern void   (*glsym_glReadPixels)   (GLint x, GLint y, GLsizei 
width, GLsizei height, GLenum format, GLenum type, GLvoid *data);
+
 #ifdef GL_GLES
 extern void  *(*secsym_eglCreateImage)   (void *a, void 
*b, GLenum c, void *d, const int *e);
 extern unsigned int   (*secsym_eglDestroyImage)  (void *a, void 
*b);
diff --git a/src/modules/evas/engines/gl_common/evas_gl_context.c 
b/src/modules/evas/engines/gl_common/evas_gl_context.c
index 2e447d9..000a396 100644
--- a/src/modules/evas/engines/gl_common/evas_gl_context.c
+++ b/src/modules/evas/engines/gl_common/evas_gl_context.c
@@ -29,6 +29,7 @@ void  *(*glsym_glMapBuffer)(GLenum a, GLenum 
b) = NULL;
 GLboolean  (*glsym_glUnmapBuffer)  (GLenum a) = NULL;
 void   (*glsym_glStartTiling)  (GLuint a, GLuint b, GLuint c, 
GLuint d, GLuint e) = NULL;
 void   (*glsym_glEndTiling)(GLuint a) = NULL;
+void   (*glsym_glReadPixels)   (GLint x, GLint y, GLsizei width, 
GLsizei height, GLenum format, GLenum type, GLvoid *data) = NULL;
 
 #ifdef GL_GLES
 // just used for finding symbols :)
@@ -211,6 +212,8 @@ gl_symbols(void)
 
FINDSYM(secsym_eglGetImageAttribSEC, "eglGetImageAttribSEC", 
secsym_func_uint);
 #endif
+
+   FINDSYM(glsym_glReadPixels, "glReadPixels", glsym_func_void);
 }
 
 static void shader_array_flush(Evas_Engine_GL_Context *gc);
diff --git a/src/modules/evas/engines/gl_x11/

[EGIT] [core/efl] master 03/08: Evas filters: Allow image copy with the GL engine

2014-03-06 Thread Jean-Philippe Andre
jpeg pushed a commit to branch master.

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

commit 2225587e5e51159fcd00e72e090e3f3ed1acd33f
Author: Jean-Philippe Andre 
Date:   Thu Mar 6 17:52:57 2014 +0900

Evas filters: Allow image copy with the GL engine

For now, this simply uses memcpy.
The SW engine equivalent uses image_draw, which wouldn't work
under the GL engine.
---
 src/lib/evas/filters/evas_filter_utils.c | 20 +---
 1 file changed, 17 insertions(+), 3 deletions(-)

diff --git a/src/lib/evas/filters/evas_filter_utils.c 
b/src/lib/evas/filters/evas_filter_utils.c
index cddc9bc..493c85b 100644
--- a/src/lib/evas/filters/evas_filter_utils.c
+++ b/src/lib/evas/filters/evas_filter_utils.c
@@ -35,9 +35,23 @@ evas_filter_buffer_scaled_get(Evas_Filter_Context *ctx,
// FIXME: Not supported on GL engine.
// Yeah, we need to call the CPU scaling functions and not the engine.
if (ctx->gl_engine)
- CRI("Support for stretching not implemened yet for GL.");
-
-   if (!src->alpha_only)
+ {
+if (src->w == (int) w && src->h == (int) h)
+  {
+ RGBA_Image *s = (RGBA_Image *) srcdata;
+ RGBA_Image *d = (RGBA_Image *) dstdata;
+ EINA_SAFETY_ON_NULL_RETURN_VAL(s->image.data, NULL);
+ EINA_SAFETY_ON_NULL_RETURN_VAL(d->image.data, NULL);
+ memcpy(d->image.data, s->image.data,
+w * h * (src->alpha_only ? 1 : 4));
+  }
+else
+  {
+ CRI("Support for stretching not implemened yet for GL.");
+ return NULL;
+  }
+ }
+   else if (!src->alpha_only)
  {
 drawctx = ENFN->context_new(ENDT);
 ENFN->context_color_set(ENDT, drawctx, 255, 255, 255, 255);

-- 




[EGIT] [core/efl] master 04/08: Evas filters: Implement proxy rendering for GL

2014-03-06 Thread Jean-Philippe Andre
jpeg pushed a commit to branch master.

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

commit 7690e33b4999d80743ad47a1bc1841f625c7c1a5
Author: Jean-Philippe Andre 
Date:   Fri Mar 7 09:36:16 2014 +0900

Evas filters: Implement proxy rendering for GL

Make use of glReadPixel to access the source's pixel data.
Use all classic CPU functions to blend and use that data.
Save pointer to the GL image and update it with the latest data
during target render.

Use ENFN's surface_lock, read_pixels, unlock.

Also, add some more error checks to make sure the images are valid,
or return an error at runtime.
---
 src/lib/evas/filters/evas_filter.c | 223 -
 src/lib/evas/filters/evas_filter_blend.c   | 150 ---
 src/lib/evas/filters/evas_filter_mask.c|   9 +-
 src/lib/evas/filters/evas_filter_private.h |   3 +-
 src/lib/evas/include/evas_filter.h |   2 +-
 5 files changed, 260 insertions(+), 127 deletions(-)

diff --git a/src/lib/evas/filters/evas_filter.c 
b/src/lib/evas/filters/evas_filter.c
index 8cb4991..9fa99a3 100644
--- a/src/lib/evas/filters/evas_filter.c
+++ b/src/lib/evas/filters/evas_filter.c
@@ -24,6 +24,7 @@
 
 static void _buffer_free(Evas_Filter_Buffer *fb);
 static void _command_del(Evas_Filter_Context *ctx, Evas_Filter_Command *cmd);
+static RGBA_Image *_rgba_image_alloc(Evas_Filter_Buffer const *fb, void *data);
 
 #ifdef CLAMP
 # undef CLAMP
@@ -85,55 +86,102 @@ evas_filter_context_clear(Evas_Filter_Context *ctx)
 }
 
 static void
-_backing_free(Evas_Filter_Context *ctx, Image_Entry *ie)
+_backing_free(Evas_Filter_Context *ctx, RGBA_Image *im)
 {
-   if (!ie) return;
+   if (!im) return;
 
if (!ctx->gl_engine)
  {
 if (!ctx->async)
-  ENFN->image_free(ENDT, ie);
+  ENFN->image_free(ENDT, im);
  }
else
  {
 #ifdef EVAS_CSERVE2
 if (evas_cserve2_use_get())
-  evas_cache2_image_close(ie);
+  evas_cache2_image_close(&im->cache_entry);
 else
 #endif
-  evas_cache_image_drop(ie);
+  evas_cache_image_drop(&im->cache_entry);
  }
 }
 
 static void
 _filter_buffer_backing_free(Evas_Filter_Buffer *fb)
 {
-   void *backing;
if (!fb) return;
 
-   if (fb->stolen)
+   if (!fb->stolen)
  {
-if (eina_list_data_find(fb->ctx->buffers, fb))
+if (fb->allocated)
+  _backing_free(fb->ctx, fb->backing);
+if (fb->glimage && fb->allocated_gl)
+  fb->ENFN->image_free(fb->ENDT, fb->glimage);
+fb->backing = NULL;
+fb->glimage = NULL;
+ }
+   else
+ {
+if (!fb->ctx->gl_engine)
   {
- fb->delete_me = EINA_TRUE;
- return;
+ fb->delete_me = fb->allocated;
+  }
+else if (fb->glimage && fb->allocated)
+  {
+ _backing_free(fb->ctx, fb->backing);
+ fb->backing = NULL;
   }
  }
+}
+
+/* GL engine stuff: read-back from texture */
+static Eina_Bool
+_filter_buffer_glimage_pixels_read(Evas_Filter_Buffer *fb)
+{
+   Eina_Bool ok;
+
+   EINA_SAFETY_ON_NULL_RETURN_VAL(fb, EINA_FALSE);
+   EINA_SAFETY_ON_FALSE_RETURN_VAL(fb->ctx->gl_engine, EINA_FALSE);
+   EINA_SAFETY_ON_NULL_RETURN_VAL(fb->glimage, EINA_FALSE);
+
+   if (fb->backing)
+ return EINA_TRUE;
+
+   EINA_SAFETY_ON_NULL_RETURN_VAL(fb->ENFN->gl_surface_lock, EINA_FALSE);
+   EINA_SAFETY_ON_NULL_RETURN_VAL(fb->ENFN->gl_surface_read_pixels, 
EINA_FALSE);
+   EINA_SAFETY_ON_NULL_RETURN_VAL(fb->ENFN->gl_surface_unlock, EINA_FALSE);
 
-   INF("Free backing of buffer %d fb @ %p backing @ %p alloc %d", fb->id, fb, 
fb->backing, fb->allocated);
-   backing = fb->backing;
-   fb->backing = NULL;
+   fb->backing = _rgba_image_alloc(fb, NULL);
+   fb->allocated = EINA_TRUE;
+   EINA_SAFETY_ON_NULL_RETURN_VAL(fb->backing, EINA_FALSE);
 
-   if (!fb->allocated) return;
-   _backing_free(fb->ctx, backing);
+   ok = fb->ENFN->gl_surface_lock(fb->ENDT, fb->glimage);
+   if (!ok)
+ {
+ERR("Failed to lock the image pixels");
+return EINA_FALSE;
+ }
+
+   ok = fb->ENFN->gl_surface_read_pixels(fb->ENDT, fb->glimage,
+ 0, 0, fb->w, fb->h, fb->alpha_only
+ ? EVAS_COLORSPACE_GRY8
+ : EVAS_COLORSPACE_ARGB,
+ fb->backing->image.data);
+   if (!ok)
+ ERR("Could not read the image pixels!");
+
+   ok &= fb->ENFN->gl_surface_unlock(fb->ENDT, fb->glimage);
+   return ok;
 }
 
 
 /**
+ * @internal
  * Render the source object whe

[EGIT] [core/efl] master 01/08: Evas filters: Minor change (type is void*)

2014-03-06 Thread Jean-Philippe Andre
jpeg pushed a commit to branch master.

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

commit 688c9c3676526472523bd7545626f8da923262ce
Author: Jean-Philippe Andre 
Date:   Wed Mar 5 18:04:35 2014 +0900

Evas filters: Minor change (type is void*)
---
 src/lib/evas/canvas/evas_object_text.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/lib/evas/canvas/evas_object_text.c 
b/src/lib/evas/canvas/evas_object_text.c
index 3086825..e1cfb21 100644
--- a/src/lib/evas/canvas/evas_object_text.c
+++ b/src/lib/evas/canvas/evas_object_text.c
@@ -2167,7 +2167,7 @@ evas_object_text_render(Evas_Object *eo_obj,
 void *filter_ctx;
 Eina_Bool ok;
 int ox = 0, oy = 0;
-Image_Entry *previous = o->cur.filter.output;
+void *previous = o->cur.filter.output;
 
 /* NOTE: Font effect rendering is now done ENTIRELY on CPU.
  * So we rely on cache/cache2 to allocate a real image buffer,

-- 




[EGIT] [core/efl] master 06/08: Evas filters: Improve detection of the GL engine

2014-03-06 Thread Jean-Philippe Andre
jpeg pushed a commit to branch master.

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

commit 887585129be724ce1cda78dad77f9bc1c6fb769f
Author: Jean-Philippe Andre 
Date:   Fri Mar 7 10:32:47 2014 +0900

Evas filters: Improve detection of the GL engine

According to cedric's horrified comment :)

And add a comment in the code. Yes, this IS a temporary solution,
but the GL engineS being what they are (tons of duplicated code),
I think it's still better for now to just make things work.
---
 src/lib/evas/filters/evas_filter.c | 15 ++-
 1 file changed, 14 insertions(+), 1 deletion(-)

diff --git a/src/lib/evas/filters/evas_filter.c 
b/src/lib/evas/filters/evas_filter.c
index 9fa99a3..c2cb5b0 100644
--- a/src/lib/evas/filters/evas_filter.c
+++ b/src/lib/evas/filters/evas_filter.c
@@ -58,7 +58,20 @@ evas_filter_context_new(Evas_Public_Data *evas, Eina_Bool 
async)
 
ctx->evas = evas;
ctx->async = async;
-   ctx->gl_engine = !!strstr(evas->engine.module->definition->name, "gl");
+
+   /* Note:
+* For now, we need to detect whether the engine is full SW or GL.
+* In case of GL, we will have two buffers in parallel:
+* RGBA_Image backing and a GL texture (glimage). We can't just leave it
+* to the engine to handle the image data since it will try to discard the
+* original buffer as early as possible to save memory, but we still need
+* it for filtering.
+* In the future, Evas_Engine functions need to be added to abstract this
+* better and implement filters direcly with shaders.
+*/
+   ctx->gl_engine = (evas->engine.func->gl_surface_read_pixels != NULL);
+   if (ctx->gl_engine)
+ DBG("Detected GL engine. All filters will still run in software (SLOW).");
 
return ctx;
 }

-- 




[EGIT] [core/efl] master 07/08: Evas filters: Reduce verbosity (INF --> DBG)

2014-03-06 Thread Jean-Philippe Andre
jpeg pushed a commit to branch master.

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

commit 5a77d1aae08e59df5049cd059e2befddad1379f3
Author: Jean-Philippe Andre 
Date:   Fri Mar 7 10:59:54 2014 +0900

Evas filters: Reduce verbosity (INF --> DBG)
---
 src/lib/evas/filters/evas_filter.c | 20 ++--
 1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/src/lib/evas/filters/evas_filter.c 
b/src/lib/evas/filters/evas_filter.c
index c2cb5b0..10ff8ad 100644
--- a/src/lib/evas/filters/evas_filter.c
+++ b/src/lib/evas/filters/evas_filter.c
@@ -296,7 +296,7 @@ evas_filter_context_proxy_render_all(Evas_Filter_Context 
*ctx, Eo *eo_obj,
   source = eo_data_scope_get(fb->source, EVAS_OBJ_CLASS);
   if (source->proxy->surface && !source->proxy->redraw)
 {
-   INF("Source already rendered");
+   DBG("Source already rendered");
_filter_buffer_backing_free(fb);
fb->w = source->cur->geometry.w;
fb->h = source->cur->geometry.h;
@@ -315,7 +315,7 @@ evas_filter_context_proxy_render_all(Evas_Filter_Context 
*ctx, Eo *eo_obj,
 }
   else
 {
-   INF("Source needs to be rendered");
+   DBG("Source needs to be rendered");
_proxy_subrender(ctx->evas->evas, fb->source, eo_obj, obj, 
do_async);
_filter_buffer_backing_free(fb);
fb->w = source->cur->geometry.w;
@@ -846,7 +846,7 @@ evas_filter_temporary_buffer_get(Evas_Filter_Context *ctx, 
int w, int h,
 
buf = _buffer_new(ctx, w, h, alpha_only);
buf->locked = EINA_TRUE;
-   INF("Created temporary buffer: %d", buf->id);
+   DBG("Created temporary buffer: %d", buf->id);
return buf;
 }
 
@@ -944,7 +944,7 @@ evas_filter_command_blur_add(Evas_Filter_Context *ctx, void 
*drawctx,
  }
else if (in->alpha_only && !out->alpha_only)
  {
-INF("Adding extra blending step (Alpha --> RGBA)");
+DBG("Adding extra blending step (Alpha --> RGBA)");
 blur_out = evas_filter_temporary_buffer_get(ctx, 0, 0, EINA_TRUE);
 if (!blur_out) goto fail;
 convert = EINA_TRUE;
@@ -1020,7 +1020,7 @@ evas_filter_command_blur_add(Evas_Filter_Context *ctx, 
void *drawctx,
 
if (dx)
  {
-INF("Add horizontal blur %d -> %d (%dpx)", in->id, out_dx->id, dx);
+DBG("Add horizontal blur %d -> %d (%dpx)", in->id, out_dx->id, dx);
 cmd = _command_new(ctx, EVAS_FILTER_MODE_BLUR, in, NULL, out_dx);
 if (!cmd) goto fail;
 cmd->blur.type = type;
@@ -1032,7 +1032,7 @@ evas_filter_command_blur_add(Evas_Filter_Context *ctx, 
void *drawctx,
 
if (dy)
  {
-INF("Add vertical blur %d -> %d (%dpx)", in_dy->id, out_dy->id, dy);
+DBG("Add vertical blur %d -> %d (%dpx)", in_dy->id, out_dy->id, dy);
 cmd = _command_new(ctx, EVAS_FILTER_MODE_BLUR, in_dy, NULL, out_dy);
 if (!cmd) goto fail;
 cmd->blur.type = type;
@@ -1046,7 +1046,7 @@ evas_filter_command_blur_add(Evas_Filter_Context *ctx, 
void *drawctx,
  {
 if (!cmd) goto fail;
 if (!copybuf) goto fail;
-INF("Add copy %d -> %d", copybuf->id, blur_out->id);
+DBG("Add copy %d -> %d", copybuf->id, blur_out->id);
 cmd->ENFN->context_color_set(cmd->ENDT, drawctx, 0, 0, 0, 255);
 id = evas_filter_command_blend_add(ctx, drawctx, copybuf->id, 
blur_out->id, ox, oy, EVAS_FILTER_FILL_MODE_NONE);
 cmd->ENFN->context_color_set(cmd->ENDT, drawctx, R, G, B, A);
@@ -1056,7 +1056,7 @@ evas_filter_command_blur_add(Evas_Filter_Context *ctx, 
void *drawctx,
 
if (convert)
  {
-INF("Add convert %d -> %d", blur_out->id, out->id);
+DBG("Add convert %d -> %d", blur_out->id, out->id);
 id = evas_filter_command_blend_add(ctx, drawctx, blur_out->id, 
out->id, ox, oy, EVAS_FILTER_FILL_MODE_NONE);
 if (id < 0) goto fail;
  }
@@ -1723,7 +1723,7 @@ _filter_command_run(Evas_Filter_Command *cmd)
EINA_SAFETY_ON_NULL_RETURN_VAL(cmd->output, EINA_FALSE);
EINA_SAFETY_ON_NULL_RETURN_VAL(cmd->input, EINA_FALSE);
 
-   INF("Running filter command %d (%s): %d [%d] --> %d",
+   DBG("Command %d (%s): %d [%d] --> %d",
cmd->id, _filter_name_get(cmd->mode),
cmd->input->id, cmd->mask ? cmd->mask->id : 0, cmd->output->id);
 
@@ -1839,7 +1839,7 @@ evas_filter_run(Evas_Filter_Context *ctx)
  return EINA_TRUE;
 
if (ctx->gl_engine)
- WRN("EXPERIMENTAL OpenGL support! Might very well crash or not render 
anything.");
+ INF("EXPERIMENTAL OpenGL support! The text filters will be very slow!");
 
if (ctx->async)
  {

-- 




[EGIT] [core/efl] master 05/08: Evas filters: Complete GL support with scaling function

2014-03-06 Thread Jean-Philippe Andre
jpeg pushed a commit to branch master.

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

commit a97844d415026458cf80d1cbb1da992c087ad7bf
Author: Jean-Philippe Andre 
Date:   Thu Mar 6 18:28:46 2014 +0900

Evas filters: Complete GL support with scaling function

Directly use the scale functions from scalecache when
running the GL engine.

With this, and glReadPixels support, the GL engine support is now
100% complete. It will be DAMN SLOW, but ALL filters should work
in both OpenGL and Software rendering.
---
 src/lib/evas/filters/evas_filter_utils.c | 49 +++-
 1 file changed, 29 insertions(+), 20 deletions(-)

diff --git a/src/lib/evas/filters/evas_filter_utils.c 
b/src/lib/evas/filters/evas_filter_utils.c
index 493c85b..0684af9 100644
--- a/src/lib/evas/filters/evas_filter_utils.c
+++ b/src/lib/evas/filters/evas_filter_utils.c
@@ -15,6 +15,14 @@ evas_filter_buffer_scaled_get(Evas_Filter_Context *ctx,
srcdata = evas_filter_buffer_backing_get(ctx, src->id);
EINA_SAFETY_ON_NULL_RETURN_VAL(srcdata, NULL);
 
+   if (src->alpha_only)
+ {
+// There is no supporting function in Evas for alpha scaling...
+// but guess what? There is also no use case in the filters :)
+CRI("Alpha buffer scaling is not supported");
+return NULL;
+ }
+
fb = evas_filter_temporary_buffer_get(ctx, w, h, src->alpha_only);
if (!fb) return NULL;
 
@@ -32,26 +40,34 @@ evas_filter_buffer_scaled_get(Evas_Filter_Context *ctx,
 return NULL;
  }
 
-   // FIXME: Not supported on GL engine.
-   // Yeah, we need to call the CPU scaling functions and not the engine.
if (ctx->gl_engine)
  {
+RGBA_Image *s = (RGBA_Image *) srcdata;
+RGBA_Image *d = (RGBA_Image *) dstdata;
+EINA_SAFETY_ON_NULL_RETURN_VAL(s->image.data, NULL);
+EINA_SAFETY_ON_NULL_RETURN_VAL(d->image.data, NULL);
+
 if (src->w == (int) w && src->h == (int) h)
-  {
- RGBA_Image *s = (RGBA_Image *) srcdata;
- RGBA_Image *d = (RGBA_Image *) dstdata;
- EINA_SAFETY_ON_NULL_RETURN_VAL(s->image.data, NULL);
- EINA_SAFETY_ON_NULL_RETURN_VAL(d->image.data, NULL);
- memcpy(d->image.data, s->image.data,
-w * h * (src->alpha_only ? 1 : 4));
-  }
+  memcpy(d->image.data, s->image.data, w * h * 4);
 else
   {
- CRI("Support for stretching not implemened yet for GL.");
- return NULL;
+ Eina_Bool ok;
+ RGBA_Draw_Context dc;
+
+ memset(&dc, 0, sizeof(dc));
+ dc.sli.h = 1;
+ dc.render_op = EVAS_RENDER_COPY;
+
+ ok = evas_common_scale_rgba_in_to_out_clip_sample
+   (s, d, &dc, 0, 0, src->w, src->h, 0, 0, w, h);
+ if (!ok)
+   {
+  ERR("RGBA Image scaling failed.");
+  return NULL;
+   }
   }
  }
-   else if (!src->alpha_only)
+   else
  {
 drawctx = ENFN->context_new(ENDT);
 ENFN->context_color_set(ENDT, drawctx, 255, 255, 255, 255);
@@ -63,13 +79,6 @@ evas_filter_buffer_scaled_get(Evas_Filter_Context *ctx,
  EINA_FALSE); // Not async
 ENFN->context_free(ENDT, drawctx);
  }
-   else
- {
-// FIXME: How to scale alpha buffer?
-// For now, we could draw to RGBA, scale from there, draw back to alpha
-CRI("Alpha buffer scaling is not supported");
-return NULL;
- }
 
return fb;
 }

-- 




[EGIT] [core/efl] master 08/08: Evas: Reduce verbosity of alpha functions

2014-03-06 Thread Jean-Philippe Andre
jpeg pushed a commit to branch master.

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

commit 182eaad43deee46e8f1c6e63291823f56e285db5
Author: Jean-Philippe Andre 
Date:   Fri Mar 7 11:00:26 2014 +0900

Evas: Reduce verbosity of alpha functions

And remove commented-out code.
---
 src/lib/evas/common/evas_alpha_main.c | 9 -
 1 file changed, 9 deletions(-)

diff --git a/src/lib/evas/common/evas_alpha_main.c 
b/src/lib/evas/common/evas_alpha_main.c
index 6bd654c..74bc75b 100644
--- a/src/lib/evas/common/evas_alpha_main.c
+++ b/src/lib/evas/common/evas_alpha_main.c
@@ -65,21 +65,12 @@ EVAS_RENDER_MUL = 11, /**< d = d*s */
 Alpha_Gfx_Func
 evas_common_alpha_func_get(int op)
 {
-   INF("Requesting alpha function with OP %d", op);
switch (op)
  {
   case EVAS_RENDER_BLEND:
 return _alpha_func_blend;
-//  case EVAS_RENDER_BLEND_REL:
   case EVAS_RENDER_COPY:
 return _alpha_func_copy;
-//  case EVAS_RENDER_COPY_REL:
-//  case EVAS_RENDER_ADD:
-//  case EVAS_RENDER_ADD_REL:
-//  case EVAS_RENDER_SUB:
-//  case EVAS_RENDER_SUB_REL:
-//  case EVAS_RENDER_TINT:
-//  case EVAS_RENDER_TINT_REL:
   case EVAS_RENDER_MASK:
   case EVAS_RENDER_MUL:
 return _alpha_func_mul;

-- 




[EGIT] [core/efl] master 01/01: Ecore suite: Don't fail if PulseAudio is not running

2014-03-04 Thread Jean-Philippe ANDRE
jpeg pushed a commit to branch master.

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

commit 01f0b600ac9a8b34bcba029f3228826ed6220273
Author: Jean-Philippe ANDRE 
Date:   Tue Mar 4 22:31:02 2014 +0900

Ecore suite: Don't fail if PulseAudio is not running

In a previous commit I mentionned that make check would fail
if PulseAudio is not running. Well, this is a bit excessive,
especially for buildbots where it doesn't have to be running.
So let's check that PulseAudio is running before failing.

Other errors should still be caught.

A simple "pulseaudio --check" should do the trick.
---
 src/tests/ecore/ecore_test_ecore_audio.c | 6 +-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/tests/ecore/ecore_test_ecore_audio.c 
b/src/tests/ecore/ecore_test_ecore_audio.c
index 78e13e5..8c33fd0 100644
--- a/src/tests/ecore/ecore_test_ecore_audio.c
+++ b/src/tests/ecore/ecore_test_ecore_audio.c
@@ -17,7 +17,11 @@ static Eina_Bool _failed_cb(void *data, Eo *obj EINA_UNUSED, 
const Eo_Event_Desc
 {
   Eina_Bool *pulse_context_failed = data;
 
-  if (pulse_context_failed) *pulse_context_failed = EINA_TRUE;
+  if (pulse_context_failed)
+{
+   int pa_check = system("pulseaudio --check");
+   *pulse_context_failed = (pa_check == 0);
+}
   ecore_main_loop_quit();
 
   return EINA_TRUE;

-- 




[EGIT] [core/efl] master 01/01: Ecore suite: Fix hangs when PulseAudio is not present

2014-03-03 Thread Jean-Philippe Andre
jpeg pushed a commit to branch master.

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

commit 9750bd51f2688a2990c57f2e464010edb210415a
Author: Jean-Philippe Andre 
Date:   Tue Mar 4 15:56:19 2014 +0900

Ecore suite: Fix hangs when PulseAudio is not present

EFL can be built with PulseAudio support even if PA is
not present on the system. In that case, ecore_suite will
hang forever. Let's just catch the error instead.

Note: make check will fail if PA is not available (but not hang)

This is not related to Tom's recent mail (but yeah it reminded me
of this bug^^)

Fixes T732.
---
 src/tests/ecore/ecore_test_ecore_audio.c | 13 +
 1 file changed, 13 insertions(+)

diff --git a/src/tests/ecore/ecore_test_ecore_audio.c 
b/src/tests/ecore/ecore_test_ecore_audio.c
index 0a55e3f..78e13e5 100644
--- a/src/tests/ecore/ecore_test_ecore_audio.c
+++ b/src/tests/ecore/ecore_test_ecore_audio.c
@@ -13,6 +13,16 @@
 #include 
 #include 
 
+static Eina_Bool _failed_cb(void *data, Eo *obj EINA_UNUSED, const 
Eo_Event_Description *desc EINA_UNUSED, void *event_info EINA_UNUSED)
+{
+  Eina_Bool *pulse_context_failed = data;
+
+  if (pulse_context_failed) *pulse_context_failed = EINA_TRUE;
+  ecore_main_loop_quit();
+
+  return EINA_TRUE;
+}
+
 static Eina_Bool _finished_cb(void *data EINA_UNUSED, Eo *obj EINA_UNUSED, 
const Eo_Event_Description *desc EINA_UNUSED, void *event_info EINA_UNUSED)
 {
   ecore_main_loop_quit();
@@ -48,6 +58,7 @@ START_TEST(ecore_test_ecore_audio_obj_pulse)
 {
Eo *in, *out;
Eina_Bool ret;
+   Eina_Bool pulse_context_failed = EINA_FALSE;
 
in = eo_add(ECORE_AUDIO_OBJ_IN_SNDFILE_CLASS, NULL);
fail_if(!in);
@@ -62,11 +73,13 @@ START_TEST(ecore_test_ecore_audio_obj_pulse)
ecore_timer_add(0.3, _seek_vol, in);
 
eo_do(in, eo_event_callback_add(ECORE_AUDIO_EV_IN_STOPPED, _finished_cb, 
NULL));
+   eo_do(out, eo_event_callback_add(ECORE_AUDIO_EV_OUT_PULSE_CONTEXT_FAIL, 
_failed_cb, &pulse_context_failed));
 
eo_do(out, ecore_audio_obj_out_input_attach(in, &ret));
fail_if(!ret);
 
ecore_main_loop_begin();
+   fail_if(pulse_context_failed);
 
eo_del(out);
eo_del(in);

-- 




[EGIT] [core/efl] master 01/01: Evas filters: Add return value in filter callback

2014-03-03 Thread Jean-Philippe Andre
jpeg pushed a commit to branch master.

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

commit 8ddfa35da67fe035805961f5c89312e61325586f
Author: Jean-Philippe Andre 
Date:   Tue Mar 4 15:17:11 2014 +0900

Evas filters: Add return value in filter callback

This will inform the client whether an asynchronous filter properly
rendered or not.

I actually don't know any case where rendering can fail at runtime.
---
 src/lib/evas/canvas/evas_object_text.c | 36 ++
 src/lib/evas/filters/evas_filter.c |  8 
 src/lib/evas/include/evas_filter.h |  2 +-
 3 files changed, 37 insertions(+), 9 deletions(-)

diff --git a/src/lib/evas/canvas/evas_object_text.c 
b/src/lib/evas/canvas/evas_object_text.c
index d4a9561..3086825 100644
--- a/src/lib/evas/canvas/evas_object_text.c
+++ b/src/lib/evas/canvas/evas_object_text.c
@@ -2024,9 +2024,37 @@ evas_font_draw_async_check(Evas_Object_Protected_Data 
*obj,
 }
 
 static void
-evas_object_text_render(Evas_Object *eo_obj EINA_UNUSED,
-   Evas_Object_Protected_Data *obj,
-   void *type_private_data,
+_filter_cb(Evas_Filter_Context *ctx, void *data, Eina_Bool success)
+{
+   Eo *eo_obj = data;
+
+   // Destroy context as we won't reuse it.
+   evas_filter_context_destroy(ctx);
+
+   // Redraw text with normal styles in case of failure
+   if (!success)
+ {
+Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, 
EVAS_OBJ_CLASS);
+Evas_Object_Text *o = (Evas_Object_Text *) obj->private_data;
+
+ERR("Filter failed at runtime!");
+o->cur.filter.invalid = EINA_TRUE;
+
+// Update object
+_evas_object_text_items_clear(o);
+o->changed = 1;
+_evas_object_text_recalc(eo_obj, o->cur.text);
+evas_object_change(eo_obj, obj);
+evas_object_clip_dirty(eo_obj, obj);
+evas_object_coords_recalc(eo_obj, obj);
+evas_object_inform_call_resize(eo_obj);
+ }
+}
+
+static void
+evas_object_text_render(Evas_Object *eo_obj,
+Evas_Object_Protected_Data *obj,
+void *type_private_data,
 void *output, void *context, void *surface,
 int x, int y, Eina_Bool do_async)
 {
@@ -2244,7 +2272,7 @@ evas_object_text_render(Evas_Object *eo_obj EINA_UNUSED,
 ENFN->context_free(ENDT, filter_ctx);
 
 // Add post-run callback and run filter
-evas_filter_context_autodestroy(filter);
+evas_filter_context_post_run_callback_set(filter, _filter_cb, eo_obj);
 ok = evas_filter_run(filter);
 o->cur.filter.changed = EINA_FALSE;
 
diff --git a/src/lib/evas/filters/evas_filter.c 
b/src/lib/evas/filters/evas_filter.c
index 816c30b..8cb4991 100644
--- a/src/lib/evas/filters/evas_filter.c
+++ b/src/lib/evas/filters/evas_filter.c
@@ -1719,10 +1719,10 @@ static void
 _filter_thread_run_cb(void *data)
 {
Evas_Filter_Context *ctx = data;
+   Eina_Bool success;
void *buffer;
 
-   // TODO: Add return value check and call error cb
-   _filter_chain_run(ctx);
+   success = _filter_chain_run(ctx);
 
EINA_LIST_FREE(ctx->post_run.buffers_to_free, buffer)
  {
@@ -1731,7 +1731,7 @@ _filter_thread_run_cb(void *data)
  }
 
if (ctx->post_run.cb)
- ctx->post_run.cb(ctx, ctx->post_run.data);
+ ctx->post_run.cb(ctx, ctx->post_run.data, success);
 }
 
 Eina_Bool
@@ -1755,6 +1755,6 @@ evas_filter_run(Evas_Filter_Context *ctx)
 
ret = _filter_chain_run(ctx);
if (ctx->post_run.cb)
- ctx->post_run.cb(ctx, ctx->post_run.data);
+ ctx->post_run.cb(ctx, ctx->post_run.data, ret);
return ret;
 }
diff --git a/src/lib/evas/include/evas_filter.h 
b/src/lib/evas/include/evas_filter.h
index 2ad272c..e79fc9e 100644
--- a/src/lib/evas/include/evas_filter.h
+++ b/src/lib/evas/include/evas_filter.h
@@ -19,7 +19,7 @@ typedef enum _Evas_Filter_Fill_Mode Evas_Filter_Fill_Mode;
 typedef enum _Evas_Filter_Transform_Flags Evas_Filter_Transform_Flags;
 
 typedef Eina_Bool (* Evas_Filter_Apply_Func) (Evas_Filter_Command *cmd);
-typedef void (* Evas_Filter_Cb) (Evas_Filter_Context *ctx, void *data);
+typedef void (* Evas_Filter_Cb) (Evas_Filter_Context *ctx, void *data, 
Eina_Bool success);
 
 #define EVAS_FILTER_BUFFER_RGBA  EINA_FALSE
 #define EVAS_FILTER_BUFFER_ALPHA EINA_TRUE

-- 




[EGIT] [core/efl] master 01/06: Evas filters: Minor fix for consistency (clip_to_target)

2014-03-03 Thread Jean-Philippe Andre
jpeg pushed a commit to branch master.

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

commit 51f216973a4da9e0dd254ed6c301b14ac6c0eaf3
Author: Jean-Philippe Andre 
Date:   Tue Mar 4 11:44:19 2014 +0900

Evas filters: Minor fix for consistency (clip_to_target)

Make sure sx and sy are properly set.
No need to backport as the function actually expect these values to
be initialized to 0 in the first place.
---
 src/lib/evas/filters/evas_filter.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/lib/evas/filters/evas_filter.c 
b/src/lib/evas/filters/evas_filter.c
index 6d2d7f8..62b0198 100644
--- a/src/lib/evas/filters/evas_filter.c
+++ b/src/lib/evas/filters/evas_filter.c
@@ -1573,6 +1573,7 @@ _clip_to_target(int *sx /* OUT */, int *sy /* OUT */, int 
sw, int sh,
  }
else
  {
+(*sx) = 0;
 (*dx) = 0;
 (*cols) = sw;
 if ((*cols) > dw) (*cols) = dw;
@@ -1595,6 +1596,7 @@ _clip_to_target(int *sx /* OUT */, int *sy /* OUT */, int 
sw, int sh,
  }
else
  {
+(*sy) = 0;
 (*dy) = 0;
 (*rows) = sh;
 if ((*rows) > dh) (*rows) = dh;

-- 




[EGIT] [core/efl] master 05/06: Evas filters: Fix errors in Evas_Object::destructor

2014-03-03 Thread Jean-Philippe Andre
jpeg pushed a commit to branch master.

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

commit 63a18f3fcee6a631c16f582d7c828ab5d96547d0
Author: Jean-Philippe Andre 
Date:   Tue Mar 4 14:14:15 2014 +0900

Evas filters: Fix errors in Evas_Object::destructor

Remove invalid call to source_unset and call the appropriate
Eo evas_obj_text_filter_source_set in case of Evas_Text with
proxy sources.
---
 src/lib/evas/canvas/evas_object_main.c | 7 ++-
 src/lib/evas/canvas/evas_object_text.c | 8 
 2 files changed, 14 insertions(+), 1 deletion(-)

diff --git a/src/lib/evas/canvas/evas_object_main.c 
b/src/lib/evas/canvas/evas_object_main.c
index d8d3850..ff679cb 100644
--- a/src/lib/evas/canvas/evas_object_main.c
+++ b/src/lib/evas/canvas/evas_object_main.c
@@ -657,7 +657,12 @@ _destructor(Eo *eo_obj, void *_pd, va_list *list 
EINA_UNUSED)
EINA_LIST_FOREACH_SAFE(obj->clip.clipees, l, l2, tmp)
  evas_object_clip_unset(tmp->object);
EINA_LIST_FOREACH_SAFE(obj->proxy->proxies, l, l2, proxy)
- evas_object_image_source_unset(proxy);
+ {
+if (eo_isa(proxy, EVAS_OBJ_IMAGE_CLASS))
+  evas_object_image_source_unset(proxy);
+else if (eo_isa(proxy, EVAS_OBJ_TEXT_CLASS))
+  eo_do(proxy, evas_obj_text_filter_source_set(NULL, eo_obj));
+ }
if (obj->cur->clipper) evas_object_clip_unset(eo_obj);
evas_object_map_set(eo_obj, NULL);
if (obj->is_smart) evas_object_smart_del(eo_obj);
diff --git a/src/lib/evas/canvas/evas_object_text.c 
b/src/lib/evas/canvas/evas_object_text.c
index 2ffd734..d4a9561 100644
--- a/src/lib/evas/canvas/evas_object_text.c
+++ b/src/lib/evas/canvas/evas_object_text.c
@@ -2808,6 +2808,14 @@ _filter_source_set(Eo *eo_obj, void *_pd, va_list *list)
obj = eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS);
if (eo_source) source = eo_data_scope_get(eo_source, EVAS_OBJ_CLASS);
 
+   if (!name)
+ {
+if (!eo_source || !o->cur.filter.sources) return;
+if (eina_hash_del_by_data(o->cur.filter.sources, eo_source))
+  goto update;
+return;
+ }
+
if (!o->cur.filter.sources)
  {
 o->cur.filter.sources = eina_hash_string_small_new

-- 




[EGIT] [core/efl] master 06/06: Evas cserve2: Fix excessive warnings during shutdown

2014-03-03 Thread Jean-Philippe Andre
jpeg pushed a commit to branch master.

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

commit 752fde1025e9ff27af465800b250b15626c38e6c
Author: Jean-Philippe Andre 
Date:   Tue Mar 4 14:46:13 2014 +0900

Evas cserve2: Fix excessive warnings during shutdown

The global index for fonts will be freed after cserve2 shutdown
but Evas keeps trying to free all its fonts after that.
---
 src/lib/evas/cserve2/evas_cs2_client.c | 17 -
 1 file changed, 4 insertions(+), 13 deletions(-)

diff --git a/src/lib/evas/cserve2/evas_cs2_client.c 
b/src/lib/evas/cserve2/evas_cs2_client.c
index 3591d22..2476e91 100644
--- a/src/lib/evas/cserve2/evas_cs2_client.c
+++ b/src/lib/evas/cserve2/evas_cs2_client.c
@@ -321,8 +321,6 @@ _shared_index_close(Shared_Index *si)
  }
if (si->entries_by_hkey)
  eina_hash_free(si->entries_by_hkey);
-   si->f = NULL;
-   si->data = NULL;
memset(si, 0, sizeof(Shared_Index));
 }
 
@@ -1589,7 +1587,9 @@ _font_entry_free(Font_Entry *fe)
  if (fe->fash[i])
fash_gl_free(fe->fash[i]);
 
-   eina_hash_del_by_key(_index.fonts.entries_by_hkey, fe->hkey);
+   if (_index.fonts.entries_by_hkey)
+ eina_hash_del_by_key(_index.fonts.entries_by_hkey, fe->hkey);
+
free(fe->hkey);
eina_stringshare_del(fe->source);
eina_stringshare_del(fe->name);
@@ -2894,16 +2894,7 @@ _shared_index_remap_check(Shared_Index *si, int elemsize)
 
if (!si->path[0])
  {
-if (si->f)
-  {
- DBG("Closing index map");
- eina_file_map_free(si->f, si->data);
- eina_file_close(si->f);
- eina_hash_free(si->entries_by_hkey);
- si->f = NULL;
- si->data = NULL;
- memset(si, 0, sizeof(*si));
-  }
+_shared_index_close(si);
 return EINA_FALSE;
  }
 

-- 




[EGIT] [core/efl] master 04/06: Evas filters: Clean up some duplicate includes

2014-03-03 Thread Jean-Philippe Andre
jpeg pushed a commit to branch master.

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

commit cc21f8f17332250975be0968093e97dd20280ef3
Author: Jean-Philippe Andre 
Date:   Tue Mar 4 13:58:30 2014 +0900

Evas filters: Clean up some duplicate includes

No functional change
---
 src/lib/evas/filters/evas_filter_bump.c   | 7 ---
 src/lib/evas/filters/evas_filter_mask.c   | 3 ---
 src/lib/evas/filters/evas_filter_parser.c | 2 +-
 3 files changed, 1 insertion(+), 11 deletions(-)

diff --git a/src/lib/evas/filters/evas_filter_bump.c 
b/src/lib/evas/filters/evas_filter_bump.c
index 0c1bb94..a269145 100644
--- a/src/lib/evas/filters/evas_filter_bump.c
+++ b/src/lib/evas/filters/evas_filter_bump.c
@@ -1,17 +1,10 @@
 /* Simple bump map algorithms for the software engine */
 
-#include "evas_common_private.h"
-#include "evas_private.h"
-#include "evas_filter.h"
 #include "evas_filter_private.h"
 #include "evas_blend_private.h"
 
 #include 
 
-#undef ENFN
-#undef ENDT
-#define ENFN cmd->ctx->evas->engine.func
-#define ENDT cmd->ctx->evas->engine.data.output
 
 #ifdef CLAMP
 # undef CLAMP
diff --git a/src/lib/evas/filters/evas_filter_mask.c 
b/src/lib/evas/filters/evas_filter_mask.c
index 61a31e3..96e8c54 100644
--- a/src/lib/evas/filters/evas_filter_mask.c
+++ b/src/lib/evas/filters/evas_filter_mask.c
@@ -1,8 +1,5 @@
 /* Implementation of some masking functions for the software engine */
 
-#include "evas_common_private.h"
-#include "evas_private.h"
-#include "evas_filter.h"
 #include "evas_filter_private.h"
 #include "evas_blend_private.h"
 
diff --git a/src/lib/evas/filters/evas_filter_parser.c 
b/src/lib/evas/filters/evas_filter_parser.c
index 204bba4..ed0c4dd 100644
--- a/src/lib/evas/filters/evas_filter_parser.c
+++ b/src/lib/evas/filters/evas_filter_parser.c
@@ -846,7 +846,7 @@ static Buffer *
 _buffer_get(Evas_Filter_Program *pgm, const char *name)
 {
Buffer *buf;
-   Eo *source;
+   Evas_Object *source;
 
EINA_SAFETY_ON_NULL_RETURN_VAL(pgm, NULL);
EINA_SAFETY_ON_NULL_RETURN_VAL(name, NULL);

-- 




[EGIT] [core/efl] master 03/06: Evas filters: Rename RGBA_Image::mask.data into image.data8

2014-03-03 Thread Jean-Philippe Andre
jpeg pushed a commit to branch master.

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

commit ac8140ccd145a55a600d7c6c9f20ee2cdb01d13e
Author: Jean-Philippe Andre 
Date:   Tue Mar 4 12:05:44 2014 +0900

Evas filters: Rename RGBA_Image::mask.data into image.data8

The structure should not be changed, despite the union modification.

I am renaming for consistency with older branches that had a mask
field in RGBA_Image. Also, the mask.data or data8 is really just
a way to avoid casting between DATA8 and DATA32 (and it shows
clearly what kind of data you are dealing with).
---
 src/lib/evas/common/evas_font_compress.c |  2 +-
 src/lib/evas/common/evas_image_data.c|  6 +++---
 src/lib/evas/filters/evas_filter.c   |  2 +-
 src/lib/evas/filters/evas_filter_blend.c | 12 ++--
 src/lib/evas/filters/evas_filter_blur.c  | 24 
 src/lib/evas/filters/evas_filter_bump.c  | 10 +-
 src/lib/evas/filters/evas_filter_curve.c |  4 ++--
 src/lib/evas/filters/evas_filter_displace.c  |  4 ++--
 src/lib/evas/filters/evas_filter_mask.c  | 16 
 src/lib/evas/filters/evas_filter_transform.c |  4 ++--
 src/lib/evas/include/evas_common_private.h   | 22 --
 11 files changed, 50 insertions(+), 56 deletions(-)

diff --git a/src/lib/evas/common/evas_font_compress.c 
b/src/lib/evas/common/evas_font_compress.c
index 1c615f9..7701cf4 100644
--- a/src/lib/evas/common/evas_font_compress.c
+++ b/src/lib/evas/common/evas_font_compress.c
@@ -495,7 +495,7 @@ evas_common_font_glyph_draw(RGBA_Font_Glyph *fg,
 // FIXME: Font draw not optimized for Alpha targets! SLOW!
 // This is not pretty :)
 
-DATA8 *dst8 = dst_image->mask.data + x + (y * dst_pitch);
+DATA8 *dst8 = dst_image->image.data8 + x + (y * dst_pitch);
 Alpha_Gfx_Func func;
 DATA8 *src8;
 int row;
diff --git a/src/lib/evas/common/evas_image_data.c 
b/src/lib/evas/common/evas_image_data.c
index 8971867..e589188 100644
--- a/src/lib/evas/common/evas_image_data.c
+++ b/src/lib/evas/common/evas_image_data.c
@@ -36,8 +36,8 @@ evas_common_rgba_image_from_data(Image_Entry* ie_dst, int w, 
int h, DATA32 *imag
   case EVAS_COLORSPACE_GRY8:
 dst->cache_entry.w = w;
 dst->cache_entry.h = h;
-dst->mask.data = (DATA8 *) image_data;
-dst->mask.no_free = 1;
+dst->image.data8 = (DATA8 *) image_data;
+dst->image.no_free = 1;
 dst->cache_entry.flags.alpha = 1;
 break;
   default:
@@ -75,7 +75,7 @@ evas_common_rgba_image_from_copied_data(Image_Entry* ie_dst, 
int w, int h, DATA3
   case EVAS_COLORSPACE_GRY8:
 dst->cache_entry.flags.alpha = 1;
 if (image_data)
-  memcpy(dst->mask.data, image_data, w * h * sizeof(DATA8));
+  memcpy(dst->image.data8, image_data, w * h * sizeof(DATA8));
 break;
   default:
  abort();
diff --git a/src/lib/evas/filters/evas_filter.c 
b/src/lib/evas/filters/evas_filter.c
index 62b0198..816c30b 100644
--- a/src/lib/evas/filters/evas_filter.c
+++ b/src/lib/evas/filters/evas_filter.c
@@ -1360,7 +1360,7 @@ _fill_cpu(Evas_Filter_Command *cmd)
int step = fb->alpha_only ? sizeof(DATA8) : sizeof(DATA32);
int x = MAX(0, cmd->draw.clip.x);
int y = MAX(0, cmd->draw.clip.y);
-   DATA8 *ptr = ((RGBA_Image *) fb->backing)->mask.data;
+   DATA8 *ptr = ((RGBA_Image *) fb->backing)->image.data8;
int w, h, k, j;
 
if (!cmd->draw.clip_mode_lrtb)
diff --git a/src/lib/evas/filters/evas_filter_blend.c 
b/src/lib/evas/filters/evas_filter_blend.c
index 66e8caf..61b4ef3 100644
--- a/src/lib/evas/filters/evas_filter_blend.c
+++ b/src/lib/evas/filters/evas_filter_blend.c
@@ -44,8 +44,8 @@ _image_draw_cpu_alpha2alpha(void *data EINA_UNUSED, void 
*context,
struct Alpha_Blend_Draw_Context *dc = context;
RGBA_Image *src = image;
RGBA_Image *dst = surface;
-   DATA8* srcdata = src->mask.data;
-   DATA8* dstdata = dst->mask.data;
+   DATA8* srcdata = src->image.data8;
+   DATA8* dstdata = dst->image.data8;
Alpha_Gfx_Func func;
int y, sw, dw;
 
@@ -80,7 +80,7 @@ _image_draw_cpu_alpha2rgba(void *data EINA_UNUSED, void 
*context,
struct Alpha_Blend_Draw_Context *dc = context;
RGBA_Image *src = image;
RGBA_Image *dst = surface;
-   DATA8* srcdata = src->mask.data;
+   DATA8* srcdata = src->image.data8;
DATA32* dstdata = dst->image.data;
RGBA_Gfx_Func func;
int y, sw, dw;
@@ -118,8 +118,8 @@ _filter_blend_cpu_generic_do(Evas_Filter_Command *cmd,
out = cmd->output->backing;
EINA_SAFETY_ON_NULL_RETURN_VAL(in, EINA_FALSE);
EINA_SAFETY_ON_NULL_RETURN_VAL(out, EINA_FALSE);
-   EINA_SAFETY_ON_NULL_RETURN_VAL(in->mask.data, EINA_FALSE);
-   EINA_SAFETY_ON_NULL_RETURN_VAL(o

[EGIT] [core/efl] master 02/06: Evas filters: Fix a typo (wrong value checked)

2014-03-03 Thread Jean-Philippe Andre
jpeg pushed a commit to branch master.

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

commit 993bd965edddc85a0802a52edbdbe462c37fad26
Author: Jean-Philippe Andre 
Date:   Tue Mar 4 11:50:35 2014 +0900

Evas filters: Fix a typo (wrong value checked)

This was all a bad copy and paste :)
---
 src/lib/evas/canvas/evas_object_text.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/lib/evas/canvas/evas_object_text.c 
b/src/lib/evas/canvas/evas_object_text.c
index 0031218..2ffd734 100644
--- a/src/lib/evas/canvas/evas_object_text.c
+++ b/src/lib/evas/canvas/evas_object_text.c
@@ -2130,7 +2130,7 @@ evas_object_text_render(Evas_Object *eo_obj EINA_UNUSED,
 * remotely similar to its final form. You've been warned :)
 */
 
-   if (!o->cur.filter.invalid && (o->cur.filter.chain || 
o->cur.filter.invalid))
+   if (!o->cur.filter.invalid && (o->cur.filter.chain || o->cur.filter.code))
  {
 int X, Y, W, H;
 Evas_Filter_Context *filter;

-- 




[EGIT] [core/efl] efl-1.9 04/04: Evas filters: Avoid CRI message when using the GL engine

2014-03-03 Thread Jean-Philippe ANDRE
jpeg pushed a commit to branch efl-1.9.

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

commit 791c0ca1aff3280dd88ec30cf723f23fb3300068
Author: Jean-Philippe ANDRE 
Date:   Sun Mar 2 14:55:42 2014 +0900

Evas filters: Avoid CRI message when using the GL engine

A CRItical message was always displayed when setting a filter
on a text object, saying that proxy rendering is not supported on GL.

Reduce CRI to ERR and skip proxy rendering altogether if there are
no proxy sources.

This @fix needs to be backported.

Thanks zmike for reporting this.

Signed-off-by: Jean-Philippe Andre 
---
 src/lib/evas/filters/evas_filter.c | 3 ++-
 src/lib/evas/filters/evas_filter_parser.c  | 1 +
 src/lib/evas/filters/evas_filter_private.h | 1 +
 3 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/lib/evas/filters/evas_filter.c 
b/src/lib/evas/filters/evas_filter.c
index 3de3af5..5a81f89 100644
--- a/src/lib/evas/filters/evas_filter.c
+++ b/src/lib/evas/filters/evas_filter.c
@@ -223,10 +223,11 @@ evas_filter_context_proxy_render_all(Evas_Filter_Context 
*ctx, Eo *eo_obj,
 
obj = eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS);
 
+   if (!ctx->has_proxies) return;
if (ctx->gl_engine)
  {
 // FIXME: We need to call glReadPixels (yeah, no other way around...)
-CRI("Proxy subrender is not supported in the GL engine (yet)");
+ERR("Proxy subrender is not supported in the GL engine (yet)");
 return;
  }
 
diff --git a/src/lib/evas/filters/evas_filter_parser.c 
b/src/lib/evas/filters/evas_filter_parser.c
index 68186ee..204bba4 100644
--- a/src/lib/evas/filters/evas_filter_parser.c
+++ b/src/lib/evas/filters/evas_filter_parser.c
@@ -2348,6 +2348,7 @@ evas_filter_context_program_use(Evas_Filter_Context *ctx,
  fb->proxy = pb->eo_proxy;
  fb->source = pb->eo_source;
  fb->source_name = eina_stringshare_ref(pb->name);
+ fb->ctx->has_proxies = EINA_TRUE;
   }
  }
 
diff --git a/src/lib/evas/filters/evas_filter_private.h 
b/src/lib/evas/filters/evas_filter_private.h
index c9caa66..bf610a8 100644
--- a/src/lib/evas/filters/evas_filter_private.h
+++ b/src/lib/evas/filters/evas_filter_private.h
@@ -70,6 +70,7 @@ struct _Evas_Filter_Context
Eina_Bool async : 1;
Eina_Bool gl_engine : 1;
Eina_Bool running : 1;
+   Eina_Bool has_proxies : 1;
 };
 
 struct _Evas_Filter_Command

-- 




[EGIT] [core/efl] efl-1.9 01/04: Evas filters: fix black squares with the GL engine

2014-03-03 Thread Jean-Philippe ANDRE
jpeg pushed a commit to branch efl-1.9.

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

commit 3e65e6d4dd0f15be1bf0903a31009943e6e69798
Author: Jean-Philippe ANDRE 
Date:   Sun Mar 2 19:08:22 2014 +0900

Evas filters: fix black squares with the GL engine

If a text object changes regularily, there might be cases where
the object will be rendered as a simple black rectangle for just
one frame.

It seems that the previous output buffer is deleted before being
actually rendered on screen. This patch will delay the deletion
of the previous buffer until the current one has been rendered
to the target surface.

And again, thanks zmike for reporting.

@fix

Signed-off-by: Jean-Philippe Andre 
---
 src/lib/evas/canvas/evas_object_text.c |  2 +-
 src/lib/evas/filters/evas_filter.c | 13 -
 src/lib/evas/filters/evas_filter_private.h |  1 +
 3 files changed, 14 insertions(+), 2 deletions(-)

diff --git a/src/lib/evas/canvas/evas_object_text.c 
b/src/lib/evas/canvas/evas_object_text.c
index e99ab4b..bc11ae8 100644
--- a/src/lib/evas/canvas/evas_object_text.c
+++ b/src/lib/evas/canvas/evas_object_text.c
@@ -2217,7 +2217,7 @@ evas_object_text_render(Evas_Object *eo_obj EINA_UNUSED,
 // Proxies
 evas_filter_context_proxy_render_all(filter, eo_obj, EINA_FALSE);
 
-// Context: FIXME it should be a sw context only
+// Draw Context
 filter_ctx = ENFN->context_new(ENDT);
 ENFN->context_color_set(ENDT, filter_ctx, 255, 255, 255, 255);
 
diff --git a/src/lib/evas/filters/evas_filter.c 
b/src/lib/evas/filters/evas_filter.c
index 4c2d9dd..316f88b 100644
--- a/src/lib/evas/filters/evas_filter.c
+++ b/src/lib/evas/filters/evas_filter.c
@@ -680,7 +680,8 @@ evas_filter_buffer_backing_release(Evas_Filter_Context 
*ctx, void *stolen_buffer
if (ctx->async)
  evas_unref_queue_image_put(ctx->evas, ie);
else if (ctx->gl_engine)
- ENFN->image_free(ENDT, stolen_buffer);
+ ctx->post_run.buffers_to_free =
+   eina_list_append(ctx->post_run.buffers_to_free, stolen_buffer);
else
  _backing_free(ctx, ie);
 
@@ -1690,7 +1691,17 @@ static void
 _filter_thread_run_cb(void *data)
 {
Evas_Filter_Context *ctx = data;
+   void *buffer;
+
+   // TODO: Add return value check and call error cb
_filter_chain_run(ctx);
+
+   EINA_LIST_FREE(ctx->post_run.buffers_to_free, buffer)
+ {
+if (ctx->gl_engine)
+  ENFN->image_free(ENDT, buffer);
+ }
+
if (ctx->post_run.cb)
  ctx->post_run.cb(ctx, ctx->post_run.data);
 }
diff --git a/src/lib/evas/filters/evas_filter_private.h 
b/src/lib/evas/filters/evas_filter_private.h
index 544d767..baf53c2 100644
--- a/src/lib/evas/filters/evas_filter_private.h
+++ b/src/lib/evas/filters/evas_filter_private.h
@@ -55,6 +55,7 @@ struct _Evas_Filter_Context
   /** Post-processing callback. The context can be safely destroyed here. 
*/
   Evas_Filter_Cb cb;
   void *data;
+  Eina_List *buffers_to_free; // Some buffers should be queued for deletion
} post_run;
 
struct

-- 




[EGIT] [core/efl] efl-1.9 03/04: Evas filters: fix clip to target calculation

2014-03-03 Thread Jean-Philippe Andre
jpeg pushed a commit to branch efl-1.9.

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

commit 9ca37bf4d467d60ca5594e6cfa4d35838684821e
Author: Jean-Philippe Andre 
Date:   Mon Mar 3 17:45:15 2014 +0900

Evas filters: fix clip to target calculation

It was possible to keep negative values for dx,dy which would
then draw pixels out of bounds (= crash).

Make check crashed after the previous commit.

@fix
---
 src/lib/evas/filters/evas_filter.c | 6 ++
 1 file changed, 6 insertions(+)

diff --git a/src/lib/evas/filters/evas_filter.c 
b/src/lib/evas/filters/evas_filter.c
index dcfe36a..3de3af5 100644
--- a/src/lib/evas/filters/evas_filter.c
+++ b/src/lib/evas/filters/evas_filter.c
@@ -1553,6 +1553,7 @@ _clip_to_target(int *sx /* OUT */, int *sy /* OUT */, int 
sw, int sh,
 {
if (ox > 0)
  {
+(*sx) = 0;
 (*dx) = ox;
 (*cols) = sw;
 if (((*dx) + (*cols)) > (dw))
@@ -1560,18 +1561,21 @@ _clip_to_target(int *sx /* OUT */, int *sy /* OUT */, 
int sw, int sh,
  }
else if (ox < 0)
  {
+(*dx) = 0;
 (*sx) = (-ox);
 (*cols) = sw - (*sx);
 if ((*cols) > dw) (*cols) = dw;
  }
else
  {
+(*dx) = 0;
 (*cols) = sw;
 if ((*cols) > dw) (*cols) = dw;
  }
 
if (oy > 0)
  {
+(*sy) = 0;
 (*dy) = oy;
 (*rows) = sh;
 if (((*dy) + (*rows)) > (dh))
@@ -1579,12 +1583,14 @@ _clip_to_target(int *sx /* OUT */, int *sy /* OUT */, 
int sw, int sh,
  }
else if (oy < 0)
  {
+(*dy) = 0;
 (*sy) = (-oy);
 (*rows) = sh - (*sy);
 if ((*rows) > dh) (*rows) = dh;
  }
else
  {
+(*dy) = 0;
 (*rows) = sh;
 if ((*rows) > dh) (*rows) = dh;
  }

-- 




[EGIT] [core/efl] efl-1.9 02/04: Evas filters: fix random cases of 'dancing text'

2014-03-03 Thread Jean-Philippe ANDRE
jpeg pushed a commit to branch efl-1.9.

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

commit 9c096eac83428e405d48cca4124582455c971534
Author: Jean-Philippe ANDRE 
Date:   Sun Mar 2 18:39:08 2014 +0900

Evas filters: fix random cases of 'dancing text'

In some situations, text with filters would be rendered in an invalid
position (somewhere too high).
I am not entirely sure of the reason why the original code with BLEND
doesn't work, but this new version is simpler as GL and SW have more
similar behaviours:

- render text to our 'output' buffer
- draw this buffer as an image onto the set target

Thanks zmike for reporting the issue.
And thanks A LOT for using the filters :D

@fix
    
Signed-off-by: Jean-Philippe Andre 
---
 src/lib/evas/filters/evas_filter.c | 77 ++
 src/lib/evas/filters/evas_filter_private.h |  2 +
 2 files changed, 48 insertions(+), 31 deletions(-)

diff --git a/src/lib/evas/filters/evas_filter.c 
b/src/lib/evas/filters/evas_filter.c
index 316f88b..dcfe36a 100644
--- a/src/lib/evas/filters/evas_filter.c
+++ b/src/lib/evas/filters/evas_filter.c
@@ -1420,25 +1420,20 @@ evas_filter_target_set(Evas_Filter_Context *ctx, void 
*draw_context,
 {
EINA_SAFETY_ON_NULL_RETURN_VAL(ctx, EINA_FALSE);
 
-   if (!ctx->gl_engine)
- {
-ctx->target.bufid = evas_filter_buffer_image_new(ctx, surface);
-evas_filter_command_blend_add(ctx, draw_context,
-  EVAS_FILTER_BUFFER_OUTPUT_ID,
-  ctx->target.bufid,
-  x, y, EVAS_FILTER_FILL_MODE_NONE);
- }
-   else
+   ctx->target.bufid = evas_filter_buffer_image_new(ctx, surface);
+   ctx->target.x = x;
+   ctx->target.y = y;
+   ctx->target.clip_use = ENFN->context_clip_get
+ (ENDT, draw_context, &ctx->target.cx, &ctx->target.cy,
+  &ctx->target.cw, &ctx->target.ch);
+
+   if (ctx->gl_engine)
  {
 // Since GL has sync rendering, draw_context is safe to keep around
 Evas_Filter_Buffer *target, *image;
 RGBA_Image *im;
 
-ctx->target.bufid = evas_filter_buffer_image_new(ctx, surface);
 ctx->target.context = draw_context;
-ctx->target.x = x;
-ctx->target.y = y;
-
 target = _filter_buffer_get(ctx, ctx->target.bufid);
 target->glimage = target->backing;
 target->backing = NULL;
@@ -1456,32 +1451,52 @@ static Eina_Bool
 _filter_target_render(Evas_Filter_Context *ctx)
 {
Evas_Filter_Buffer *src, *dst;
-   Eina_Bool ok;
-
-   /* FIXME: This is some hackish hook to send the final buffer on the screen
-* Only used for OpenGL now, since evas_filter_target_set() adds a blend
-* command in case of pure software rendering.
-*/
+   void *drawctx, *image, *surface;
+   int cx, cy, cw, ch;
+   Eina_Bool use_clip = EINA_FALSE;
 
-   if (!ctx->gl_engine) return EINA_FALSE;
EINA_SAFETY_ON_FALSE_RETURN_VAL(ctx->target.bufid, EINA_FALSE);
 
src = _filter_buffer_get(ctx, EVAS_FILTER_BUFFER_OUTPUT_ID);
-   if (!src) return EINA_FALSE;
-
dst = _filter_buffer_get(ctx, ctx->target.bufid);
-   if (!dst) return EINA_FALSE;
+   EINA_SAFETY_ON_NULL_RETURN_VAL(src, EINA_FALSE);
+   EINA_SAFETY_ON_NULL_RETURN_VAL(dst, EINA_FALSE);
 
-   EINA_SAFETY_ON_NULL_RETURN_VAL(src->glimage, EINA_FALSE);
-   EINA_SAFETY_ON_NULL_RETURN_VAL(dst->glimage, EINA_FALSE);
+   if (!ctx->gl_engine)
+ {
+drawctx = ENFN->context_new(ENDT);
+surface = dst->backing;
+image = src->backing;
+ }
+   else
+ {
+drawctx = ctx->target.context;
+surface = dst->glimage;
+image = src->glimage;
+ }
+   EINA_SAFETY_ON_NULL_RETURN_VAL(image, EINA_FALSE);
+   EINA_SAFETY_ON_NULL_RETURN_VAL(surface, EINA_FALSE);
 
-   ok = ENFN->image_draw(ENDT, ctx->target.context,
- dst->glimage, src->glimage,
- 0, 0, src->w, src->h,
- ctx->target.x, ctx->target.y, src->w, src->h,
- EINA_TRUE, EINA_FALSE);
+   if (ctx->target.clip_use)
+ {
+use_clip = ENFN->context_clip_get(ENDT, drawctx, &cx, &cy, &cw, &ch);
+ENFN->context_clip_set(ENDT, drawctx, ctx->target.cx, ctx->target.cy,
+   ctx->target.cw, ctx->target.ch);
+ }
 
-   return ok;
+   ENFN->image_draw(ENDT, drawctx, surface, image,
+0, 0, src->w, src->h,
+ctx->target.x, ctx->target.y, src->w, src->h,
+EINA_TRUE, EINA_FALSE);
+
+   if (!ctx->gl_engine)
+ ENFN->context_free(ENDT, drawctx);

[EGIT] [core/efl] master 06/08: Evas filters: Avoid potential memory leaks

2014-03-03 Thread Jean-Philippe Andre
jpeg pushed a commit to branch master.

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

commit c783b8d4502a524e8081277fd9180ea83dc9796b
Author: Jean-Philippe Andre 
Date:   Mon Mar 3 16:22:40 2014 +0900

Evas filters: Avoid potential memory leaks

Properly free the buffers when they are not in the current context list.
---
 src/lib/evas/filters/evas_filter.c | 8 ++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/src/lib/evas/filters/evas_filter.c 
b/src/lib/evas/filters/evas_filter.c
index 302d837..894f8ef 100644
--- a/src/lib/evas/filters/evas_filter.c
+++ b/src/lib/evas/filters/evas_filter.c
@@ -113,8 +113,11 @@ _filter_buffer_backing_free(Evas_Filter_Buffer *fb)
 
if (fb->stolen)
  {
-fb->delete_me = EINA_TRUE;
-return;
+if (eina_list_data_find(fb->ctx->buffers, fb))
+  {
+ fb->delete_me = EINA_TRUE;
+ return;
+  }
  }
 
INF("Free backing of buffer %d fb @ %p backing @ %p alloc %d", fb->id, fb, 
fb->backing, fb->allocated);
@@ -671,6 +674,7 @@ evas_filter_buffer_backing_release(Evas_Filter_Context 
*ctx, void *stolen_buffer
  fb->stolen = EINA_FALSE;
  if (fb->delete_me)
{
+  ctx->buffers = eina_list_remove_list(ctx->buffers, li);
   ENFN->image_free(ENDT, stolen_buffer);
   free(fb);
}

-- 




[EGIT] [core/efl] master 02/08: Evas filters: Improve RGBA to alpha conversion (visual quality)

2014-03-03 Thread Jean-Philippe Andre
jpeg pushed a commit to branch master.

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

commit a9558235f618ba62d9827407f15311c8bef04bec
Author: Jean-Philippe Andre 
Date:   Mon Feb 24 13:54:30 2014 +0900

Evas filters: Improve RGBA to alpha conversion (visual quality)

Add weights to the R,G,B components when converting to greyscale.
The weights are those used in the RGB to YCbCr conversion formula.
---
 src/lib/evas/filters/evas_filter_blend.c | 19 ++-
 1 file changed, 14 insertions(+), 5 deletions(-)

diff --git a/src/lib/evas/filters/evas_filter_blend.c 
b/src/lib/evas/filters/evas_filter_blend.c
index 038eb5f..66e8caf 100644
--- a/src/lib/evas/filters/evas_filter_blend.c
+++ b/src/lib/evas/filters/evas_filter_blend.c
@@ -2,6 +2,9 @@
 #include "evas_filter_private.h"
 #include "evas_blend_private.h"
 
+// Use a better formula than R+G+B for rgba to alpha conversion (RGB to YCbCr)
+#define RGBA2ALPHA_WEIGHTED 1
+
 #if DIV_USING_BITSHIFT
 static int
 _smallest_pow2_larger_than(int val)
@@ -177,7 +180,16 @@ _image_draw_cpu_rgba2alpha(void *data EINA_UNUSED, void 
*context EINA_UNUSED,
DATA32* srcdata = src->image.data;
DATA8* dstdata = dst->mask.data;
int x, y, sw, dw;
-   DEFINE_DIVIDER(3);
+#if RGBA2ALPHA_WEIGHTED
+   const int WR = 299;
+   const int WG = 587;
+   const int WB = 114;
+#else
+   const int WR = 1;
+   const int WG = 1;
+   const int WB = 1;
+#endif
+   DEFINE_DIVIDER(WR + WG + WB);
 
EINA_SAFETY_ON_FALSE_RETURN_VAL((src_w == dst_w) && (src_h == dst_h), 
EINA_FALSE);
 
@@ -191,10 +203,7 @@ _image_draw_cpu_rgba2alpha(void *data EINA_UNUSED, void 
*context EINA_UNUSED,
 DATA32 *s = srcdata + src_x;
 DATA8 *d = dstdata + dst_x;
 for (x = src_w; x; x--, d++, s++)
-  {
- // TODO: Add weights like in YUV <--> RGB?
- *d = DIVIDE(R_VAL(s) + G_VAL(s) + B_VAL(s));
-  }
+  *d = DIVIDE((R_VAL(s) * WR) + (G_VAL(s) * WG) + (B_VAL(s) * WB));
 srcdata += sw;
 dstdata += dw;
  }

-- 




[EGIT] [core/efl] master 07/08: Evas filters: Fallback to normal rendering in case of error

2014-03-03 Thread Jean-Philippe Andre
jpeg pushed a commit to branch master.

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

commit e05885e0e3a54d5e0b9177645238835766d8cca1
Author: Jean-Philippe Andre 
Date:   Mon Mar 3 16:58:18 2014 +0900

Evas filters: Fallback to normal rendering in case of error

If the filters fail to render at runtime (that is, parsing went fine
but a command failed to run properly), fallback to normal rendering.
This should prevent text from disappearing when using proxies and
the OpenGL engine (for now).
---
 src/lib/evas/canvas/evas_object_text.c | 17 +
 src/lib/evas/filters/evas_filter.c |  2 +-
 2 files changed, 14 insertions(+), 5 deletions(-)

diff --git a/src/lib/evas/canvas/evas_object_text.c 
b/src/lib/evas/canvas/evas_object_text.c
index bc11ae8..0031218 100644
--- a/src/lib/evas/canvas/evas_object_text.c
+++ b/src/lib/evas/canvas/evas_object_text.c
@@ -2130,7 +2130,7 @@ evas_object_text_render(Evas_Object *eo_obj EINA_UNUSED,
 * remotely similar to its final form. You've been warned :)
 */
 
-   if (o->cur.filter.chain || (o->cur.filter.code && !o->cur.filter.invalid))
+   if (!o->cur.filter.invalid && (o->cur.filter.chain || 
o->cur.filter.invalid))
  {
 int X, Y, W, H;
 Evas_Filter_Context *filter;
@@ -2245,11 +2245,20 @@ evas_object_text_render(Evas_Object *eo_obj EINA_UNUSED,
 
 // Add post-run callback and run filter
 evas_filter_context_autodestroy(filter);
-evas_filter_run(filter);
+ok = evas_filter_run(filter);
 o->cur.filter.changed = EINA_FALSE;
 
-DBG("Effect rendering done.");
-return;
+if (ok)
+  {
+ DBG("Effect rendering done.");
+ return;
+  }
+else
+  {
+ ERR("Rendering failed");
+ o->cur.filter.invalid = EINA_TRUE;
+ goto normal_render;
+  }
  }
 
/* End of the EXPERIMENTAL code */
diff --git a/src/lib/evas/filters/evas_filter.c 
b/src/lib/evas/filters/evas_filter.c
index 894f8ef..2dce45c 100644
--- a/src/lib/evas/filters/evas_filter.c
+++ b/src/lib/evas/filters/evas_filter.c
@@ -1687,7 +1687,7 @@ static Eina_Bool
 _filter_chain_run(Evas_Filter_Context *ctx)
 {
Evas_Filter_Command *cmd;
-   Eina_Bool ok = EINA_TRUE;
+   Eina_Bool ok = EINA_FALSE;
 
ctx->running = EINA_TRUE;
EINA_INLIST_FOREACH(ctx->commands, cmd)

-- 




[EGIT] [core/efl] master 01/08: Evas filters: Implement mapped blend for alpha buffers

2014-03-03 Thread Jean-Philippe Andre
jpeg pushed a commit to branch master.

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

commit 7a7738e9bbb751db5b262cc0c0ef20c9671887c1
Author: Jean-Philippe Andre 
Date:   Fri Feb 21 16:46:04 2014 +0900

Evas filters: Implement mapped blend for alpha buffers

Allow repeat fillmode in blend() for:
alpha --> alpha
alpha --> rgba
rgba --> alpha

Alpha scaling is not implemented yet, but it is not actually
required. Indeed, only proxies can have a different size and
proxies are RGBA images, not alpha.

Alpha scaling may or may not become a requirement in the future,
or for other purposes, but not yet.
---
 src/lib/evas/filters/evas_filter_blend.c | 349 +++
 1 file changed, 168 insertions(+), 181 deletions(-)

diff --git a/src/lib/evas/filters/evas_filter_blend.c 
b/src/lib/evas/filters/evas_filter_blend.c
index 95e4887..038eb5f 100644
--- a/src/lib/evas/filters/evas_filter_blend.c
+++ b/src/lib/evas/filters/evas_filter_blend.c
@@ -24,59 +24,178 @@ _smallest_pow2_larger_than(int val)
 typedef Eina_Bool (*image_draw_func) (void *data, void *context, void 
*surface, void *image, 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 void _mapped_blend_cpu(void *data, void *drawctx, RGBA_Image *in, 
RGBA_Image *out, Evas_Filter_Fill_Mode fillmode, int sx, int sy, int sw, int 
sh, int dx, int dy, int dw, int dh, image_draw_func image_draw);
 
+struct Alpha_Blend_Draw_Context
+{
+   int render_op;
+   DATA32 color;
+};
+
 static Eina_Bool
-_filter_blend_cpu_alpha(Evas_Filter_Command *cmd)
+_image_draw_cpu_alpha2alpha(void *data EINA_UNUSED, void *context,
+void *surface, void *image,
+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_UNUSED,
+Eina_Bool do_async EINA_UNUSED)
 {
-   RGBA_Image *in, *out;
+   struct Alpha_Blend_Draw_Context *dc = context;
+   RGBA_Image *src = image;
+   RGBA_Image *dst = surface;
+   DATA8* srcdata = src->mask.data;
+   DATA8* dstdata = dst->mask.data;
Alpha_Gfx_Func func;
-   DATA8 *maskdata, *dstdata;
-   int sw, sh, dw, dh, ox, oy, sx = 0, sy = 0, dx = 0, dy = 0, rows, cols, y;
+   int y, sw, dw;
 
-   /*
-* NOTE: Alpha to alpha blending does not support stretching operations
-* yet, because we don't have any scaling functions for alpha buffers.
-* Also, I'm not going to implement it by converting to RGBA either.
-*/
+   EINA_SAFETY_ON_FALSE_RETURN_VAL((src_w == dst_w) && (src_h == dst_h), 
EINA_FALSE);
+
+   func = evas_common_alpha_func_get(dc->render_op);
+   EINA_SAFETY_ON_NULL_RETURN_VAL(func, EINA_FALSE);
+
+   sw = src->cache_entry.w;
+   dw = dst->cache_entry.w;
+
+   srcdata += src_y * sw;
+   dstdata += dst_y * dw;
+   for (y = src_h; y; y--)
+ {
+func(srcdata + src_x, dstdata + dst_x, src_w);
+srcdata += sw;
+dstdata += dw;
+ }
+
+   return EINA_TRUE;
+}
+
+static Eina_Bool
+_image_draw_cpu_alpha2rgba(void *data EINA_UNUSED, void *context,
+   void *surface, void *image,
+   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_UNUSED,
+   Eina_Bool do_async EINA_UNUSED)
+{
+   struct Alpha_Blend_Draw_Context *dc = context;
+   RGBA_Image *src = image;
+   RGBA_Image *dst = surface;
+   DATA8* srcdata = src->mask.data;
+   DATA32* dstdata = dst->image.data;
+   RGBA_Gfx_Func func;
+   int y, sw, dw;
+
+   EINA_SAFETY_ON_FALSE_RETURN_VAL((src_w == dst_w) && (src_h == dst_h), 
EINA_FALSE);
+
+   func = evas_common_gfx_func_composite_mask_color_span_get
+ (dc->color, surface, 1, dc->render_op);
+   EINA_SAFETY_ON_NULL_RETURN_VAL(func, EINA_FALSE);
 
-   // TODO: Call _mapped_blend_cpu to implement repeat fill mode.
-   if (cmd->draw.fillmode != EVAS_FILTER_FILL_MODE_NONE)
+   sw = src->cache_entry.w;
+   dw = dst->cache_entry.w;
+
+   srcdata += src_y * sw;
+   dstdata += dst_y * dw;
+   for (y = src_h; y; y--)
  {
-ERR("Fill modes are not implemented for Alpha --> Alpha blending");
-return EINA_FALSE;
+func(NULL, srcdata + src_x, dc->color, dstdata + dst_x, src_w);
+srcdata += sw;
+dstdata += dw;
  }
 
-   func = evas_common_alpha_func_get(cmd->draw.render_op);
-   if (!func)
- return EINA_FALSE;
+   return EINA_TRUE;
+}
+
+static Eina_Bool
+_filter_blend_cpu_generic_do(Evas_Filter_Command *cmd,
+ image_draw_func image_draw)
+{
+   RGBA_Image *in, *out;
+   int sw, sh, dx, dy, dw, d

[EGIT] [core/efl] master 04/08: Evas filters: fix black squares with the GL engine

2014-03-03 Thread Jean-Philippe ANDRE
jpeg pushed a commit to branch master.

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

commit 83746e56298337daa856524d30643c9d417bd437
Author: Jean-Philippe ANDRE 
Date:   Sun Mar 2 19:08:22 2014 +0900

Evas filters: fix black squares with the GL engine

If a text object changes regularily, there might be cases where
the object will be rendered as a simple black rectangle for just
one frame.

It seems that the previous output buffer is deleted before being
actually rendered on screen. This patch will delay the deletion
of the previous buffer until the current one has been rendered
to the target surface.

And again, thanks zmike for reporting.

@fix

Signed-off-by: Jean-Philippe Andre 
---
 src/lib/evas/canvas/evas_object_text.c |  2 +-
 src/lib/evas/filters/evas_filter.c | 13 -
 src/lib/evas/filters/evas_filter_private.h |  1 +
 3 files changed, 14 insertions(+), 2 deletions(-)

diff --git a/src/lib/evas/canvas/evas_object_text.c 
b/src/lib/evas/canvas/evas_object_text.c
index e99ab4b..bc11ae8 100644
--- a/src/lib/evas/canvas/evas_object_text.c
+++ b/src/lib/evas/canvas/evas_object_text.c
@@ -2217,7 +2217,7 @@ evas_object_text_render(Evas_Object *eo_obj EINA_UNUSED,
 // Proxies
 evas_filter_context_proxy_render_all(filter, eo_obj, EINA_FALSE);
 
-// Context: FIXME it should be a sw context only
+// Draw Context
 filter_ctx = ENFN->context_new(ENDT);
 ENFN->context_color_set(ENDT, filter_ctx, 255, 255, 255, 255);
 
diff --git a/src/lib/evas/filters/evas_filter.c 
b/src/lib/evas/filters/evas_filter.c
index b3385ba..97b3ea1 100644
--- a/src/lib/evas/filters/evas_filter.c
+++ b/src/lib/evas/filters/evas_filter.c
@@ -681,7 +681,8 @@ evas_filter_buffer_backing_release(Evas_Filter_Context 
*ctx, void *stolen_buffer
if (ctx->async)
  evas_unref_queue_image_put(ctx->evas, ie);
else if (ctx->gl_engine)
- ENFN->image_free(ENDT, stolen_buffer);
+ ctx->post_run.buffers_to_free =
+   eina_list_append(ctx->post_run.buffers_to_free, stolen_buffer);
else
  _backing_free(ctx, ie);
 
@@ -1691,7 +1692,17 @@ static void
 _filter_thread_run_cb(void *data)
 {
Evas_Filter_Context *ctx = data;
+   void *buffer;
+
+   // TODO: Add return value check and call error cb
_filter_chain_run(ctx);
+
+   EINA_LIST_FREE(ctx->post_run.buffers_to_free, buffer)
+ {
+if (ctx->gl_engine)
+  ENFN->image_free(ENDT, buffer);
+ }
+
if (ctx->post_run.cb)
  ctx->post_run.cb(ctx, ctx->post_run.data);
 }
diff --git a/src/lib/evas/filters/evas_filter_private.h 
b/src/lib/evas/filters/evas_filter_private.h
index 5ce6218..c747058 100644
--- a/src/lib/evas/filters/evas_filter_private.h
+++ b/src/lib/evas/filters/evas_filter_private.h
@@ -55,6 +55,7 @@ struct _Evas_Filter_Context
   /** Post-processing callback. The context can be safely destroyed here. 
*/
   Evas_Filter_Cb cb;
   void *data;
+  Eina_List *buffers_to_free; // Some buffers should be queued for deletion
} post_run;
 
struct

-- 




[EGIT] [core/efl] master 03/08: Evas filters: Avoid CRI message when using the GL engine

2014-03-03 Thread Jean-Philippe ANDRE
jpeg pushed a commit to branch master.

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

commit 7f63b4a3eb7bfbbd8b8ba75d00a5446078775c07
Author: Jean-Philippe ANDRE 
Date:   Sun Mar 2 14:55:42 2014 +0900

Evas filters: Avoid CRI message when using the GL engine

A CRItical message was always displayed when setting a filter
on a text object, saying that proxy rendering is not supported on GL.

Reduce CRI to ERR and skip proxy rendering altogether if there are
no proxy sources.

This @fix needs to be backported.

Thanks zmike for reporting this.

Signed-off-by: Jean-Philippe Andre 
---
 src/lib/evas/filters/evas_filter.c | 3 ++-
 src/lib/evas/filters/evas_filter_parser.c  | 1 +
 src/lib/evas/filters/evas_filter_private.h | 1 +
 3 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/lib/evas/filters/evas_filter.c 
b/src/lib/evas/filters/evas_filter.c
index 4c2d9dd..b3385ba 100644
--- a/src/lib/evas/filters/evas_filter.c
+++ b/src/lib/evas/filters/evas_filter.c
@@ -223,10 +223,11 @@ evas_filter_context_proxy_render_all(Evas_Filter_Context 
*ctx, Eo *eo_obj,
 
obj = eo_data_scope_get(eo_obj, EVAS_OBJ_CLASS);
 
+   if (!ctx->has_proxies) return;
if (ctx->gl_engine)
  {
 // FIXME: We need to call glReadPixels (yeah, no other way around...)
-CRI("Proxy subrender is not supported in the GL engine (yet)");
+ERR("Proxy subrender is not supported in the GL engine (yet)");
 return;
  }
 
diff --git a/src/lib/evas/filters/evas_filter_parser.c 
b/src/lib/evas/filters/evas_filter_parser.c
index 68186ee..204bba4 100644
--- a/src/lib/evas/filters/evas_filter_parser.c
+++ b/src/lib/evas/filters/evas_filter_parser.c
@@ -2348,6 +2348,7 @@ evas_filter_context_program_use(Evas_Filter_Context *ctx,
  fb->proxy = pb->eo_proxy;
  fb->source = pb->eo_source;
  fb->source_name = eina_stringshare_ref(pb->name);
+ fb->ctx->has_proxies = EINA_TRUE;
   }
  }
 
diff --git a/src/lib/evas/filters/evas_filter_private.h 
b/src/lib/evas/filters/evas_filter_private.h
index 544d767..5ce6218 100644
--- a/src/lib/evas/filters/evas_filter_private.h
+++ b/src/lib/evas/filters/evas_filter_private.h
@@ -67,6 +67,7 @@ struct _Evas_Filter_Context
Eina_Bool async : 1;
Eina_Bool gl_engine : 1;
Eina_Bool running : 1;
+   Eina_Bool has_proxies : 1;
 };
 
 struct _Evas_Filter_Command

-- 




[EGIT] [core/efl] master 05/08: Evas filters: fix random cases of 'dancing text'

2014-03-03 Thread Jean-Philippe ANDRE
jpeg pushed a commit to branch master.

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

commit 6d4dd3f1946a20dc563b338275da568221b915f2
Author: Jean-Philippe ANDRE 
Date:   Sun Mar 2 18:39:08 2014 +0900

Evas filters: fix random cases of 'dancing text'

In some situations, text with filters would be rendered in an invalid
position (somewhere too high).
I am not entirely sure of the reason why the original code with BLEND
doesn't work, but this new version is simpler as GL and SW have more
similar behaviours:

- render text to our 'output' buffer
- draw this buffer as an image onto the set target

Thanks zmike for reporting the issue.
And thanks A LOT for using the filters :D

@fix
    
Signed-off-by: Jean-Philippe Andre 
---
 src/lib/evas/filters/evas_filter.c | 77 ++
 src/lib/evas/filters/evas_filter_private.h |  2 +
 2 files changed, 48 insertions(+), 31 deletions(-)

diff --git a/src/lib/evas/filters/evas_filter.c 
b/src/lib/evas/filters/evas_filter.c
index 97b3ea1..302d837 100644
--- a/src/lib/evas/filters/evas_filter.c
+++ b/src/lib/evas/filters/evas_filter.c
@@ -1421,25 +1421,20 @@ evas_filter_target_set(Evas_Filter_Context *ctx, void 
*draw_context,
 {
EINA_SAFETY_ON_NULL_RETURN_VAL(ctx, EINA_FALSE);
 
-   if (!ctx->gl_engine)
- {
-ctx->target.bufid = evas_filter_buffer_image_new(ctx, surface);
-evas_filter_command_blend_add(ctx, draw_context,
-  EVAS_FILTER_BUFFER_OUTPUT_ID,
-  ctx->target.bufid,
-  x, y, EVAS_FILTER_FILL_MODE_NONE);
- }
-   else
+   ctx->target.bufid = evas_filter_buffer_image_new(ctx, surface);
+   ctx->target.x = x;
+   ctx->target.y = y;
+   ctx->target.clip_use = ENFN->context_clip_get
+ (ENDT, draw_context, &ctx->target.cx, &ctx->target.cy,
+  &ctx->target.cw, &ctx->target.ch);
+
+   if (ctx->gl_engine)
  {
 // Since GL has sync rendering, draw_context is safe to keep around
 Evas_Filter_Buffer *target, *image;
 RGBA_Image *im;
 
-ctx->target.bufid = evas_filter_buffer_image_new(ctx, surface);
 ctx->target.context = draw_context;
-ctx->target.x = x;
-ctx->target.y = y;
-
 target = _filter_buffer_get(ctx, ctx->target.bufid);
 target->glimage = target->backing;
 target->backing = NULL;
@@ -1457,32 +1452,52 @@ static Eina_Bool
 _filter_target_render(Evas_Filter_Context *ctx)
 {
Evas_Filter_Buffer *src, *dst;
-   Eina_Bool ok;
-
-   /* FIXME: This is some hackish hook to send the final buffer on the screen
-* Only used for OpenGL now, since evas_filter_target_set() adds a blend
-* command in case of pure software rendering.
-*/
+   void *drawctx, *image, *surface;
+   int cx, cy, cw, ch;
+   Eina_Bool use_clip = EINA_FALSE;
 
-   if (!ctx->gl_engine) return EINA_FALSE;
EINA_SAFETY_ON_FALSE_RETURN_VAL(ctx->target.bufid, EINA_FALSE);
 
src = _filter_buffer_get(ctx, EVAS_FILTER_BUFFER_OUTPUT_ID);
-   if (!src) return EINA_FALSE;
-
dst = _filter_buffer_get(ctx, ctx->target.bufid);
-   if (!dst) return EINA_FALSE;
+   EINA_SAFETY_ON_NULL_RETURN_VAL(src, EINA_FALSE);
+   EINA_SAFETY_ON_NULL_RETURN_VAL(dst, EINA_FALSE);
 
-   EINA_SAFETY_ON_NULL_RETURN_VAL(src->glimage, EINA_FALSE);
-   EINA_SAFETY_ON_NULL_RETURN_VAL(dst->glimage, EINA_FALSE);
+   if (!ctx->gl_engine)
+ {
+drawctx = ENFN->context_new(ENDT);
+surface = dst->backing;
+image = src->backing;
+ }
+   else
+ {
+drawctx = ctx->target.context;
+surface = dst->glimage;
+image = src->glimage;
+ }
+   EINA_SAFETY_ON_NULL_RETURN_VAL(image, EINA_FALSE);
+   EINA_SAFETY_ON_NULL_RETURN_VAL(surface, EINA_FALSE);
 
-   ok = ENFN->image_draw(ENDT, ctx->target.context,
- dst->glimage, src->glimage,
- 0, 0, src->w, src->h,
- ctx->target.x, ctx->target.y, src->w, src->h,
- EINA_TRUE, EINA_FALSE);
+   if (ctx->target.clip_use)
+ {
+use_clip = ENFN->context_clip_get(ENDT, drawctx, &cx, &cy, &cw, &ch);
+ENFN->context_clip_set(ENDT, drawctx, ctx->target.cx, ctx->target.cy,
+   ctx->target.cw, ctx->target.ch);
+ }
 
-   return ok;
+   ENFN->image_draw(ENDT, drawctx, surface, image,
+0, 0, src->w, src->h,
+ctx->target.x, ctx->target.y, src->w, src->h,
+EINA_TRUE, EINA_FALSE);
+
+   if (!ctx->gl_engine)
+ ENFN->context_free(ENDT, drawctx);
+  

[EGIT] [core/efl] master 08/08: Evas filters: fix clip to target calculation

2014-03-03 Thread Jean-Philippe Andre
jpeg pushed a commit to branch master.

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

commit 8e795109ac4644e5e5e3edcf502b61c0344fa663
Author: Jean-Philippe Andre 
Date:   Mon Mar 3 17:45:15 2014 +0900

Evas filters: fix clip to target calculation

It was possible to keep negative values for dx,dy which would
then draw pixels out of bounds (= crash).

Make check crashed after the previous commit.

@fix
---
 src/lib/evas/filters/evas_filter.c | 6 ++
 1 file changed, 6 insertions(+)

diff --git a/src/lib/evas/filters/evas_filter.c 
b/src/lib/evas/filters/evas_filter.c
index 2dce45c..6d2d7f8 100644
--- a/src/lib/evas/filters/evas_filter.c
+++ b/src/lib/evas/filters/evas_filter.c
@@ -1558,6 +1558,7 @@ _clip_to_target(int *sx /* OUT */, int *sy /* OUT */, int 
sw, int sh,
 {
if (ox > 0)
  {
+(*sx) = 0;
 (*dx) = ox;
 (*cols) = sw;
 if (((*dx) + (*cols)) > (dw))
@@ -1565,18 +1566,21 @@ _clip_to_target(int *sx /* OUT */, int *sy /* OUT */, 
int sw, int sh,
  }
else if (ox < 0)
  {
+(*dx) = 0;
 (*sx) = (-ox);
 (*cols) = sw - (*sx);
 if ((*cols) > dw) (*cols) = dw;
  }
else
  {
+(*dx) = 0;
 (*cols) = sw;
 if ((*cols) > dw) (*cols) = dw;
  }
 
if (oy > 0)
  {
+(*sy) = 0;
 (*dy) = oy;
 (*rows) = sh;
 if (((*dy) + (*rows)) > (dh))
@@ -1584,12 +1588,14 @@ _clip_to_target(int *sx /* OUT */, int *sy /* OUT */, 
int sw, int sh,
  }
else if (oy < 0)
  {
+(*dy) = 0;
 (*sy) = (-oy);
 (*rows) = sh - (*sy);
 if ((*rows) > dh) (*rows) = dh;
  }
else
  {
+(*dy) = 0;
 (*rows) = sh;
 if ((*rows) > dh) (*rows) = dh;
  }

-- 




[EGIT] [core/efl] master 01/03: Doc: Use transparent images for Doxygen

2014-02-23 Thread Jean-Philippe Andre
jpeg pushed a commit to branch master.

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

commit f34305a7d61ae76a70e343194a586998be23ce39
Author: Jean-Philippe Andre 
Date:   Mon Feb 24 10:52:40 2014 +0900

Doc: Use transparent images for Doxygen

Set the proper transparent & alpha flags on the Ecore_Evas,
add a tranparent rectangle and boom, the images are all nice and
transparent. This will fix the bg color in the page evasfiltersref.
---
 doc/previews/preview_text_filter.c | 23 +++
 1 file changed, 15 insertions(+), 8 deletions(-)

diff --git a/doc/previews/preview_text_filter.c 
b/doc/previews/preview_text_filter.c
index 86f93be..a759faf 100644
--- a/doc/previews/preview_text_filter.c
+++ b/doc/previews/preview_text_filter.c
@@ -64,8 +64,8 @@ main(int argc, char **argv)
const char *font = "Sans";
const char *filter, *text;
int fontsize = 32;
-   Evas_Object *o;
-   char *whole_filter;
+   Evas_Object *o, *rect;
+   Evas *e;
int w, h;
 
if (argc < 4)
@@ -90,8 +90,18 @@ main(int argc, char **argv)
 
ecore_evas_show(wpd.ee);
ecore_evas_manual_render_set(wpd.ee, EINA_TRUE);
-
-   o = evas_object_text_add(ecore_evas_get(wpd.ee));
+   ecore_evas_transparent_set(wpd.ee, EINA_TRUE);
+   ecore_evas_alpha_set(wpd.ee, EINA_TRUE);
+   e = ecore_evas_get(wpd.ee);
+
+   rect = evas_object_rectangle_add(e);
+   evas_object_move(rect, 0, 0);
+   evas_object_resize(rect, w, h);
+   evas_object_color_set(rect, 0, 0, 0, 0);
+   evas_object_show(rect);
+
+   o = evas_object_text_add(e);
+   evas_object_stack_above(o, rect);
evas_object_move(o, 0, 0);
evas_object_resize(o, w, h);
evas_object_text_font_set(o, font, fontsize);
@@ -99,10 +109,7 @@ main(int argc, char **argv)
evas_object_color_set(o, 255, 255, 255, 255);
evas_object_show(o);
 
-   if (asprintf(&whole_filter, "fill(color = #404040); %s", filter) == -1)
- return 2;
-   eo_do(o, evas_obj_text_filter_program_set(whole_filter));
-   free(whole_filter);
+   eo_do(o, evas_obj_text_filter_program_set(filter));
 
ecore_evas_manual_render(wpd.ee);
evas_object_geometry_get(o, NULL, NULL, &w, &h);

-- 




[EGIT] [core/efl] master 03/03: Doc: Fix filters documentation

2014-02-23 Thread Jean-Philippe Andre
jpeg pushed a commit to branch master.

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

commit afcbabb00481924557c8c8692486040da92a012d
Author: Jean-Philippe Andre 
Date:   Mon Feb 24 11:18:10 2014 +0900

Doc: Fix filters documentation

Since the doc mentions colors in the examples, fix it to match the
new dox theme :)
---
 src/lib/evas/filters/evas_filter_parser.c | 9 -
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/src/lib/evas/filters/evas_filter_parser.c 
b/src/lib/evas/filters/evas_filter_parser.c
index 19f841c..68186ee 100644
--- a/src/lib/evas/filters/evas_filter_parser.c
+++ b/src/lib/evas/filters/evas_filter_parser.c
@@ -1139,7 +1139,7 @@ _blur_instruction_prepare(Evas_Filter_Instruction *instr)
 
   @note As of 2014/02/11, the ALPHA to RGBA support is of much better quality 
than ALPHA only, but @b very slow. RGBA sources are not supported yet.
 
-  Here is a full example for a size 100 font, of a very simple bevel effect:
+  Here is a full example of a very simple bevel effect:
   @include filter_bump.txt
 
   
@@ -1446,9 +1446,8 @@ _grow_padding_update(Evas_Filter_Program *pgm, 
Evas_Filter_Instruction *instr,
   Example:
   @include filter_grow.txt
 
-  This will first grow the letters in the buffer @c input by 4px, and then draw
-  this buffer in black in the background. Blending white on top of that will
-  give a simple impression of stroked text.
+  This will first grow the letters in the buffer @c input by a few pixels, and
+  then draw this buffer in black in the background.
 
   
   @image html filter_grow.png
@@ -1497,7 +1496,7 @@ _grow_instruction_prepare(Evas_Filter_Instruction *instr)
   Example:
   @include filter_mask.txt
 
-  This will create a simple cyan inner glow effect on black text.
+  This will create an inner shadow effect.
 
   
   @image html filter_mask.png

-- 




[EGIT] [core/efl] master 02/03: Doc: Fix colors in the filter examples

2014-02-23 Thread Jean-Philippe Andre
jpeg pushed a commit to branch master.

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

commit 6dce77fbead866095ddccf57ccb97d6ab90f10cd
Author: Jean-Philippe Andre 
Date:   Mon Feb 24 11:12:17 2014 +0900

Doc: Fix colors in the filter examples

Since the bg color changed from dark grey to white, the
colors don't match so much anymore... This is just like theme
work.
---
 src/examples/evas/filters/filter_blur.txt  | 2 +-
 src/examples/evas/filters/filter_bump.txt  | 2 +-
 src/examples/evas/filters/filter_grow.txt  | 4 ++--
 src/examples/evas/filters/filter_mask.txt  | 6 +++---
 src/examples/evas/filters/filter_transform.txt | 2 +-
 5 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/src/examples/evas/filters/filter_blur.txt 
b/src/examples/evas/filters/filter_blur.txt
index 54b1953..18f5c34 100644
--- a/src/examples/evas/filters/filter_blur.txt
+++ b/src/examples/evas/filters/filter_blur.txt
@@ -1,2 +1,2 @@
 blur (10, color = black, oy = 5, ox = 5);
-blend ();
+blend (color = #3399FF);
diff --git a/src/examples/evas/filters/filter_bump.txt 
b/src/examples/evas/filters/filter_bump.txt
index 8110254..7326146 100644
--- a/src/examples/evas/filters/filter_bump.txt
+++ b/src/examples/evas/filters/filter_bump.txt
@@ -1,3 +1,3 @@
 buffer : a (alpha);
 blur (5, dst = a);
-bump (map = a, compensate = yes, color = cyan, specular = 10.0);
+bump (map = a, compensate = yes, color = #3399FF, specular = 10.0);
diff --git a/src/examples/evas/filters/filter_grow.txt 
b/src/examples/evas/filters/filter_grow.txt
index 2d57f42..08ceb0a 100644
--- a/src/examples/evas/filters/filter_grow.txt
+++ b/src/examples/evas/filters/filter_grow.txt
@@ -1,4 +1,4 @@
 buffer : fat (alpha);
-grow (4, dst = fat);
+grow (8, dst = fat);
 blend (src = fat, color = black);
-blend (color = white);
\ No newline at end of file
+blend (color = #3399FF);
diff --git a/src/examples/evas/filters/filter_mask.txt 
b/src/examples/evas/filters/filter_mask.txt
index a43c23b..2e7434b 100644
--- a/src/examples/evas/filters/filter_mask.txt
+++ b/src/examples/evas/filters/filter_mask.txt
@@ -1,5 +1,5 @@
 buffer: a (alpha);
-blur(5, dst = a);
+blur(6, dst = a);
 curve(points = 0:255 - 128:255 - 255:0, src = a, dst = a);
-blend(color = black);
-mask(mask = a, color = cyan);
\ No newline at end of file
+blend(color = yellow);
+mask(mask = a, color = black);
diff --git a/src/examples/evas/filters/filter_transform.txt 
b/src/examples/evas/filters/filter_transform.txt
index 322af27..f16631b 100644
--- a/src/examples/evas/filters/filter_transform.txt
+++ b/src/examples/evas/filters/filter_transform.txt
@@ -1,4 +1,4 @@
 buffer : t (alpha);
 transform (oy = 20, dst = t);
 blend (src = t, color = silver);
-blend (color = white);
\ No newline at end of file
+blend (color = black);

-- 




[EGIT] [core/efl] master 01/01: Evas filters: Fix blending with fillmode "stretch"

2014-02-21 Thread Jean-Philippe Andre
jpeg pushed a commit to branch master.

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

commit a2c3e73a87e58975e14ef34afdca6e53f7a9199e
Author: Jean-Philippe Andre 
Date:   Fri Feb 21 17:27:19 2014 +0900

Evas filters: Fix blending with fillmode "stretch"

When using stretch, all buffers were actually drawn 4 times
on top of each other. This was not visible because in most cases
these buffers were all opaque (alpha = 255 everywhere).
---
 src/lib/evas/filters/evas_filter_blend.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/lib/evas/filters/evas_filter_blend.c 
b/src/lib/evas/filters/evas_filter_blend.c
index d7585f1..95e4887 100644
--- a/src/lib/evas/filters/evas_filter_blend.c
+++ b/src/lib/evas/filters/evas_filter_blend.c
@@ -181,7 +181,7 @@ _mapped_blend_cpu(void *data, void *drawctx,
  }
else if (fillmode & EVAS_FILTER_FILL_MODE_STRETCH_X)
  {
-cols = 1;
+cols = 0;
 dw = out->cache_entry.w;
 dx = 0;
  }
@@ -204,7 +204,7 @@ _mapped_blend_cpu(void *data, void *drawctx,
  }
else if (fillmode & EVAS_FILTER_FILL_MODE_STRETCH_Y)
  {
-rows = 1;
+rows = 0;
 dh = out->cache_entry.h;
 dy = 0;
  }

-- 




[EGIT] [core/elementary] master 01/03: Doxygen: Align param names vertically to the top

2014-02-20 Thread Jean-Philippe Andre
jpeg pushed a commit to branch master.

http://git.enlightenment.org/core/elementary.git/commit/?id=7d3398fba8686fb105fd62b22c36142a1cf6990b

commit 7d3398fba8686fb105fd62b22c36142a1cf6990b
Author: Jean-Philippe Andre 
Date:   Wed Feb 12 11:05:20 2014 +0900

Doxygen: Align param names vertically to the top

If a param description is long and spans on multiple lines,
then the param name should be aligned to the first description
line. Otherwise the layout becomes confusing.

Align [in] and [out] vertically like params.

See rEFL0471c9a8353b4847bb2f00be5757868cb3195b7a
---
 doc/img/edoxy.css | 4 
 1 file changed, 4 insertions(+)

diff --git a/doc/img/edoxy.css b/doc/img/edoxy.css
index 6c9d868..997a30a 100644
--- a/doc/img/edoxy.css
+++ b/doc/img/edoxy.css
@@ -394,6 +394,10 @@ HR {
color: #ff66ff;
font-style: italic;
white-space: nowrap;
+   vertical-align: top;
+}
+.paramdir {
+   vertical-align: top;
 }
 /* End Styling for detailed member documentation */
 

-- 




[EGIT] [core/elementary] master 03/03: Doxygen: Reduce line gap in code fragments

2014-02-20 Thread Jean-Philippe Andre
jpeg pushed a commit to branch master.

http://git.enlightenment.org/core/elementary.git/commit/?id=12fa00f6552533eb2e83ba280fb7646c0c69f069

commit 12fa00f6552533eb2e83ba280fb7646c0c69f069
Author: Jean-Philippe Andre 
Date:   Wed Feb 12 18:22:22 2014 +0900

Doxygen: Reduce line gap in code fragments

Code should look compact, why use small fonts otherwise?
Reduce the gap between code lines (stored as separate )
to 70%. This looks about right.

See rEFL0a97a74319256db53fb6e8704b77eb21f92e95a8
---
 doc/img/edoxy.css | 1 +
 1 file changed, 1 insertion(+)

diff --git a/doc/img/edoxy.css b/doc/img/edoxy.css
index ace425b..c4d5f14 100644
--- a/doc/img/edoxy.css
+++ b/doc/img/edoxy.css
@@ -115,6 +115,7 @@ DIV.fragment {
padding-right: 2px;
padding-top: 2px;
padding-bottom: 2px;
+   line-height: 70%;
 }
 PRE.fragment {
 font-family: monospace, fixed;

-- 




[EGIT] [core/elementary] master 02/03: Doxygen: Use larger fonts

2014-02-20 Thread Jean-Philippe Andre
jpeg pushed a commit to branch master.

http://git.enlightenment.org/core/elementary.git/commit/?id=84b86d881a6589f662c66b5ba157daef96c0d637

commit 84b86d881a6589f662c66b5ba157daef96c0d637
Author: Jean-Philippe Andre 
Date:   Tue Feb 11 15:56:09 2014 +0900

Doxygen: Use larger fonts

Yes, I know. Someone hates large fonts.
But the ones currently used are so SMALL!
Also, this will just revert back to what's defined in e.css,
because body and list font size aren't even consistent.

Also, display the page titles like titles: big fat blue letters.

See rEFL642f2ecca9350548c6f260edfcd7e2f58d2de662
---
 doc/e.css | 2 ++
 doc/img/edoxy.css | 2 ++
 2 files changed, 4 insertions(+)

diff --git a/doc/e.css b/doc/e.css
index d899c94..2820ce3 100644
--- a/doc/e.css
+++ b/doc/e.css
@@ -379,6 +379,8 @@ p.tiny { color: #aa; font-size: 10px; }
 
 h1, h2, h3, h4, h5, h6 { color: #3399ff; text-shadow: 0px 0px 10px 
rgba(0.2,0.6,1.0,1.0); }
 
+div.headertitle { color: #3399ff; text-shadow: 0px 0px 10px 
rgba(0.2,0.6,1.0,1.0); font-size: 24px; font-weight: bold; }
+
 h1 { font-size: 21px; }
 
 h2 { font-size: 18px; }
diff --git a/doc/img/edoxy.css b/doc/img/edoxy.css
index 997a30a..ace425b 100644
--- a/doc/img/edoxy.css
+++ b/doc/img/edoxy.css
@@ -1,7 +1,9 @@
+/*
 BODY, TD { font-size: 10px; }
 H1 { font-size: 160%; }
 H2 { font-size: 120%; }
 H3 { font-size: 100%; }
+*/
 CAPTION { 
   font-weight: bold 
 }

-- 




[EGIT] [core/efl] master 01/01: Evil: Fix parallel build for Windows

2014-02-20 Thread Jean-Philippe Andre
jpeg pushed a commit to branch master.

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

commit 40b02730a3dac4b51c05e538f5d0555b23a641df
Author: Jean-Philippe Andre 
Date:   Thu Feb 20 17:49:43 2014 +0900

Evil: Fix parallel build for Windows

Add some internal dependencies when building Evil stuff:
The two binaries test_evil and evil_suite need libdl and libevil.

This should fix "make -j8"
Tested with using mingw64 cross compilation
---
 src/Makefile_Evil.am | 7 ---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/src/Makefile_Evil.am b/src/Makefile_Evil.am
index 47e15b4..2626030 100644
--- a/src/Makefile_Evil.am
+++ b/src/Makefile_Evil.am
@@ -97,10 +97,9 @@ lib_evil_libdl_la_CPPFLAGS = \
 -I$(top_builddir)/src/lib/efl \
 @EVIL_CFLAGS@ \
 @EVIL_DLFCN_CPPFLAGS@
-lib_evil_libdl_la_LIBADD = \
-@USE_EVIL_LIBS@ \
-@EVIL_DLFCN_LIBS@
+lib_evil_libdl_la_LIBADD = @USE_EVIL_LIBS@ @EVIL_DLFCN_LIBS@
 lib_evil_libdl_la_LDFLAGS = @EFL_LTLIBRARY_FLAGS@
+lib_evil_libdl_la_DEPENDENCIES = @USE_EVIL_INTERNAL_LIBS@
 
 ### Binary
 
@@ -138,9 +137,11 @@ endif
 
 bin_evil_evil_suite_CPPFLAGS = -I$(top_builddir)/src/lib/efl @EVIL_CFLAGS@
 bin_evil_evil_suite_LDADD = @USE_EVIL_LIBS@ @DL_LIBS@ -lm
+bin_evil_evil_suite_DEPENDENCIES = @USE_EVIL_INTERNAL_LIBS@ @DL_INTERNAL_LIBS@
 
 bin_evil_test_evil_SOURCES = bin/evil/test_evil.c
 bin_evil_test_evil_LDADD = @USE_EVIL_LIBS@
+bin_evil_test_evil_DEPENDENCIES = @USE_EVIL_INTERNAL_LIBS@ @DL_INTERNAL_LIBS@
 
 endif
 EXTRA_DIST += \

-- 




[EGIT] [core/efl] master 01/01: Dox: Try to fix build for windows

2014-02-18 Thread Jean-Philippe Andre
jpeg pushed a commit to branch master.

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

commit f1e1e706500ae73eeb82ba62721abd7bdf2e1159
Author: Jean-Philippe Andre 
Date:   Wed Feb 19 13:32:26 2014 +0900

Dox: Try to fix build for windows

Evil support was not included in the docs preview generator build.
Tested locally with Makefile & deps from the wiki (win64).
---
 doc/previews/Makefile.am | 7 +++
 1 file changed, 7 insertions(+)

diff --git a/doc/previews/Makefile.am b/doc/previews/Makefile.am
index 72d1531..864e583 100644
--- a/doc/previews/Makefile.am
+++ b/doc/previews/Makefile.am
@@ -25,6 +25,13 @@ LDADD = \
-lecore \
-lecore_evas
 
+if HAVE_WIN32
+AM_CPPFLAGS += -I$(abs_top_srcdir)/src/lib/evil @EVIL_CFLAGS@
+LDADD += -L$(abs_top_builddir)/src/lib/evil/.libs \
+   -levil \
+   -ldl
+endif
+
 noinst_PROGRAMS = preview_text_filter
 
 DATADIR = ${abs_top_srcdir}/doc/previews/img

-- 




[EGIT] [core/efl] master 01/01: Evas filters: Use strtok instead of strtok_r for mingw

2014-02-18 Thread Jean-Philippe Andre
jpeg pushed a commit to branch master.

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

commit 6067c88b56594a47bca45eec34b3c512ee40df0a
Author: Jean-Philippe Andre 
Date:   Wed Feb 19 11:05:18 2014 +0900

Evas filters: Use strtok instead of strtok_r for mingw

The Windows build (mingw) does not know about strtok_r.
So, let's use the non-safe variant strtok instead.
Currently, this function is called from the main thread only,
so this should be fine :)

In the future it would be nice to not use strtok anymore,
but strtok_r everywhere, and add it to evil. Considering the
release coming soon, I'm not going to change something like that
now.
---
 src/lib/evas/filters/evas_filter_parser.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/lib/evas/filters/evas_filter_parser.c 
b/src/lib/evas/filters/evas_filter_parser.c
index d86f5dc..25b3b1f 100644
--- a/src/lib/evas/filters/evas_filter_parser.c
+++ b/src/lib/evas/filters/evas_filter_parser.c
@@ -2184,7 +2184,7 @@ _instr2cmd_curve(Evas_Filter_Context *ctx, 
Evas_Filter_Program *pgm,
const char *src, *dst, *points_str, *interpolation, *channel_name;
DATA8 values[256] = {0}, points[512];
int cmdid, point_count = 0;
-   char *token, *copy = NULL, *saveptr = NULL;
+   char *token, *copy = NULL;
Buffer *in, *out;
Eina_Bool parse_ok = EINA_FALSE;
 
@@ -2216,7 +2216,7 @@ _instr2cmd_curve(Evas_Filter_Context *ctx, 
Evas_Filter_Program *pgm,
 
if (!points_str) goto interpolated;
copy = strdup(points_str);
-   token = strtok_r(copy, "-", &saveptr);
+   token = strtok(copy, "-");
if (!token) goto interpolated;
 
while (token)
@@ -2228,7 +2228,7 @@ _instr2cmd_curve(Evas_Filter_Context *ctx, 
Evas_Filter_Program *pgm,
 points[point_count * 2 + 0] = x;
 points[point_count * 2 + 1] = y;
 point_count++;
-token = strtok_r(NULL, "-", &saveptr);
+token = strtok(NULL, "-");
  }
 
parse_ok = evas_filter_interpolate(values, points, point_count, mode);

-- 




[EGIT] [core/efl] master 03/05: Evas filters: Implement "fillmode" for displace

2014-02-17 Thread Jean-Philippe Andre
jpeg pushed a commit to branch master.

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

commit 3819bc7abb954dd44b5074de0cc0333c8ca71f67
Author: Jean-Philippe Andre 
Date:   Mon Feb 17 19:54:47 2014 +0900

Evas filters: Implement "fillmode" for displace

The fillmode (stretch or repeat map) was present and documented
for displace, but not implemented. Easy copy & paste from the
mask filter.
---
 src/lib/evas/filters/evas_filter_displace.c | 50 +
 1 file changed, 44 insertions(+), 6 deletions(-)

diff --git a/src/lib/evas/filters/evas_filter_displace.c 
b/src/lib/evas/filters/evas_filter_displace.c
index aed1671..31df1f7 100644
--- a/src/lib/evas/filters/evas_filter_displace.c
+++ b/src/lib/evas/filters/evas_filter_displace.c
@@ -3,12 +3,11 @@
 
 static void
 _filter_displace_cpu_alpha_do(int w, int h, int map_w, int map_h, int 
intensity,
-  DATA8 *src, DATA8 *dst, DATA8 *map_start,
+  DATA8 *src, DATA8 *dst, DATA32 *map_start,
   Eina_Bool stretch, Eina_Bool smooth,
   Eina_Bool blend)
 {
int x, y, map_x, map_y;
-   const int map_stride = map_w * sizeof(DATA32);
const int dx = RED;
const int dy = GREEN;
DATA8 *map;
@@ -16,7 +15,7 @@ _filter_displace_cpu_alpha_do(int w, int h, int map_w, int 
map_h, int intensity,
for (y = 0, map_y = 0; y < h; y++, map_y++)
  {
 if (map_y >= map_h) map_y = 0;
-map = map_start + (map_y * map_stride);
+map = (DATA8 *) (map_start + map_y * map_w);
 
 for (x = 0, map_x = 0; x < w;
  x++, dst++, src++, map_x++, map += sizeof(DATA32))
@@ -28,7 +27,7 @@ _filter_displace_cpu_alpha_do(int w, int h, int map_w, int 
map_h, int intensity,
  if (map_x >= map_w)
{
   map_x = 0;
-  map = map_start + (map_y * map_stride);
+  map = (DATA8 *) (map_start + map_y * map_w);
}
 
  // x
@@ -195,7 +194,8 @@ static Eina_Bool
 _filter_displace_cpu_alpha(Evas_Filter_Command *cmd)
 {
int w, h, map_w, map_h, intensity;
-   DATA8 *dst, *src, *map_start;
+   DATA8 *dst, *src;
+   DATA32 *map_start;
Eina_Bool stretch, smooth, blend;
 
w = cmd->input->w;
@@ -207,7 +207,7 @@ _filter_displace_cpu_alpha(Evas_Filter_Command *cmd)
EINA_SAFETY_ON_NULL_RETURN_VAL(cmd->output->backing, EINA_FALSE);
 
src = ((RGBA_Image *) cmd->input->backing)->mask.data;
-   map_start = ((RGBA_Image *) cmd->mask->backing)->mask.data;
+   map_start = ((RGBA_Image *) cmd->mask->backing)->image.data;
dst = ((RGBA_Image *) cmd->output->backing)->mask.data;
EINA_SAFETY_ON_NULL_RETURN_VAL(src, EINA_FALSE);
EINA_SAFETY_ON_NULL_RETURN_VAL(map_start, EINA_FALSE);
@@ -220,6 +220,25 @@ _filter_displace_cpu_alpha(Evas_Filter_Command *cmd)
intensity = cmd->displacement.intensity;
blend = (cmd->draw.render_op == EVAS_RENDER_BLEND);
 
+   // Stretch if necessary.
+   if ((map_w != w || map_h != h) && (cmd->draw.fillmode & 
EVAS_FILTER_FILL_MODE_STRETCH_XY))
+ {
+Evas_Filter_Buffer *fb;
+
+if (cmd->draw.fillmode & EVAS_FILTER_FILL_MODE_STRETCH_X)
+  map_w = w;
+if (cmd->draw.fillmode & EVAS_FILTER_FILL_MODE_STRETCH_Y)
+  map_h = h;
+
+BUFFERS_LOCK();
+fb = evas_filter_buffer_scaled_get(cmd->ctx, cmd->mask, map_w, map_h);
+BUFFERS_UNLOCK();
+
+EINA_SAFETY_ON_NULL_RETURN_VAL(fb, EINA_FALSE);
+fb->locked = EINA_FALSE;
+map_start = ((RGBA_Image *) fb->backing)->image.data;
+ }
+
_filter_displace_cpu_alpha_do(w, h, map_w, map_h, intensity,
  src, dst, map_start, stretch, smooth, blend);
 
@@ -261,6 +280,25 @@ _filter_displace_cpu_rgba(Evas_Filter_Command *cmd)
intensity = cmd->displacement.intensity;
blend = (cmd->draw.render_op == EVAS_RENDER_BLEND);
 
+   // Stretch if necessary.
+   if ((map_w != w || map_h != h) && (cmd->draw.fillmode & 
EVAS_FILTER_FILL_MODE_STRETCH_XY))
+ {
+Evas_Filter_Buffer *fb;
+
+if (cmd->draw.fillmode & EVAS_FILTER_FILL_MODE_STRETCH_X)
+  map_w = w;
+if (cmd->draw.fillmode & EVAS_FILTER_FILL_MODE_STRETCH_Y)
+  map_h = h;
+
+BUFFERS_LOCK();
+fb = evas_filter_buffer_scaled_get(cmd->ctx, cmd->mask, map_w, map_h);
+BUFFERS_UNLOCK();
+
+EINA_SAFETY_ON_NULL_RETURN_VAL(fb, EINA_FALSE);
+fb->locked = EINA_FALSE;
+map_start = ((RGBA_Image *) fb->backing)->image.data;
+ }
+
_filter_displace_cpu_rgba_do(w, h, map_w, map_h, intensity,
 src, dst, map_start, stretch, smooth, blend);
 

-- 




[EGIT] [core/efl] master 02/05: Evas filters doc: Add link to "fillmode"

2014-02-17 Thread Jean-Philippe Andre
jpeg pushed a commit to branch master.

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

commit 7cf02ca75bfddf26f1f427f0b742c8f0a9b24ed4
Author: Jean-Philippe Andre 
Date:   Mon Feb 17 19:49:48 2014 +0900

Evas filters doc: Add link to "fillmode"
---
 src/lib/evas/filters/evas_filter_parser.c | 12 ++--
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/src/lib/evas/filters/evas_filter_parser.c 
b/src/lib/evas/filters/evas_filter_parser.c
index c133fb0..2894a12 100644
--- a/src/lib/evas/filters/evas_filter_parser.c
+++ b/src/lib/evas/filters/evas_filter_parser.c
@@ -125,6 +125,7 @@
   olive: @c #808000
   invisible, transparent: @c # (alpha is zero)
 
+@anchor evasfilter_fillmode
 Fillmode
 
   none
@@ -973,9 +974,8 @@ _blend_padding_update(Evas_Filter_Program *pgm, 
Evas_Filter_Instruction *instr,
   @param color A color to use as multiplier. See @ref evasfilters_color 
"colors". 
  If the input is an alpha buffer and the output is RGBA, this 
will
  draw the buffer in this color.
-  @param fillmode @c NONE, @c STRETCH, @c REPEAT 
- Map the input onto the whole surface of the output by 
stretching or
- repeating it.
+  @param fillmode Map the input onto the whole surface of the output by 
stretching or
+ repeating it. See @ref evasfilter_fillmode "fillmodes".
 
   If @a src is an alpha buffer and @a dst is an RGBA buffer, then the @a color 
option should be set.
 
@@ -1143,7 +1143,7 @@ _blur_instruction_prepare(Evas_Filter_Instruction *instr)
   @param dstDestination buffer. This should be an RGBA buffer 
(although alpha is supported). Must be of the same size as @a src.
   @param black  The shadows' color. Usually this will be black (@c #000).
   @param white  The specular light's color. Usually this will be white (@c 
#FFF).
-  @param fillmode   This specifies how to handle @a map when its dimensions 
don't match those of @a src and @a dst. Default is to @c repeat.
+  @param fillmode   This specifies how to handle @a map when its dimensions 
don't match those of @a src and @a dst. Default is to @c repeat. See @ref 
evasfilter_fillmode "fillmodes".
 
   @note As of 2014/02/11, the ALPHA to RGBA support is of much better quality 
than ALPHA only, but @b very slow. RGBA sources are not supported yet.
 
@@ -1303,7 +1303,7 @@ _displace_padding_update(Evas_Filter_Program *pgm,
@c default is equivalent to @c smooth_stretch.
   @param src   Source buffer
   @param dst   Destination buffer. Must be of same color format and size 
as @a src.
-  @param fillmode  Defines how to handle cases where the map has a different 
size from @a src and @a dst. It should most likely be @c stretch or @c repeat.
+  @param fillmode  Defines how to handle cases where the map has a different 
size from @a src and @a dst. It should most likely be @c stretch or @c repeat. 
See @ref evasfilter_fillmode "fillmodes".
 
   Displacement map
 
@@ -1495,7 +1495,7 @@ _grow_instruction_prepare(Evas_Filter_Instruction *instr)
   @param src  Source buffer. This can also be thought of a mask if @a src 
is alpha and @a mask is RGBA.
   @param dst  Destination buffer for blending. This must be of same size 
and colorspace as @a src.
   @param colorA color to use as multiplier for the blend operation. White 
means no change. See @ref evasfilters_color "colors".
-  @param fillmode Defines whether to stretch or repeat the @a mask if its size 
that of @src. Should be set when masking with external textures. Default is 
none.
+  @param fillmode Defines whether to stretch or repeat the @a mask if its size 
that of @src. Should be set when masking with external textures. Default is 
none. See @ref evasfilter_fillmode "fillmodes".
 
   Note that @a src and @a mask are interchangeable, if they have the same 
dimensions.
 

-- 




[EGIT] [core/efl] master 01/05: Evas filters: Fix crash in displace filter

2014-02-17 Thread Jean-Philippe Andre
jpeg pushed a commit to branch master.

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

commit d70b805e6d1989b849b9dd7dd3bf474c897b57f5
Author: Jean-Philippe Andre 
Date:   Mon Feb 17 19:37:32 2014 +0900

Evas filters: Fix crash in displace filter

Simplify and fix map traversal code
---
 src/lib/evas/filters/evas_filter_displace.c | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/lib/evas/filters/evas_filter_displace.c 
b/src/lib/evas/filters/evas_filter_displace.c
index 362da63..aed1671 100644
--- a/src/lib/evas/filters/evas_filter_displace.c
+++ b/src/lib/evas/filters/evas_filter_displace.c
@@ -18,7 +18,8 @@ _filter_displace_cpu_alpha_do(int w, int h, int map_w, int 
map_h, int intensity,
 if (map_y >= map_h) map_y = 0;
 map = map_start + (map_y * map_stride);
 
-for (x = 0, map_x = 0; x < w; x++, dst++, src++, map_x++)
+for (x = 0, map_x = 0; x < w;
+ x++, dst++, src++, map_x++, map += sizeof(DATA32))
   {
  int offx = 0, offy = 0, offx_dec = 0, offy_dec = 0, val = 0;
  Eina_Bool out = 0;
@@ -29,7 +30,6 @@ _filter_displace_cpu_alpha_do(int w, int h, int map_w, int 
map_h, int intensity,
   map_x = 0;
   map = map_start + (map_y * map_stride);
}
- else map += sizeof(DATA32);
 
  // x
  val = ((int) map[dx] - 128) * intensity;
@@ -92,7 +92,8 @@ _filter_displace_cpu_rgba_do(int w, int h, int map_w, int 
map_h, int intensity,
 if (map_y >= map_h) map_y = 0;
 map = (DATA8 *) (map_start + map_y * map_w);
 
-for (x = 0, map_x = 0; x < w; x++, dst++, src++, map_x++)
+for (x = 0, map_x = 0; x < w;
+ x++, dst++, src++, map_x++, map += sizeof(DATA32))
   {
  int offx = 0, offy = 0, offx_dec = 0, offy_dec = 0, val = 0;
  DATA32 col = 0;
@@ -104,7 +105,6 @@ _filter_displace_cpu_rgba_do(int w, int h, int map_w, int 
map_h, int intensity,
   map_x = 0;
   map = (DATA8 *) (map_start + map_y * map_w);
}
- else map += sizeof(DATA32);
 
  if (!map[ALPHA]) continue;
  if (!unpremul && map[ALPHA] != 0xFF)

-- 




[EGIT] [core/efl] master 04/05: Evas filters: Fix padding with "blend"

2014-02-17 Thread Jean-Philippe Andre
jpeg pushed a commit to branch master.

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

commit ded097461d60213c92a28a91cbc63c3a7175e2de
Author: Jean-Philippe Andre 
Date:   Mon Feb 17 20:19:02 2014 +0900

Evas filters: Fix padding with "blend"

Test case was:
buffer : a (alpha);
blur (20, dst = a);
blend (src = a, ox = 30);

In that case, padding was 20, 30, 20, 20.
So the blurred buffer was clipped on screen.
---
 src/lib/evas/filters/evas_filter_parser.c | 16 ++--
 1 file changed, 10 insertions(+), 6 deletions(-)

diff --git a/src/lib/evas/filters/evas_filter_parser.c 
b/src/lib/evas/filters/evas_filter_parser.c
index 2894a12..48ec0a9 100644
--- a/src/lib/evas/filters/evas_filter_parser.c
+++ b/src/lib/evas/filters/evas_filter_parser.c
@@ -917,22 +917,26 @@ static void
 _blend_padding_update(Evas_Filter_Program *pgm, Evas_Filter_Instruction *instr,
   int *padl, int *padr, int *padt, int *padb)
 {
-   const char *outbuf;
-   Buffer *out;
+   const char *inbuf, *outbuf;
+   Buffer *in, *out;
int ox, oy, l = 0, r = 0, t = 0, b = 0;
 
ox = _instruction_param_geti(instr, "ox", NULL);
oy = _instruction_param_geti(instr, "oy", NULL);
 
+   inbuf = _instruction_param_gets(instr, "src", NULL);
+   in = _buffer_get(pgm, inbuf);
+   EINA_SAFETY_ON_NULL_RETURN(in);
+
outbuf = _instruction_param_gets(instr, "dst", NULL);
out = _buffer_get(pgm, outbuf);
EINA_SAFETY_ON_NULL_RETURN(out);
 
-   if (ox < 0) l = (-ox);
-   else r = ox;
+   if (ox < 0) l = (-ox) + in->pad.l;
+   else r = ox + in->pad.r;
 
-   if (oy < 0) t = (-oy);
-   else b = oy;
+   if (oy < 0) t = (-oy) + in->pad.t;
+   else b = oy + in->pad.b;
 
if (out->pad.l < l) out->pad.l = l;
if (out->pad.r < r) out->pad.r = r;

-- 




[EGIT] [core/efl] master 05/05: Evas filters: Fix documentation for displace

2014-02-17 Thread Jean-Philippe Andre
jpeg pushed a commit to branch master.

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

commit 54129dfcaab5fb7674808f9202dfb5a2ea5bd609
Author: Jean-Philippe Andre 
Date:   Mon Feb 17 20:23:07 2014 +0900

Evas filters: Fix documentation for displace

fillmode "none" is not supported, as it does not make much sense
(how do we displace pixels without an underlying displacement map?)
---
 src/lib/evas/filters/evas_filter_parser.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/lib/evas/filters/evas_filter_parser.c 
b/src/lib/evas/filters/evas_filter_parser.c
index 48ec0a9..d86f5dc 100644
--- a/src/lib/evas/filters/evas_filter_parser.c
+++ b/src/lib/evas/filters/evas_filter_parser.c
@@ -1307,7 +1307,9 @@ _displace_padding_update(Evas_Filter_Program *pgm,
@c default is equivalent to @c smooth_stretch.
   @param src   Source buffer
   @param dst   Destination buffer. Must be of same color format and size 
as @a src.
-  @param fillmode  Defines how to handle cases where the map has a different 
size from @a src and @a dst. It should most likely be @c stretch or @c repeat. 
See @ref evasfilter_fillmode "fillmodes".
+  @param fillmode  Defines how to handle cases where the map has a different 
size from @a src and @a dst.
+   It should be a combination of @c stretch or @c repeat: @c 
none is not supported.
+   See @ref evasfilter_fillmode "fillmodes".
 
   Displacement map
 

-- 




[EGIT] [core/efl] master 01/01: Fix make distcheck

2014-02-17 Thread Jean-Philippe Andre
jpeg pushed a commit to branch master.

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

commit 7b896e784d44756ed29ef6de58ea3e45352cccd6
Author: Jean-Philippe Andre 
Date:   Mon Feb 17 17:59:13 2014 +0900

Fix make distcheck

Makefile_Edje contained the EXTRA_DIST files for Emotion, which
doesn't make much sense. So move that to Makefile_Emotion.am.

But if we want to add the test files only when EFL_TESTS is
enabled, then make distcheck doesn't work.
So, this is a bit weird.
---
 src/Makefile_Edje.am| 27 +--
 src/Makefile_Emotion.am | 22 +++---
 2 files changed, 12 insertions(+), 37 deletions(-)

diff --git a/src/Makefile_Edje.am b/src/Makefile_Edje.am
index 6b4cad4..2ecd3d4 100644
--- a/src/Makefile_Edje.am
+++ b/src/Makefile_Edje.am
@@ -212,32 +212,7 @@ bin/edje/edje_convert_main.c \
 lib/edje/edje_convert.c \
 tests/edje/edje_tests_helpers.h \
 tests/edje/data/complex_layout.edc \
-tests/edje/data/test_layout.edc \
-tests/emotion/data/theme.edc \
-tests/emotion/data/icon.edc \
-tests/emotion/data/bpause.png \
-tests/emotion/data/bplay.png \
-tests/emotion/data/bstop.png \
-tests/emotion/data/e_logo.png \
-tests/emotion/data/fr1.png \
-tests/emotion/data/fr2.png \
-tests/emotion/data/fr3.png \
-tests/emotion/data/fr4.png \
-tests/emotion/data/fr5.png \
-tests/emotion/data/fr6.png \
-tests/emotion/data/fr7.png \
-tests/emotion/data/h_slider.png \
-tests/emotion/data/knob.png \
-tests/emotion/data/orb.png \
-tests/emotion/data/pnl.png \
-tests/emotion/data/sl.png \
-tests/emotion/data/tiles.png \
-tests/emotion/data/video_frame_bottom.png \
-tests/emotion/data/video_frame_left.png \
-tests/emotion/data/video_frame_right.png \
-tests/emotion/data/video_frame_top.png \
-tests/emotion/data/whb.png \
-tests/emotion/data/window_inner_shadow.png
+tests/edje/data/test_layout.edc
 
 
 bin_SCRIPTS += bin/edje/edje_recc
diff --git a/src/Makefile_Emotion.am b/src/Makefile_Emotion.am
index 1e99250..668ea20 100644
--- a/src/Makefile_Emotion.am
+++ b/src/Makefile_Emotion.am
@@ -191,7 +191,16 @@ tests/emotion/data/theme.edj: tests/emotion/data/theme.edc 
bin/edje/edje_cc${EXE
@$(MKDIR_P) tests/emotion/data
$(AM_V_EDJ)$(EDJE_CC) $(EDJE_CC_FLAGS) -id $(srcdir)/tests/emotion/data 
$< $@
 
-EMOTION_DATA_FILES = \
+emotiondatafilesdir = $(datadir)/emotion/data
+emotiondatafiles_DATA = tests/emotion/data/theme.edj
+CLEANFILES += tests/emotion/data/theme.edj
+
+endif
+endif
+
+# Those probably should be in the if block, but then
+# "make distcheck" would not work
+EXTRA_DIST += \
 tests/emotion/data/bpause.png \
 tests/emotion/data/bplay.png \
 tests/emotion/data/bstop.png \
@@ -219,14 +228,5 @@ tests/emotion/data/video_frame_left.png \
 tests/emotion/data/video_frame_right.png \
 tests/emotion/data/video_frame_top.png \
 tests/emotion/data/whb.png \
-tests/emotion/data/window_inner_shadow.png
-
-emotiondatafilesdir = $(datadir)/emotion/data
-emotiondatafiles_DATA = tests/emotion/data/theme.edj
-CLEANFILES += tests/emotion/data/theme.edj
-endif
-endif
-
-EXTRA_DIST += \
-$(EMOTION_DATA_FILES) \
+tests/emotion/data/window_inner_shadow.png \
 modules/emotion/generic/README

-- 




[EGIT] [core/efl] master 01/01: Gif: Fix animated gifs when used as proxy sources

2014-02-17 Thread Jean-Philippe Andre
jpeg pushed a commit to branch master.

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

commit e7e3f73bbe9f21dfb4ee1fc692e0fcfb12b0cdc5
Author: Jean-Philippe Andre 
Date:   Mon Feb 17 16:56:28 2014 +0900

Gif: Fix animated gifs when used as proxy sources

This looks like a typo: if (animated > 1) when animated is a... Bool!

So, I am not entirely sure why this bug is visible in case of gif
proxies, all it seems that the load_data function may be called
multiple times when the object is visible. So gif close and reopen
happen properly, and the first frame can be decoded.
---
 src/modules/evas/loaders/gif/evas_image_load_gif.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/modules/evas/loaders/gif/evas_image_load_gif.c 
b/src/modules/evas/loaders/gif/evas_image_load_gif.c
index e01e276..3f6fbdb 100644
--- a/src/modules/evas/loaders/gif/evas_image_load_gif.c
+++ b/src/modules/evas/loaders/gif/evas_image_load_gif.c
@@ -604,8 +604,7 @@ open_file:
 
// if we want to go backwards, we likely need/want to re-decode from the
// start as we have nothnig to build on
-   if ((index > 0) && (index < loader->imgnum) &&
-   (animated->animated > 1))
+   if ((index > 0) && (index < loader->imgnum) && (animated->animated))
  {
 if (loader->gif) DGifCloseFile(loader->gif);
 if ((loader->fi.map) && (loader->f))

-- 




[EGIT] [core/efl] master 01/01: Emotion: Add cmake definition files

2014-02-16 Thread Jean-Philippe Andre
jpeg pushed a commit to branch master.

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

commit 18a7a95de371b4376b62e537ad536df116e19955
Author: Jean-Philippe Andre 
Date:   Mon Feb 17 11:28:33 2014 +0900

Emotion: Add cmake definition files

Shameless copy & paste + sed from Evas stuff
---
 Makefile.am|  6 ++
 cmakeconfig/EmotionConfig.cmake.in | 32 
 configure.ac   |  2 ++
 3 files changed, 40 insertions(+)

diff --git a/Makefile.am b/Makefile.am
index b446af7..f4b6257 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -287,6 +287,12 @@ ethumbclient_cmakeconfig_DATA = \
 cmakeconfig/EthumbClientConfig.cmake \
 cmakeconfig/EthumbClientConfigVersion.cmake
 
+emotion_cmakeconfigdir =  $(libdir)/cmake/Emotion/
+emotion_cmakeconfig_DATA = \
+cmakeconfig/EmotionConfig.cmake \
+cmakeconfig/EmotionConfigVersion.cmake
+
+
 # D-Bus services:
 
 servicedir = @dbusservicedir@
diff --git a/cmakeconfig/EmotionConfig.cmake.in 
b/cmakeconfig/EmotionConfig.cmake.in
new file mode 100644
index 000..1b47b21
--- /dev/null
+++ b/cmakeconfig/EmotionConfig.cmake.in
@@ -0,0 +1,32 @@
+# - Try to find emotion
+# Once done this will define
+#  EMOTION_FOUND - System has emotion
+#  EMOTION_INCLUDE_DIRS - The emotion include directories
+#  EMOTION_LIBRARIES - The libraries needed to use emotion
+#  EMOTION_DEFINITIONS - Compiler switches required for using emotion
+
+set(MY_PKG emotion)
+
+find_package(PkgConfig)
+if ("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION}" 
VERSION_GREATER "2.8.1")
+   # "QUIET" was introduced in 2.8.2
+   set(_QUIET QUIET)
+endif ()
+pkg_check_modules(PC_LIBEMOTION ${_QUIET} ${MY_PKG})
+
+find_library(EMOTION_LIBRARY
+ NAMES ${PC_LIBEMOTION_LIBRARIES}
+ HINTS ${PC_LIBEMOTION_LIBDIR} ${PC_LIBEMOTION_LIBRARY_DIRS} )
+
+set(EMOTION_DEFINITIONS ${PC_LIBEMOTION_CFLAGS_OTHER})
+set(EMOTION_LIBRARIES ${EMOTION_LIBRARY})
+set(EMOTION_INCLUDE_DIRS ${PC_LIBEMOTION_INCLUDE_DIRS})
+
+include(FindPackageHandleStandardArgs)
+# handle the QUIETLY and REQUIRED arguments and set EMOTION_FOUND to TRUE
+# if all listed variables are TRUE
+find_package_handle_standard_args(${MY_PKG} DEFAULT_MSG
+   EMOTION_LIBRARIES EMOTION_INCLUDE_DIRS)
+
+mark_as_advanced(EMOTION_INCLUDE_DIRS EMOTION_LIBRARY EMOTION_LIBRARIES 
EMOTION_DEFINITIONS)
+
diff --git a/configure.ac b/configure.ac
index 6b7f9a2..183381d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -4014,6 +4014,8 @@ cmakeconfig/EthumbConfig.cmake
 cmakeconfig/EthumbConfigVersion.cmake:cmakeconfig/EFLConfigVersion.cmake.in
 cmakeconfig/EthumbClientConfig.cmake
 
cmakeconfig/EthumbClientConfigVersion.cmake:cmakeconfig/EFLConfigVersion.cmake.in
+cmakeconfig/EmotionConfig.cmake
+cmakeconfig/EmotionConfigVersion.cmake:cmakeconfig/EFLConfigVersion.cmake.in
 ])
 
 AC_OUTPUT

-- 




[EGIT] [core/efl] master 06/07: Evas filters: Another clang warning fix

2014-02-13 Thread Jean-Philippe Andre
jpeg pushed a commit to branch master.

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

commit df65e71e79e3395ecb8105e6b1ebf41a2c4b347a
Author: Jean-Philippe Andre 
Date:   Fri Feb 14 12:45:55 2014 +0900

Evas filters: Another clang warning fix

Prevent error case from crashing.
---
 src/lib/evas/filters/evas_filter.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/lib/evas/filters/evas_filter.c 
b/src/lib/evas/filters/evas_filter.c
index cd5602c..74b068c 100644
--- a/src/lib/evas/filters/evas_filter.c
+++ b/src/lib/evas/filters/evas_filter.c
@@ -876,6 +876,7 @@ evas_filter_command_blur_add(Evas_Filter_Context *ctx, void 
*drawctx,
 if (!convert && (ox || oy))
   {
  copybuf = evas_filter_temporary_buffer_get(ctx, 0, 0, 
in->alpha_only);
+ if (!copybuf) goto fail;
  copy_back = EINA_TRUE;
   }
 
@@ -960,6 +961,7 @@ evas_filter_command_blur_add(Evas_Filter_Context *ctx, void 
*drawctx,
if (copy_back)
  {
 if (!cmd) goto fail;
+if (!copybuf) goto fail;
 INF("Add copy %d -> %d", copybuf->id, blur_out->id);
 cmd->ENFN->context_color_set(cmd->ENDT, drawctx, 0, 0, 0, 255);
 id = evas_filter_command_blend_add(ctx, drawctx, copybuf->id, 
blur_out->id, ox, oy, EVAS_FILTER_FILL_MODE_NONE);

-- 




[EGIT] [core/efl] master 07/07: cserve2: Fix minor clang warning

2014-02-13 Thread Jean-Philippe Andre
jpeg pushed a commit to branch master.

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

commit 1fae9e5e214491c2c62ce10d11e10b080744cab5
Author: Jean-Philippe Andre 
Date:   Fri Feb 14 12:51:13 2014 +0900

cserve2: Fix minor clang warning
---
 src/bin/evas/evas_cserve2_requests.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/bin/evas/evas_cserve2_requests.c 
b/src/bin/evas/evas_cserve2_requests.c
index 0860048..b44310b 100644
--- a/src/bin/evas/evas_cserve2_requests.c
+++ b/src/bin/evas/evas_cserve2_requests.c
@@ -569,7 +569,7 @@ _cserve2_requests_process(void)
  requests[rtype].processing, EINA_INLIST_GET(req));
 
   if (!(*idle))
-sw = _slave_for_request_create(type);
+_slave_for_request_create(type);
 
   if (!(*idle))
 {

-- 




[EGIT] [core/efl] master 05/07: Evas filters: More clang fixes

2014-02-13 Thread Jean-Philippe Andre
jpeg pushed a commit to branch master.

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

commit a4ecf34316593fde02fea16bdbae3be659dd1da2
Author: Jean-Philippe Andre 
Date:   Fri Feb 14 12:26:41 2014 +0900

Evas filters: More clang fixes

NULL ptr dereference.
---
 src/lib/evas/filters/evas_filter_parser.c | 7 ++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/src/lib/evas/filters/evas_filter_parser.c 
b/src/lib/evas/filters/evas_filter_parser.c
index 9c9ba04..c133fb0 100644
--- a/src/lib/evas/filters/evas_filter_parser.c
+++ b/src/lib/evas/filters/evas_filter_parser.c
@@ -2079,6 +2079,7 @@ _instr2cmd_fill(Evas_Filter_Context *ctx, 
Evas_Filter_Program *pgm,
Buffer *buf;
int R, G, B, A, l, r, t, b;
Evas_Filter_Command *cmd;
+   Eina_Inlist *il;
DATA32 color;
int cmdid;
 
@@ -2095,7 +2096,11 @@ _instr2cmd_fill(Evas_Filter_Context *ctx, 
Evas_Filter_Program *pgm,
cmdid = evas_filter_command_fill_add(ctx, dc, buf->cid);
RESETCOLOR();
 
-   cmd = EINA_INLIST_CONTAINER_GET(eina_inlist_last(ctx->commands), 
Evas_Filter_Command);
+   if (cmdid < 0) return -1;
+   il = eina_inlist_last(ctx->commands);
+   if (!il) return -1;
+
+   cmd = EINA_INLIST_CONTAINER_GET(il, Evas_Filter_Command);
cmd->draw.clip.l = l;
cmd->draw.clip.r = r;
cmd->draw.clip.t = t;

-- 




[EGIT] [core/efl] master 03/07: Evas filters: Fix more clang stuff and add safety checks

2014-02-13 Thread Jean-Philippe Andre
jpeg pushed a commit to branch master.

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

commit 6642d16a7d1de17e776cf1cd8266fa2830d4b163
Author: Jean-Philippe Andre 
Date:   Fri Feb 14 12:18:58 2014 +0900

Evas filters: Fix more clang stuff and add safety checks

The prepare function should not fail, unless something is very
wrong. Also, return NULL instead of EINA_FALSE.
---
 src/lib/evas/filters/evas_filter_parser.c | 11 ---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/src/lib/evas/filters/evas_filter_parser.c 
b/src/lib/evas/filters/evas_filter_parser.c
index be33238..9c9ba04 100644
--- a/src/lib/evas/filters/evas_filter_parser.c
+++ b/src/lib/evas/filters/evas_filter_parser.c
@@ -1246,7 +1246,7 @@ _curve_instruction_prepare(Evas_Filter_Instruction *instr)
_instruction_param_name_add(instr, "src", VT_BUFFER, "input");
_instruction_param_name_add(instr, "dst", VT_BUFFER, "output");
 
-   return EINA_FALSE;
+   return EINA_TRUE;
 }
 
 static void
@@ -1619,7 +1619,7 @@ _instruction_create(const char *name)
Evas_Filter_Instruction *instr;
Eina_Bool (* prepare) (Evas_Filter_Instruction *) = NULL;
 
-   EINA_SAFETY_ON_FALSE_RETURN_VAL(name && *name, EINA_FALSE);
+   EINA_SAFETY_ON_FALSE_RETURN_VAL(name && *name, NULL);
 
if (!strcasecmp(name, "blend"))
  prepare = _blend_instruction_prepare;
@@ -1649,7 +1649,12 @@ _instruction_create(const char *name)
instr = _instruction_new(name);
if (!instr) return NULL;
 
-   prepare(instr);
+   if (!prepare(instr))
+ {
+CRI("Failed to prepare instruction '%s'. Check the code.", name);
+_instruction_del(instr);
+return NULL;
+ }
return instr;
 }
 

-- 




[EGIT] [core/efl] master 02/07: Evas filters: Silence some clang warnings

2014-02-13 Thread Jean-Philippe Andre
jpeg pushed a commit to branch master.

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

commit f603d5da86a5b56cdf7b4670b75755c3d0dbbc21
Author: Jean-Philippe Andre 
Date:   Fri Feb 14 12:07:54 2014 +0900

Evas filters: Silence some clang warnings

Remove @hidden tag. It does not exist.
Initialize value of pow2_div. In theory not needed but better be safe :)
---
 src/lib/evas/filters/evas_filter.c  | 2 +-
 src/lib/evas/filters/evas_filter_blur.c | 8 
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/lib/evas/filters/evas_filter.c 
b/src/lib/evas/filters/evas_filter.c
index f481a24..cd5602c 100644
--- a/src/lib/evas/filters/evas_filter.c
+++ b/src/lib/evas/filters/evas_filter.c
@@ -62,7 +62,7 @@ evas_filter_context_new(Evas_Public_Data *evas, Eina_Bool 
async)
return ctx;
 }
 
-/** @hidden private function to reset the filter context */
+/* Private function to reset the filter context. Used from parser.c */
 void
 evas_filter_context_clear(Evas_Filter_Context *ctx)
 {
diff --git a/src/lib/evas/filters/evas_filter_blur.c 
b/src/lib/evas/filters/evas_filter_blur.c
index 07b095a..66e627f 100644
--- a/src/lib/evas/filters/evas_filter_blur.c
+++ b/src/lib/evas/filters/evas_filter_blur.c
@@ -567,7 +567,7 @@ static void
 _gaussian_blur_horiz_alpha(DATA8 *src, DATA8 *dst, int radius, int w, int h)
 {
int *weights;
-   int k, pow2_div;
+   int k, pow2_div = 0;
 
weights = alloca((2 * radius + 1) * sizeof(int));
 
@@ -588,7 +588,7 @@ static void
 _gaussian_blur_vert_alpha(DATA8 *src, DATA8 *dst, int radius, int w, int h)
 {
int *weights;
-   int k, pow2_div;
+   int k, pow2_div = 0;
 
weights = alloca((2 * radius + 1) * sizeof(int));
 
@@ -609,7 +609,7 @@ static void
 _gaussian_blur_horiz_rgba(DATA32 *src, DATA32 *dst, int radius, int w, int h)
 {
int *weights;
-   int k, pow2_div;
+   int k, pow2_div = 0;
 
weights = alloca((2 * radius + 1) * sizeof(int));
 
@@ -630,7 +630,7 @@ static void
 _gaussian_blur_vert_rgba(DATA32 *src, DATA32 *dst, int radius, int w, int h)
 {
int *weights;
-   int k, pow2_div;
+   int k, pow2_div = 0;
 
weights = alloca((2 * radius + 1) * sizeof(int));
 

-- 




[EGIT] [core/efl] master 01/07: Evas filters: Prevent division by zero

2014-02-13 Thread Jean-Philippe Andre
jpeg pushed a commit to branch master.

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

commit eb1c452156641cdc14a5ba50b8cf661641baf736
Author: Jean-Philippe Andre 
Date:   Fri Feb 14 11:23:04 2014 +0900

Evas filters: Prevent division by zero

These can not happen, as all weights > 0.
Add a CRI message in case of div0.
Fixes CID 1174081, CID 1174080.
---
 src/lib/evas/filters/evas_filter_blur.c | 14 ++
 1 file changed, 14 insertions(+)

diff --git a/src/lib/evas/filters/evas_filter_blur.c 
b/src/lib/evas/filters/evas_filter_blur.c
index b6ae304..07b095a 100644
--- a/src/lib/evas/filters/evas_filter_blur.c
+++ b/src/lib/evas/filters/evas_filter_blur.c
@@ -452,6 +452,7 @@ _gaussian_blur_step_alpha(DATA8 *src, DATA8 *dst, int 
radius, int len, int step,
  acc += (*s) * weights[j + radius - k];
  divider += weights[j + radius - k];
   }
+if (!divider) goto div_zero;
 *dst = acc / divider;
  }
 
@@ -476,8 +477,14 @@ _gaussian_blur_step_alpha(DATA8 *src, DATA8 *dst, int 
radius, int len, int step,
  acc += (*s) * weights[j];
  divider += weights[j];
   }
+if (!divider) goto div_zero;
 *dst = acc / divider;
  }
+
+   return;
+
+div_zero:
+   CRI("Division by zero avoided! Something is very wrong here!");
 }
 
 static void
@@ -504,6 +511,7 @@ _gaussian_blur_step_rgba(DATA32 *src, DATA32 *dst, int 
radius, int len, int step
  acc[BLUE]  += B_VAL(s) * weights[weightidx];
  divider += weights[weightidx];
   }
+if (!divider) goto div_zero;
 A_VAL(dst) = acc[ALPHA] / divider;
 R_VAL(dst) = acc[RED]   / divider;
 G_VAL(dst) = acc[GREEN] / divider;
@@ -542,11 +550,17 @@ _gaussian_blur_step_rgba(DATA32 *src, DATA32 *dst, int 
radius, int len, int step
  acc[BLUE]  += B_VAL(s) * weights[j];
  divider += weights[j];
   }
+if (!divider) goto div_zero;
 A_VAL(dst) = acc[ALPHA] / divider;
 R_VAL(dst) = acc[RED]   / divider;
 G_VAL(dst) = acc[GREEN] / divider;
 B_VAL(dst) = acc[BLUE]  / divider;
  }
+
+   return;
+
+div_zero:
+   CRI("Division by zero avoided! Something is very wrong here!");
 }
 
 static void

-- 




[EGIT] [core/efl] master 04/07: Doc: Fix compilation warning in preview_text_filter.c

2014-02-13 Thread Jean-Philippe Andre
jpeg pushed a commit to branch master.

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

commit 29a7fe464ea5f987734ea84ff83a61a41fa749a0
Author: Jean-Philippe Andre 
Date:   Fri Feb 14 12:20:51 2014 +0900

Doc: Fix compilation warning in preview_text_filter.c

Init variable properly.
---
 doc/previews/preview_text_filter.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/doc/previews/preview_text_filter.c 
b/doc/previews/preview_text_filter.c
index d462a1a..86f93be 100644
--- a/doc/previews/preview_text_filter.c
+++ b/doc/previews/preview_text_filter.c
@@ -60,7 +60,7 @@ _usage(const char *argv0, FILE *f)
 int
 main(int argc, char **argv)
 {
-   Widget_Preview_Data wpd = { NULL, NULL, NULL };
+   Widget_Preview_Data wpd = { NULL, NULL, NULL, NULL };
const char *font = "Sans";
const char *filter, *text;
int fontsize = 32;

-- 




[EGIT] [core/efl] master 01/01: Doc: Try to fix nightly builds

2014-02-13 Thread Jean-Philippe Andre
jpeg pushed a commit to branch master.

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

commit 568c014dc9bcade3c664faccfb601516a9174ed2
Author: Jean-Philippe Andre 
Date:   Fri Feb 14 10:04:02 2014 +0900

Doc: Try to fix nightly builds

Nightly build failed with (make doc):
cd: ../../../src/lib/eo/.libs: No such file or directory
Looks like there's one too many ../

I guess the build dir is not the source dir on the build bots.
---
 doc/previews/Makefile.am | 36 ++--
 1 file changed, 18 insertions(+), 18 deletions(-)

diff --git a/doc/previews/Makefile.am b/doc/previews/Makefile.am
index 478574d..72d1531 100644
--- a/doc/previews/Makefile.am
+++ b/doc/previews/Makefile.am
@@ -3,23 +3,23 @@ if EFL_BUILD_DOC
 .PHONY: doc
 
 AM_CPPFLAGS = \
-   -I$(top_srcdir)/src/lib/eo \
-   -I$(top_srcdir)/src/lib/efl \
-   -I$(top_srcdir)/src/lib/eina \
-   -I$(top_srcdir)/src/lib/evas \
-   -I$(top_srcdir)/src/lib/ecore \
-   -I$(top_srcdir)/src/lib/ecore_evas \
+   -I$(abs_top_srcdir)/src/lib/eo \
+   -I$(abs_top_srcdir)/src/lib/efl \
+   -I$(abs_top_srcdir)/src/lib/eina \
+   -I$(abs_top_srcdir)/src/lib/evas \
+   -I$(abs_top_srcdir)/src/lib/ecore \
+   -I$(abs_top_srcdir)/src/lib/ecore_evas \
-DEFL_BETA_API_SUPPORT=1 \
-DEFL_EO_API_SUPPORT=1 \
-D_GNU_SOURCE
 
 LDADD = \
-   -L$(top_srcdir)/src/lib/eo/.libs \
-   -L$(top_srcdir)/src/lib/eina/.libs \
-   -L$(top_srcdir)/src/lib/ecore/.libs \
-   -L$(top_srcdir)/src/lib/evas/.libs \
-   -L$(top_srcdir)/src/lib/ecore_evas/.libs \
--leo \
+   -L$(abs_top_builddir)/src/lib/eo/.libs \
+   -L$(abs_top_builddir)/src/lib/eina/.libs \
+   -L$(abs_top_builddir)/src/lib/ecore/.libs \
+   -L$(abs_top_builddir)/src/lib/evas/.libs \
+   -L$(abs_top_builddir)/src/lib/ecore_evas/.libs \
+   -leo \
-leina \
-levas \
-lecore \
@@ -27,8 +27,8 @@ LDADD = \
 
 noinst_PROGRAMS = preview_text_filter
 
-DATADIR = ${top_srcdir}/doc/previews/img
-HTMLDIR = ${top_srcdir}/doc/html
+DATADIR = ${abs_top_srcdir}/doc/previews/img
+HTMLDIR = ${abs_top_srcdir}/doc/html
 
 PREVIEWS = blend blur bump curve grow mask transform \
example_1
@@ -40,11 +40,11 @@ previews-data:
echo "  GEN  filter_$${a}.png" ; \
FONT="Sans" ; \
SIZE=24 ; \
-   FILTER=`cat 
${top_srcdir}/src/examples/evas/filters/filter_$${a}.txt` ; \
-   if [ -e ${top_srcdir}/doc/previews/filter_$${a}.sh ] ; then \
-   source ${top_srcdir}/doc/previews/filter_$${a}.sh ; \
+   FILTER=`cat 
${abs_top_srcdir}/src/examples/evas/filters/filter_$${a}.txt` ; \
+   if [ -e ${abs_top_srcdir}/doc/previews/filter_$${a}.sh ] ; then 
\
+   source ${abs_top_srcdir}/doc/previews/filter_$${a}.sh ; 
\
fi ; \
-   $(top_srcdir)/doc/previews/preview_text_filter "$${TEXT}" 
"$${FILTER}" "$(DATADIR)/filter_$${a}.png" "$${FONT}" "$${SIZE}" ; \
+   $(abs_top_srcdir)/doc/previews/preview_text_filter "$${TEXT}" 
"$${FILTER}" "$(DATADIR)/filter_$${a}.png" "$${FONT}" "$${SIZE}" ; \
cp "$(DATADIR)/filter_$${a}.png" "$(HTMLDIR)/" ; \
done
 

-- 




[EGIT] [core/efl] master 02/05: Doc: Add filter examples from the doc

2014-02-13 Thread Jean-Philippe Andre
jpeg pushed a commit to branch master.

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

commit 8665a3d574f51f587a2d6e5227e6745baf218be4
Author: Jean-Philippe Andre 
Date:   Thu Feb 13 15:06:17 2014 +0900

Doc: Add filter examples from the doc

The filter code is a copy and paste from the doc.
Maybe the code should be in an include file, so we're sure the
preview and the documentation code are the same?
---
 doc/previews/Makefile.am |  2 +-
 doc/previews/filter_blend.sh |  5 +
 doc/previews/filter_blur.sh  |  8 
 doc/previews/filter_bump.sh  |  8 
 doc/previews/filter_curve.sh |  9 +
 doc/previews/filter_example_1.sh | 10 ++
 doc/previews/filter_grow.sh  |  9 +
 doc/previews/filter_mask.sh  | 10 ++
 doc/previews/filter_transform.sh |  9 +
 9 files changed, 69 insertions(+), 1 deletion(-)

diff --git a/doc/previews/Makefile.am b/doc/previews/Makefile.am
index afc3e94..e838f1f 100644
--- a/doc/previews/Makefile.am
+++ b/doc/previews/Makefile.am
@@ -27,7 +27,7 @@ noinst_PROGRAMS = preview_text_filter
 DATADIR = ${top_srcdir}/doc/previews/img
 HTMLDIR = ${top_srcdir}/doc/html
 
-PREVIEWS =
+PREVIEWS = blend blur bump curve grow mask transform
 
 previews-data:
$(MKDIR_P) $(DATADIR)
diff --git a/doc/previews/filter_blend.sh b/doc/previews/filter_blend.sh
new file mode 100644
index 000..eee0446
--- /dev/null
+++ b/doc/previews/filter_blend.sh
@@ -0,0 +1,5 @@
+TEXT="Blend"
+FONT="Sans:style=bold"
+SIZE=32
+FILTER="blend (color = #3399FF);"
+
diff --git a/doc/previews/filter_blur.sh b/doc/previews/filter_blur.sh
new file mode 100644
index 000..a844419
--- /dev/null
+++ b/doc/previews/filter_blur.sh
@@ -0,0 +1,8 @@
+TEXT="Blur"
+FONT="Sans:style=bold"
+SIZE=32
+FILTER="
+blur (10, color = black, oy = 5, ox = 5);
+blend ();
+"
+
diff --git a/doc/previews/filter_bump.sh b/doc/previews/filter_bump.sh
new file mode 100644
index 000..7fa8787
--- /dev/null
+++ b/doc/previews/filter_bump.sh
@@ -0,0 +1,8 @@
+TEXT="Bump"
+FONT="Sans:style=bold"
+SIZE=64
+FILTER="
+buffer : a (alpha);
+blur (5, dst = a);
+bump (map = a, compensate = yes, color = cyan, specular = 10.0);
+"
diff --git a/doc/previews/filter_curve.sh b/doc/previews/filter_curve.sh
new file mode 100644
index 000..96e3f11
--- /dev/null
+++ b/doc/previews/filter_curve.sh
@@ -0,0 +1,9 @@
+TEXT="Curve"
+FONT="Sans:style=bold"
+SIZE=64
+FILTER="
+buffer : a (alpha);
+blur (4, dst = a);
+curve (0:0 - 20:0 - 60:255 - 160:255 - 200:0 - 255:0, src = a, dst = a);
+blend(src = a, color = black);
+"
diff --git a/doc/previews/filter_example_1.sh b/doc/previews/filter_example_1.sh
new file mode 100644
index 000..0098a6b
--- /dev/null
+++ b/doc/previews/filter_example_1.sh
@@ -0,0 +1,10 @@
+TEXT="Evas Filters"
+FONT="Sans"
+SIZE=50
+FILTER="
+buffer : fat (alpha);
+grow (8, dst = fat);
+blur (12, src = fat, color = darkblue);
+blur (4, color = cyan);
+blend ();
+"
diff --git a/doc/previews/filter_grow.sh b/doc/previews/filter_grow.sh
new file mode 100644
index 000..b675ab1
--- /dev/null
+++ b/doc/previews/filter_grow.sh
@@ -0,0 +1,9 @@
+TEXT="Grow - Contour"
+FONT="Sans:style=bold"
+SIZE=32
+FILTER="
+buffer : fat (alpha);
+grow (4, dst = fat);
+blend (src = fat, color = black);
+blend (color = white);
+"
diff --git a/doc/previews/filter_mask.sh b/doc/previews/filter_mask.sh
new file mode 100644
index 000..ab22e55
--- /dev/null
+++ b/doc/previews/filter_mask.sh
@@ -0,0 +1,10 @@
+TEXT="Mask"
+FONT="Sans:style=bold"
+SIZE=64
+FILTER="
+buffer: a (alpha);
+blur(5, dst = a);
+curve(points = 0:255 - 128:255 - 255:0, src = a, dst = a);
+blend(color = black);
+mask(mask = a, color = cyan);
+"
diff --git a/doc/previews/filter_transform.sh b/doc/previews/filter_transform.sh
new file mode 100644
index 000..6acd845
--- /dev/null
+++ b/doc/previews/filter_transform.sh
@@ -0,0 +1,9 @@
+TEXT="Transform - Mirror effect"
+FONT="Sans"
+SIZE=50
+FILTER="
+buffer : t (alpha);
+transform (oy = 20, dst = t);
+blend (src = t, color = silver);
+blend (color = white);
+"

-- 




[EGIT] [core/efl] master 03/05: Evas filters: Add images to the html doc

2014-02-13 Thread Jean-Philippe Andre
jpeg pushed a commit to branch master.

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

commit 872ab8aa4db9b23f3b70cadfbcaedccf4f1b7aa1
Author: Jean-Philippe Andre 
Date:   Thu Feb 13 15:10:57 2014 +0900

Evas filters: Add images to the html doc
---
 src/lib/evas/filters/evas_filter_parser.c | 32 +++
 1 file changed, 32 insertions(+)

diff --git a/src/lib/evas/filters/evas_filter_parser.c 
b/src/lib/evas/filters/evas_filter_parser.c
index 419642d..2724fe1 100644
--- a/src/lib/evas/filters/evas_filter_parser.c
+++ b/src/lib/evas/filters/evas_filter_parser.c
@@ -981,6 +981,14 @@ _blend_padding_update(Evas_Filter_Program *pgm, 
Evas_Filter_Instruction *instr,
 
   If @a src is an alpha buffer and @a dst is an RGBA buffer, then the @a color 
option should be set.
 
+  @code
+blend (color = #3399FF);
+  @endcode
+
+  
+  @image html filter_blend.png
+  
+
   @since 1.9
  */
 
@@ -1088,6 +1096,10 @@ _blur_padding_update(Evas_Filter_Program *pgm, 
Evas_Filter_Instruction *instr,
 blend ();
   @endcode
 
+  
+  @image html filter_blur.png
+  
+
   @since 1.9
  */
 
@@ -1149,6 +1161,10 @@ _blur_instruction_prepare(Evas_Filter_Instruction *instr)
 bump (map = a, compensate = yes, color = cyan, specular = 10.0);
   @endcode
 
+  
+  @image html filter_bump.png
+  
+
   @since 1.9
  */
 
@@ -1217,6 +1233,10 @@ _bump_instruction_prepare(Evas_Filter_Instruction *instr)
 blend(src = a, color = black);
   @endcode
 
+  
+  @image html filter_curve.png
+  
+
   The curve command can be used to alter the output of a blur operation.
 
   @since 1.9
@@ -1456,6 +1476,10 @@ _grow_padding_update(Evas_Filter_Program *pgm, 
Evas_Filter_Instruction *instr,
   this buffer in black in the background. Blending white on top of that will
   give a simple impression of stroked text.
 
+  
+  @image html filter_grow.png
+  
+
   @since 1.9
  */
 
@@ -1505,6 +1529,10 @@ _grow_instruction_prepare(Evas_Filter_Instruction *instr)
   @endcode
   This will create a simple cyan inner glow effect on black text.
 
+  
+  @image html filter_mask.png
+  
+
   @since 1.9
  */
 
@@ -1586,6 +1614,10 @@ _transform_padding_update(Evas_Filter_Program *pgm,
   @endcode
   This will create a mirrored text effect, for a font of 50px.
 
+  
+  @image html filter_transform.png
+  
+
   @note Because of the meaning of @a oy, this effect probably needs to be
 customized for a single font size (FIXME).
 

-- 




  1   2   3   >