[EGIT] [core/efl] master 01/14: mailmap: Add myself and unify my email addresses

2014-03-11 Thread Jean-Philippe ANDRÉ
jpeg pushed a commit to branch master.

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

commit bf7579ebe69328db135171ef4e62228025efd124
Author: Jean-Philippe Andre 
Date:   Mon Mar 10 14:53:46 2014 +0900

mailmap: Add myself and unify my email addresses

I didn't set up my personal laptop with my work email :)
---
 .mailmap | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/.mailmap b/.mailmap
index 1578b84..b2d84f6 100644
--- a/.mailmap
+++ b/.mailmap
@@ -55,3 +55,5 @@ Samuel F. Baggen  Samuel F. Baggen 
 Thanatermesis 

 Jean Guyomarc'h  Jean GUYOMARC'H 

 Marcel Hollerbach  Marcel Hollerbach 

+Jean-Philippe ANDRÉ  Jean-Philippe Andre 

+Jean-Philippe ANDRÉ  Jean-Philippe ANDRE 

-- 




[EGIT] [core/efl] master 07/14: Evas filters: Fix uninitialized variable warning

2014-03-11 Thread Jean-Philippe ANDRÉ
jpeg pushed a commit to branch master.

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

commit a37a1d458d71f1566add9bdcfa736e63e2f596e8
Author: Jean-Philippe Andre 
Date:   Tue Mar 11 12:18:21 2014 +0900

Evas filters: Fix uninitialized variable warning
---
 src/lib/evas/filters/evas_filter_parser.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/lib/evas/filters/evas_filter_parser.c 
b/src/lib/evas/filters/evas_filter_parser.c
index ed0c4dd..907d7b5 100644
--- a/src/lib/evas/filters/evas_filter_parser.c
+++ b/src/lib/evas/filters/evas_filter_parser.c
@@ -1017,7 +1017,7 @@ static void
 _blur_padding_update(Evas_Filter_Program *pgm, Evas_Filter_Instruction *instr,
  int *padl, int *padr, int *padt, int *padb)
 {
-   Eina_Bool yset;
+   Eina_Bool yset = EINA_FALSE;
int rx, ry, ox, oy, l, r, t, b;
const char *inbuf, *outbuf;
Buffer *in, *out;

-- 




[EGIT] [core/efl] master 10/14: Evas filters: Prepare optimization paths for BOX blur

2014-03-11 Thread Jean-Philippe ANDRÉ
jpeg pushed a commit to branch master.

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

commit 4e249143a52c370abfb2bf304d7d8dbacb930aeb
Author: Jean-Philippe Andre 
Date:   Tue Mar 11 16:18:41 2014 +0900

Evas filters: Prepare optimization paths for BOX blur

Actually, there is a very nice trick with BOX blur.
Pass BOX blur 3 times and you can approximate a GAUSSIAN
blur with up to 3% accuracy. This is way more than enough
for just a simple graphical effect.

So, despite the crappy quality of BOX blur, we should
optimize it a lot so we can replace large GAUSSIAN blurs
with series of BOX blurs instead.

Source: Wikipedia's page on box blur :)

This commit also moves around some duplicated definitions.
---
 src/Makefile_Evas.am|   5 +-
 src/lib/evas/filters/blur/blur_box_alpha_.c |  68 +
 src/lib/evas/filters/blur/blur_box_rgba_.c  |  95 +
 src/lib/evas/filters/evas_filter.c  |  14 +-
 src/lib/evas/filters/evas_filter_blend.c|  25 +---
 src/lib/evas/filters/evas_filter_blur.c | 205 +++-
 src/lib/evas/filters/evas_filter_private.h  |   9 ++
 src/lib/evas/filters/evas_filter_utils.c|  12 ++
 8 files changed, 217 insertions(+), 216 deletions(-)

diff --git a/src/Makefile_Evas.am b/src/Makefile_Evas.am
index 9dca181..3ba3b84 100644
--- a/src/Makefile_Evas.am
+++ b/src/Makefile_Evas.am
@@ -442,7 +442,10 @@ lib/evas/filters/evas_filter_utils.c \
 lib/evas/filters/evas_filter_private.h
 
 EXTRA_DIST += \
-lib/evas/filters/blur/blur_gaussian_alpha_.c
+lib/evas/filters/blur/blur_gaussian_alpha_.c \
+lib/evas/filters/blur/blur_gaussian_rgba_.c \
+lib/evas/filters/blur/blur_box_alpha_.c \
+lib/evas/filters/blur/blur_box_rgba_.c
 
 ### Engines
 
diff --git a/src/lib/evas/filters/blur/blur_box_alpha_.c 
b/src/lib/evas/filters/blur/blur_box_alpha_.c
new file mode 100644
index 000..2202152
--- /dev/null
+++ b/src/lib/evas/filters/blur/blur_box_alpha_.c
@@ -0,0 +1,68 @@
+/* @file blur_box_alpha_.c
+ * Should define the functions:
+ * - _box_blur_horiz_alpha_step
+ * - _box_blur_vert_alpha_step
+ */
+
+#include "evas_common_private.h"
+#include "../evas_filter_private.h"
+
+#if !defined (FUNCTION_NAME) || !defined (STEP)
+# error Must define FUNCTION_NAME and STEP
+#endif
+
+static inline void
+FUNCTION_NAME(const DATA8* restrict src, DATA8* restrict dst,
+  const int radius, const int len,
+  const int loops, const int loopstep)
+{
+   DEFINE_DIVIDER(2 * radius + 1);
+   const int left = MIN(radius, len);
+   const int right = MIN(radius, (len - radius));
+   int acc = 0, k;
+
+   for (int l = loops; l; --l)
+ {
+const DATA8* restrict sr = src;
+const DATA8* restrict sl = src;
+DATA8* restrict d = dst;
+
+for (k = left; k; k--)
+  {
+ acc += *sr;
+ sr += STEP;
+  }
+
+for (k = 0; k < left; k++)
+  {
+ acc += *sr;
+ *d = acc / (k + left + 1);
+ sr += STEP;
+ d += STEP;
+  }
+
+for (k = len - (2 * radius); k; k--)
+  {
+ acc += *sr;
+ *d = DIVIDE(acc);
+ acc -= *sl;
+ sl += STEP;
+ sr += STEP;
+ d += STEP;
+  }
+
+for (k = right; k; k--)
+  {
+ *d = acc / (k + right);
+ acc -= *sl;
+ d += STEP;
+ sl += STEP;
+  }
+
+src += loopstep;
+dst += loopstep;
+ }
+}
+
+#undef FUNCTION_NAME
+#undef STEP
diff --git a/src/lib/evas/filters/blur/blur_box_rgba_.c 
b/src/lib/evas/filters/blur/blur_box_rgba_.c
new file mode 100644
index 000..b930d6e
--- /dev/null
+++ b/src/lib/evas/filters/blur/blur_box_rgba_.c
@@ -0,0 +1,95 @@
+/* @file blur_box_rgba_.c
+ * Should define the functions:
+ * - _box_blur_horiz_rgba_step
+ * - _box_blur_vert_rgba_step
+ */
+
+#include "evas_common_private.h"
+#include "../evas_filter_private.h"
+
+#if !defined (FUNCTION_NAME) || !defined (STEP)
+# error Must define FUNCTION_NAME and STEP
+#endif
+
+static inline void
+FUNCTION_NAME(const DATA32* restrict src, DATA32* restrict dst,
+  const int radius, const int len,
+  const int loops, const int loopstep)
+{
+   DEFINE_DIVIDER(2 * radius + 1);
+   const int left = MIN(radius, len);
+   const int right = MIN(radius, (len - radius));
+
+   for (int l = loops; l; --l)
+ {
+int acc[4] = {0};
+int x, k;
+int divider;
+
+const DATA8* restrict sl = (DATA8 *) src;
+const DATA8* restrict sr = (DATA8 *) src;
+DATA8* restrict d = (DATA8 *) dst;
+
+// Read-ahead
+for (x = left; x; x--)
+  {
+ for (k = 0; k < 4; k++)
+   acc[k] += sr[k];
+ sr += STEP;
+  }
+
+// Left
+f

[EGIT] [core/efl] master 02/14: Evas filters: Improve debug logs

2014-03-11 Thread Jean-Philippe ANDRÉ
jpeg pushed a commit to branch master.

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

commit caa8789424c68c6e37d231eb22063c4ca02f8225
Author: Jean-Philippe Andre 
Date:   Mon Mar 10 16:05:55 2014 +0900

Evas filters: Improve debug logs

According to Gustavo's comment :)
---
 src/lib/evas/filters/evas_filter.c | 7 +--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/src/lib/evas/filters/evas_filter.c 
b/src/lib/evas/filters/evas_filter.c
index 10ff8ad..a040255 100644
--- a/src/lib/evas/filters/evas_filter.c
+++ b/src/lib/evas/filters/evas_filter.c
@@ -296,7 +296,8 @@ 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)
 {
-   DBG("Source already rendered");
+   DBG("Source already rendered: '%s' of type '%s'",
+   fb->source_name, 
eo_class_name_get(eo_class_get(fb->source)));
_filter_buffer_backing_free(fb);
fb->w = source->cur->geometry.w;
fb->h = source->cur->geometry.h;
@@ -315,7 +316,9 @@ evas_filter_context_proxy_render_all(Evas_Filter_Context 
*ctx, Eo *eo_obj,
 }
   else
 {
-   DBG("Source needs to be rendered");
+   DBG("Source needs to be rendered: '%s' of type '%s' (%s)",
+   fb->source_name, 
eo_class_name_get(eo_class_get(fb->source)),
+   source->proxy->redraw ? "redraw" : "no surface");
_proxy_subrender(ctx->evas->evas, fb->source, eo_obj, obj, 
do_async);
_filter_buffer_backing_free(fb);
fb->w = source->cur->geometry.w;

-- 




[EGIT] [core/efl] master 11/14: Evas filters: Use box blur by default

2014-03-11 Thread Jean-Philippe ANDRÉ
jpeg pushed a commit to branch master.

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

commit 2a1ba1b9086bdf9d3d474ec7f8a5cfe37fcdd61a
Author: Jean-Philippe Andre 
Date:   Tue Mar 11 18:21:46 2014 +0900

Evas filters: Use box blur by default

BOX blur is a lot faster (and easier to optimize, too)
than GAUSSIAN blur. Repeating 2x or 3x BOX blur will also
give similar results to GAUSSIAN blur (very smooth), but
in much less time.

Add a count parameter to the BOX blur instruction.
---
 src/lib/evas/filters/evas_filter.c | 81 ++
 src/lib/evas/filters/evas_filter_parser.c  | 61 ++
 src/lib/evas/filters/evas_filter_private.h |  2 +
 src/lib/evas/include/evas_filter.h |  7 +--
 4 files changed, 130 insertions(+), 21 deletions(-)

diff --git a/src/lib/evas/filters/evas_filter.c 
b/src/lib/evas/filters/evas_filter.c
index b3f5836..6e899a9 100644
--- a/src/lib/evas/filters/evas_filter.c
+++ b/src/lib/evas/filters/evas_filter.c
@@ -898,7 +898,7 @@ evas_filter_command_fill_add(Evas_Filter_Context *ctx, void 
*draw_context,
 int
 evas_filter_command_blur_add(Evas_Filter_Context *ctx, void *drawctx,
  int inbuf, int outbuf, Evas_Filter_Blur_Type type,
- int dx, int dy, int ox, int oy)
+ int dx, int dy, int ox, int oy, int count)
 {
Evas_Filter_Command *cmd = NULL;
Evas_Filter_Buffer *in = NULL, *out = NULL, *tmp = NULL, *in_dy = NULL;
@@ -911,18 +911,79 @@ evas_filter_command_blur_add(Evas_Filter_Context *ctx, 
void *drawctx,
EINA_SAFETY_ON_NULL_RETURN_VAL(ctx, -1);
EINA_SAFETY_ON_NULL_RETURN_VAL(drawctx, -1);
 
+   if (dx < 0) dx = 0;
+   if (dy < 0) dy = 0;
+   if (!dx && !dy) goto fail;
+
switch (type)
  {
+  case EVAS_FILTER_BLUR_GAUSSIAN:
+count = 1;
+break;
+
   case EVAS_FILTER_BLUR_BOX:
-if (dx < 0) dx = 0;
-if (dy < 0) dy = 0;
-if (!dx && !dy) goto fail;
+count = MIN(MAX(1, count), 6);
 break;
-  case EVAS_FILTER_BLUR_GAUSSIAN:
-if (dx < 0) dx = 0;
-if (dy < 0) dy = 0;
-if (!dx && !dy) goto fail;
+
+  case EVAS_FILTER_BLUR_DEFAULT:
+count = 1;
+
+/* In DEFAULT mode we cheat, depending on the size of the kernel:
+ * For 1px to 2px, use true Gaussian blur.
+ * For 3px to 6px, use two Box blurs.
+ * For more than 6px, use three Box blurs.
+ * This will give both nicer and MUCH faster results than Gaussian.
+ *
+ * NOTE: When implementing blur with GL shaders, other tricks will be
+ * needed, of course!
+ */
+{
+   int tmp_out = outbuf;
+   int tmp_in = inbuf;
+   int tmp_ox = ox;
+   int tmp_oy = oy;
+
+   id = -1;
+   if (dx && dy)
+ {
+tmp = evas_filter_temporary_buffer_get(ctx, 0, 0, EINA_TRUE);
+if (!tmp) goto fail;
+tmp_in = tmp_out = tmp->id;
+tmp_ox = tmp_oy = 0;
+ }
+
+   if (dx)
+ {
+if (dx <= 2)
+  type = EVAS_FILTER_BLUR_GAUSSIAN;
+else
+  type = EVAS_FILTER_BLUR_BOX;
+
+id = evas_filter_command_blur_add(ctx, drawctx, inbuf, tmp_out,
+  type, dx, 0, tmp_ox, tmp_oy, 
0);
+if (id < 0) goto fail;
+cmd = _evas_filter_command_get(ctx, id);
+cmd->blur.auto_count = EINA_TRUE;
+ }
+
+   if (dy)
+ {
+if (dy <= 2)
+  type = EVAS_FILTER_BLUR_GAUSSIAN;
+else
+  type = EVAS_FILTER_BLUR_BOX;
+
+id = evas_filter_command_blur_add(ctx, drawctx, inbuf, tmp_in,
+  type, 0, dy, ox, oy, 0);
+if (id < 0) goto fail;
+cmd = _evas_filter_command_get(ctx, id);
+cmd->blur.auto_count = EINA_TRUE;
+ }
+
+   return id;
+}
 break;
+
   default:
 CRI("Not implemented yet!");
 goto fail;
@@ -1031,6 +1092,7 @@ evas_filter_command_blur_add(Evas_Filter_Context *ctx, 
void *drawctx,
 cmd->blur.type = type;
 cmd->blur.dx = dx;
 cmd->blur.dy = 0;
+cmd->blur.count = count;
 DRAW_COLOR_SET(R, G, B, A);
 ret = cmd->id;
  }
@@ -1043,6 +1105,7 @@ evas_filter_command_blur_add(Evas_Filter_Context *ctx, 
void *drawctx,
 cmd->blur.type = type;
 cmd->blur.dx = 0;
 cmd->blur.dy = dy;
+cmd->blur.count = count;
 DRAW_COLOR_SET(R, G, B, A);
 if (ret <= 0) ret = cmd->id;
  }
@@ -1157,7 +1220,7 @@ evas_filter_command_grow_add(Evas_Filter_Cont

[EGIT] [core/efl] master 12/14: Evas filters: Optimize alpha box blur

2014-03-11 Thread Jean-Philippe ANDRÉ
jpeg pushed a commit to branch master.

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

commit 4443ecfa8be65aef0dedcb0d749c9081769cc140
Author: Jean-Philippe Andre 
Date:   Wed Mar 12 10:20:27 2014 +0900

Evas filters: Optimize alpha box blur

Use two optimizable functions for BOX blur: vertical and horizontal.
These functions will run as many times as requested (from 1 to 6 max).

The horizontal case is pretty straightforward as the source is already
contiguous (nice in terms of cache hits). The only catch is to swap
src and dst without ever writing to the input buffer.

In case of vertical blur, we apply the same method as above, after
rotating the column into a horizontal (contiguous) span, and rotating
it back afterwards.

Now, the same needs to be done for RGBA :)
---
 src/lib/evas/filters/blur/blur_box_alpha_.c | 266 +++-
 src/lib/evas/filters/evas_filter.c  |   2 +-
 src/lib/evas/filters/evas_filter_blur.c |  59 --
 3 files changed, 270 insertions(+), 57 deletions(-)

diff --git a/src/lib/evas/filters/blur/blur_box_alpha_.c 
b/src/lib/evas/filters/blur/blur_box_alpha_.c
index 2202152..4a9facd 100644
--- a/src/lib/evas/filters/blur/blur_box_alpha_.c
+++ b/src/lib/evas/filters/blur/blur_box_alpha_.c
@@ -1,68 +1,246 @@
 /* @file blur_box_alpha_.c
- * Should define the functions:
- * - _box_blur_horiz_alpha_step
- * - _box_blur_vert_alpha_step
+ * Defines the following function:
+ * _box_blur_alpha_step
  */
 
 #include "evas_common_private.h"
 #include "../evas_filter_private.h"
 
-#if !defined (FUNCTION_NAME) || !defined (STEP)
-# error Must define FUNCTION_NAME and STEP
-#endif
-
 static inline void
-FUNCTION_NAME(const DATA8* restrict src, DATA8* restrict dst,
-  const int radius, const int len,
-  const int loops, const int loopstep)
+_box_blur_alpha_horiz_step(const DATA8* restrict const srcdata,
+   DATA8* restrict const dstdata,
+   const int* restrict const radii,
+   const int len,
+   const int loops)
 {
-   DEFINE_DIVIDER(2 * radius + 1);
-   const int left = MIN(radius, len);
-   const int right = MIN(radius, (len - radius));
-   int acc = 0, k;
+   const DATA8* restrict src;
+   DATA8* restrict dst;
+   DATA8* restrict span1;
+   DATA8* restrict span2;
 
-   for (int l = loops; l; --l)
+#if DIV_USING_BITSHIFT
+   int pow2_shifts[6] = {0};
+   int numerators[6] = {0};
+   for (int run = 0; radii[run]; run++)
  {
-const DATA8* restrict sr = src;
-const DATA8* restrict sl = src;
-DATA8* restrict d = dst;
+const int div = radii[run] * 2 + 1;
+pow2_shifts[run] = evas_filter_smallest_pow2_larger_than(div << 10);
+numerators[run] = (1 << pow2_shifts[run]) / (div);
+ }
+#endif
+
+   span1 = alloca(len);
+   span2 = alloca(len);
 
-for (k = left; k; k--)
+   // For each line, apply as many blurs as requested
+   for (int l = 0; l < loops; l++)
+ {
+int run;
+
+// New line: reset source & destination pointers
+src = srcdata + len * l;
+if (!radii[1]) // Only one run
+  dst = dstdata + len * l;
+else
+  dst = span1;
+
+// Apply blur with current radius
+for (run = 0; radii[run]; run++)
   {
- acc += *sr;
- sr += STEP;
+ const int radius = radii[run];
+ const int left = MIN(radius, len);
+ const int right = MIN(radius, (len - radius));
+ int acc = 0;
+
+#if DIV_USING_BITSHIFT
+ const int pow2 = pow2_shifts[run];
+ const int numerator = numerators[run];
+#else
+ const int divider = 2 * radius + 1;
+#endif
+
+ const DATA8* restrict sr = src;
+ const DATA8* restrict sl = src;
+ DATA8* restrict d = dst;
+
+ // Read-ahead & accumulate
+ for (int k = left; k; k--)
+   {
+  acc += *sr;
+  sr += 1;
+   }
+
+ // Left edge
+ for (int k = 0; k < left; k++)
+   {
+  acc += *sr;
+  *d = acc / (k + left + 1);
+  sr += 1;
+  d += 1;
+   }
+
+ // Middle part, normal blur
+ for (int k = len - (2 * radius); k; k--)
+   {
+  acc += *sr;
+  *d = DIVIDE(acc);
+  acc -= *sl;
+  sl += 1;
+  sr += 1;
+  d += 1;
+   }
+
+ // Right edge
+ for (int k = right; k; k--)
+   {
+  *d = acc / (k + right);
+  acc -= *sl;
+  d += 1;
+  sl += 1;
+   }
+

[EGIT] [core/efl] master 05/14: Evas filters: Add optimizable blur function

2014-03-11 Thread Jean-Philippe ANDRÉ
jpeg pushed a commit to branch master.

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

commit cb6970038959d6263a6334be31f69c23c7685a6e
Author: Jean-Philippe Andre 
Date:   Mon Mar 10 18:36:28 2014 +0900

Evas filters: Add optimizable blur function

Prepare optimization paths for blur operations, as they are VERY
costly. This simple change, when using gcc -O3 flag, boosts
horizontal blur performance by > 50%, because STEP is 1 (and
so, memory accesses, increments, etc... are all very simple)

The objective is to have support for NEON, MMX, SSE, too, with
runtime detection.
---
 src/Makefile_Evas.am |  2 +
 src/lib/evas/filters/blur/blur_gaussian_alpha_.c | 74 +++
 src/lib/evas/filters/evas_filter_blur.c  | 91 
 src/lib/evas/filters/evas_filter_private.h   |  5 ++
 4 files changed, 96 insertions(+), 76 deletions(-)

diff --git a/src/Makefile_Evas.am b/src/Makefile_Evas.am
index 41f7747..9dca181 100644
--- a/src/Makefile_Evas.am
+++ b/src/Makefile_Evas.am
@@ -441,6 +441,8 @@ lib/evas/filters/evas_filter_transform.c \
 lib/evas/filters/evas_filter_utils.c \
 lib/evas/filters/evas_filter_private.h
 
+EXTRA_DIST += \
+lib/evas/filters/blur/blur_gaussian_alpha_.c
 
 ### Engines
 
diff --git a/src/lib/evas/filters/blur/blur_gaussian_alpha_.c 
b/src/lib/evas/filters/blur/blur_gaussian_alpha_.c
new file mode 100644
index 000..297ddb7
--- /dev/null
+++ b/src/lib/evas/filters/blur/blur_gaussian_alpha_.c
@@ -0,0 +1,74 @@
+/* Datatypes and MIN macro */
+#include "evas_common_private.h"
+#include "../evas_filter_private.h"
+
+#if !defined (FUNCTION_NAME) || !defined (STEP)
+# error Must define FUNCTION_NAME and STEP
+#endif
+
+static inline void
+FUNCTION_NAME(const DATA8* restrict srcdata, DATA8* restrict dstdata,
+  const int radius, const int len,
+  const int loops, const int loopstep,
+  const int* restrict weights, const int pow2_divider)
+{
+   int i, j, k, acc, divider;
+   const int diameter = 2 * radius + 1;
+   const int left = MIN(radius, len);
+   const int right = MIN(radius, (len - radius));
+   const DATA8* restrict s;
+   const DATA8* restrict src;
+   DATA8* restrict dst;
+
+   for (i = loops; i; --i)
+ {
+src = srcdata;
+dst = dstdata;
+
+// left
+for (k = 0; k < left; k++, dst += STEP)
+  {
+ acc = 0;
+ divider = 0;
+ s = src;
+ for (j = 0; j <= k + radius; j++, s += STEP)
+   {
+  acc += (*s) * weights[j + radius - k];
+  divider += weights[j + radius - k];
+   }
+ //if (!divider) abort();
+ *dst = acc / divider;
+  }
+
+// middle
+for (k = radius; k < (len - radius); k++, src += STEP, dst += STEP)
+  {
+ acc = 0;
+ s = src;
+ for (j = 0; j < diameter; j++, s += STEP)
+   acc += (*s) * weights[j];
+ *dst = acc >> pow2_divider;
+  }
+
+// right
+for (k = 0; k < right; k++, dst += STEP, src += STEP)
+  {
+ acc = 0;
+ divider = 0;
+ s = src;
+ for (j = 0; j < 2 * radius - k; j++, s += STEP)
+   {
+  acc += (*s) * weights[j];
+  divider += weights[j];
+   }
+ //if (!divider) abort();
+ *dst = acc / divider;
+  }
+
+dstdata += loopstep;
+srcdata += loopstep;
+ }
+}
+
+#undef FUNCTION_NAME
+#undef STEP
diff --git a/src/lib/evas/filters/evas_filter_blur.c 
b/src/lib/evas/filters/evas_filter_blur.c
index 6d07813..b29654a 100644
--- a/src/lib/evas/filters/evas_filter_blur.c
+++ b/src/lib/evas/filters/evas_filter_blur.c
@@ -380,62 +380,6 @@ _sin_blur_weights_get(int *weights, int *pow2_divider, int 
radius)
 }
 
 static void
-_gaussian_blur_step_alpha(DATA8 *src, DATA8 *dst, int radius, int len, int 
step,
-  int *weights, int pow2_divider)
-{
-   int j, k, acc, divider;
-   DATA8 *s = src;
-   const int diameter = 2 * radius + 1;
-   int left = MIN(radius, len);
-   int right = MIN(radius, (len - radius));
-
-   // left
-   for (k = 0; k < left; k++, dst += step)
- {
-acc = 0;
-divider = 0;
-s = src;
-for (j = 0; j <= k + radius; j++, s += step)
-  {
- acc += (*s) * weights[j + radius - k];
- divider += weights[j + radius - k];
-  }
-if (!divider) goto div_zero;
-*dst = acc / divider;
- }
-
-   // middle
-   for (k = radius; k < (len - radius); k++, src += step, dst += step)
- {
-acc = 0;
-s = src;
-for (j = 0; j < diameter; j++, s += step)
-  acc += (*s) * weights[j];
-*dst = acc >> pow2_divider;
- }

[EGIT] [core/efl] master 14/14: Evas filters: Fix memory leak when destroying the object

2014-03-11 Thread Jean-Philippe ANDRÉ
jpeg pushed a commit to branch master.

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

commit 96e58cebf788989dce8c5e8e5853d5c9423d535d
Author: Jean-Philippe Andre 
Date:   Wed Mar 12 14:06:23 2014 +0900

Evas filters: Fix memory leak when destroying the object

The GL buffers set to be freed were released only the async case...
which doesn't make sense since GL is sync.

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

diff --git a/src/lib/evas/filters/evas_filter.c 
b/src/lib/evas/filters/evas_filter.c
index 5b59fcc..3389061 100644
--- a/src/lib/evas/filters/evas_filter.c
+++ b/src/lib/evas/filters/evas_filter.c
@@ -1863,6 +1863,7 @@ _filter_chain_run(Evas_Filter_Context *ctx)
 {
Evas_Filter_Command *cmd;
Eina_Bool ok = EINA_FALSE;
+   void *buffer;
 
DEBUG_TIME_BEGIN();
 
@@ -1882,6 +1883,13 @@ _filter_chain_run(Evas_Filter_Context *ctx)
 end:
ctx->running = EINA_FALSE;
DEBUG_TIME_END();
+
+   EINA_LIST_FREE(ctx->post_run.buffers_to_free, buffer)
+ {
+if (ctx->gl_engine)
+  ENFN->image_free(ENDT, buffer);
+ }
+
return ok;
 }
 
@@ -1890,16 +1898,9 @@ _filter_thread_run_cb(void *data)
 {
Evas_Filter_Context *ctx = data;
Eina_Bool success;
-   void *buffer;
 
success = _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, success);
 }
@@ -1924,6 +1925,7 @@ 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, ret);
return ret;

-- 




[EGIT] [core/efl] master 03/14: Evas filters: Remove dead code

2014-03-11 Thread Jean-Philippe ANDRÉ
jpeg pushed a commit to branch master.

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

commit 2ea3cb641487ab9833f121e89af0d43c8849dd34
Author: Jean-Philippe Andre 
Date:   Mon Mar 10 16:46:14 2014 +0900

Evas filters: Remove dead code

Remove true Gaussian kernel code, as it is not usable over 12px and
was disabled because it gives different visual results than the
fake Gaussian curve using sin().
---
 src/lib/evas/filters/evas_filter_blur.c | 76 ++---
 1 file changed, 4 insertions(+), 72 deletions(-)

diff --git a/src/lib/evas/filters/evas_filter_blur.c 
b/src/lib/evas/filters/evas_filter_blur.c
index b652617..40e46e0 100644
--- a/src/lib/evas/filters/evas_filter_blur.c
+++ b/src/lib/evas/filters/evas_filter_blur.c
@@ -39,13 +39,6 @@ _smallest_pow2_larger_than(int val)
 # define DIVIDE_BY_DIAMETER(val) ((val) / diameter)
 #endif
 
-// Switch from Pascal Triangle based gaussian to Sine.
-// Gaussian is now disabled (because gauss and sine are too different)
-#define MAX_GAUSSIAN_RADIUS 0
-#if MAX_GAUSSIAN_RADIUS > 12
-# error Impossible value
-#endif
-
 #if DEBUG_TIME
 # define DEBUG_TIME_BEGIN() \
struct timespec ts1, ts2; \
@@ -350,51 +343,6 @@ _box_blur_vert_apply_alpha(Evas_Filter_Command *cmd)
 /* Gaussian blur */
 
 static void
-_gaussian_blur_weights_get(int *weights, int *pow2_divider, int radius)
-{
-   int even[radius + 1];
-   int odd[radius + 1];
-   int k, j;
-
-   EINA_SAFETY_ON_FALSE_RETURN(radius >= 0 && radius <= 12);
-
-   /* Uses Pascal's Triangle to compute the integer gaussian weights:
-*
-* 01 / 1 [1]
-*1   1   [1 1]
-* 11   2   1 / 4 [1 2]
-*1   3   3   1   [1 3 3]
-* 21   4   6   4   1 / 16[1 4 6]
-*1 ..1
-*
-* Limitation: max radius is 12 when using 32 bits integers:
-*  pow2_divider = 24, leaving exactly 8 bits for the data
-*/
-
-   if (pow2_divider)
- *pow2_divider = radius * 2;
-
-   memset(odd, 0, sizeof(odd));
-   memset(even, 0, sizeof(even));
-   odd[0] = 1;
-   even[0] = 1;
-   for (k = 1; k <= radius; k++)
- {
-for (j = 1; j <= k; j++)
-  odd[j] = even[j] + even[j - 1];
-odd[k] = 2 * even[k - 1];
-
-for (j = 1; j <= k; j++)
-  even[j] = odd[j] + odd[j - 1];
- }
-
-   for (k = 0; k <= radius; k++)
- weights[k] = odd[k];
-   for (k = 0; k <= radius; k++)
- weights[k + radius] = weights[radius - k];
-}
-
-static void
 _sin_blur_weights_get(int *weights, int *pow2_divider, int radius)
 {
const int diameter = 2 * radius + 1;
@@ -570,11 +518,7 @@ _gaussian_blur_horiz_alpha(DATA8 *src, DATA8 *dst, int 
radius, int w, int h)
int k, pow2_div = 0;
 
weights = alloca((2 * radius + 1) * sizeof(int));
-
-   if (radius <= MAX_GAUSSIAN_RADIUS)
- _gaussian_blur_weights_get(weights, &pow2_div, radius);
-   else
- _sin_blur_weights_get(weights, &pow2_div, radius);
+   _sin_blur_weights_get(weights, &pow2_div, radius);
 
for (k = h; k; k--)
  {
@@ -591,11 +535,7 @@ _gaussian_blur_vert_alpha(DATA8 *src, DATA8 *dst, int 
radius, int w, int h)
int k, pow2_div = 0;
 
weights = alloca((2 * radius + 1) * sizeof(int));
-
-   if (radius <= MAX_GAUSSIAN_RADIUS)
- _gaussian_blur_weights_get(weights, &pow2_div, radius);
-   else
- _sin_blur_weights_get(weights, &pow2_div, radius);
+   _sin_blur_weights_get(weights, &pow2_div, radius);
 
for (k = w; k; k--)
  {
@@ -612,11 +552,7 @@ _gaussian_blur_horiz_rgba(DATA32 *src, DATA32 *dst, int 
radius, int w, int h)
int k, pow2_div = 0;
 
weights = alloca((2 * radius + 1) * sizeof(int));
-
-   if (radius <= MAX_GAUSSIAN_RADIUS)
- _gaussian_blur_weights_get(weights, &pow2_div, radius);
-   else
- _sin_blur_weights_get(weights, &pow2_div, radius);
+   _sin_blur_weights_get(weights, &pow2_div, radius);
 
for (k = h; k; k--)
  {
@@ -633,11 +569,7 @@ _gaussian_blur_vert_rgba(DATA32 *src, DATA32 *dst, int 
radius, int w, int h)
int k, pow2_div = 0;
 
weights = alloca((2 * radius + 1) * sizeof(int));
-
-   if (radius <= MAX_GAUSSIAN_RADIUS)
- _gaussian_blur_weights_get(weights, &pow2_div, radius);
-   else
- _sin_blur_weights_get(weights, &pow2_div, radius);
+   _sin_blur_weights_get(weights, &pow2_div, radius);
 
for (k = w; k; k--)
  {

-- 




[EGIT] [core/efl] master 04/14: Evas filters: Add more time debug marks in blur

2014-03-11 Thread Jean-Philippe ANDRÉ
jpeg pushed a commit to branch master.

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

commit 1960c97eb4ec62d3791d043005252eeec3d03ce5
Author: Jean-Philippe Andre 
Date:   Mon Mar 10 17:25:27 2014 +0900

Evas filters: Add more time debug marks in blur
---
 src/lib/evas/filters/evas_filter_blur.c | 16 
 1 file changed, 16 insertions(+)

diff --git a/src/lib/evas/filters/evas_filter_blur.c 
b/src/lib/evas/filters/evas_filter_blur.c
index 40e46e0..6d07813 100644
--- a/src/lib/evas/filters/evas_filter_blur.c
+++ b/src/lib/evas/filters/evas_filter_blur.c
@@ -520,12 +520,16 @@ _gaussian_blur_horiz_alpha(DATA8 *src, DATA8 *dst, int 
radius, int w, int h)
weights = alloca((2 * radius + 1) * sizeof(int));
_sin_blur_weights_get(weights, &pow2_div, radius);
 
+   DEBUG_TIME_BEGIN();
+
for (k = h; k; k--)
  {
 _gaussian_blur_step_alpha(src, dst, radius, w, 1, weights, pow2_div);
 dst += w;
 src += w;
  }
+
+   DEBUG_TIME_END();
 }
 
 static void
@@ -537,12 +541,16 @@ _gaussian_blur_vert_alpha(DATA8 *src, DATA8 *dst, int 
radius, int w, int h)
weights = alloca((2 * radius + 1) * sizeof(int));
_sin_blur_weights_get(weights, &pow2_div, radius);
 
+   DEBUG_TIME_BEGIN();
+
for (k = w; k; k--)
  {
 _gaussian_blur_step_alpha(src, dst, radius, h, w, weights, pow2_div);
 dst += 1;
 src += 1;
  }
+
+   DEBUG_TIME_END();
 }
 
 static void
@@ -554,12 +562,16 @@ _gaussian_blur_horiz_rgba(DATA32 *src, DATA32 *dst, int 
radius, int w, int h)
weights = alloca((2 * radius + 1) * sizeof(int));
_sin_blur_weights_get(weights, &pow2_div, radius);
 
+   DEBUG_TIME_BEGIN();
+
for (k = h; k; k--)
  {
 _gaussian_blur_step_rgba(src, dst, radius, w, 1, weights, pow2_div);
 dst += w;
 src += w;
  }
+
+   DEBUG_TIME_END();
 }
 
 static void
@@ -571,12 +583,16 @@ _gaussian_blur_vert_rgba(DATA32 *src, DATA32 *dst, int 
radius, int w, int h)
weights = alloca((2 * radius + 1) * sizeof(int));
_sin_blur_weights_get(weights, &pow2_div, radius);
 
+   DEBUG_TIME_BEGIN();
+
for (k = w; k; k--)
  {
 _gaussian_blur_step_rgba(src, dst, radius, h, w, weights, pow2_div);
 dst += 1;
 src += 1;
  }
+
+   DEBUG_TIME_END();
 }
 
 static Eina_Bool

-- 




[EGIT] [core/efl] master 08/14: Evas filters: Move DEBUG_TIME macro to be used in the main file

2014-03-11 Thread Jean-Philippe ANDRÉ
jpeg pushed a commit to branch master.

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

commit 6674ef5b35f5e3e02347150673c54287c8f2
Author: Jean-Philippe Andre 
Date:   Tue Mar 11 14:50:11 2014 +0900

Evas filters: Move DEBUG_TIME macro to be used in the main file

Optimization can happen at a higher level than the blur function
itself... so let's measure the whole filter running time.
---
 src/lib/evas/filters/evas_filter.c |  3 +++
 src/lib/evas/filters/evas_filter_blur.c| 23 ---
 src/lib/evas/filters/evas_filter_private.h | 23 +++
 3 files changed, 26 insertions(+), 23 deletions(-)

diff --git a/src/lib/evas/filters/evas_filter.c 
b/src/lib/evas/filters/evas_filter.c
index a040255..59d5653 100644
--- a/src/lib/evas/filters/evas_filter.c
+++ b/src/lib/evas/filters/evas_filter.c
@@ -1794,6 +1794,8 @@ _filter_chain_run(Evas_Filter_Context *ctx)
Evas_Filter_Command *cmd;
Eina_Bool ok = EINA_FALSE;
 
+   DEBUG_TIME_BEGIN();
+
ctx->running = EINA_TRUE;
EINA_INLIST_FOREACH(ctx->commands, cmd)
  {
@@ -1809,6 +1811,7 @@ _filter_chain_run(Evas_Filter_Context *ctx)
 
 end:
ctx->running = EINA_FALSE;
+   DEBUG_TIME_END();
return ok;
 }
 
diff --git a/src/lib/evas/filters/evas_filter_blur.c 
b/src/lib/evas/filters/evas_filter_blur.c
index 747ac22..2e684f5 100644
--- a/src/lib/evas/filters/evas_filter_blur.c
+++ b/src/lib/evas/filters/evas_filter_blur.c
@@ -4,15 +4,6 @@
 #include 
 #include 
 
-// Enable debug if you're working on optimizations
-#define DEBUG_TIME 1
-
-// Windows build will break if CLOCK_MONOTONIC is used
-#if !defined(_POSIX_MONOTONIC_CLOCK) || (_POSIX_MONOTONIC_CLOCK < 0)
-# undef DEBUG_TIME
-# define DEBUG_TIME 0
-#endif
-
 #if DIV_USING_BITSHIFT
 static int
 _smallest_pow2_larger_than(int val)
@@ -39,20 +30,6 @@ _smallest_pow2_larger_than(int val)
 # define DIVIDE_BY_DIAMETER(val) ((val) / diameter)
 #endif
 
-#if DEBUG_TIME
-# define DEBUG_TIME_BEGIN() \
-   struct timespec ts1, ts2; \
-   clock_gettime(CLOCK_MONOTONIC, &ts1);
-# define DEBUG_TIME_END() \
-   clock_gettime(CLOCK_MONOTONIC, &ts2); \
-   long long int t = 100LL * (ts2.tv_sec - ts1.tv_sec) \
-   + (ts2.tv_nsec - ts1.tv_nsec) / 1000LL; \
-   INF("TIME SPENT: %lldus", t);
-#else
-# define DEBUG_TIME_BEGIN() do {} while(0)
-# define DEBUG_TIME_END() do {} while(0)
-#endif
-
 /* RGBA functions */
 
 static void
diff --git a/src/lib/evas/filters/evas_filter_private.h 
b/src/lib/evas/filters/evas_filter_private.h
index 45cc5c2..68c6b82 100644
--- a/src/lib/evas/filters/evas_filter_private.h
+++ b/src/lib/evas/filters/evas_filter_private.h
@@ -29,6 +29,15 @@
 #define GREEN_OF(a) (((a) >> 8) & 0xff)
 #define BLUE_OF(a)  ((a) & 0xff)
 
+// Enable debug if you're working on optimizations
+#define DEBUG_TIME 1
+
+// Windows build will break if CLOCK_MONOTONIC is used
+#if !defined(_POSIX_MONOTONIC_CLOCK) || (_POSIX_MONOTONIC_CLOCK < 0)
+# undef DEBUG_TIME
+# define DEBUG_TIME 0
+#endif
+
 // The 'restrict' keyword is part of C99
 #if __STDC_VERSION__ < 199901L
 # define restrict
@@ -41,6 +50,20 @@
 #define BUFFERS_LOCK() do { if (cmd->input) cmd->input->locked = 1; if 
(cmd->output) cmd->output->locked = 1; if (cmd->mask) cmd->mask->locked = 1; } 
while (0)
 #define BUFFERS_UNLOCK() do { if (cmd->input) cmd->input->locked = 0; if 
(cmd->output) cmd->output->locked = 0; if (cmd->mask) cmd->mask->locked = 0; } 
while (0)
 
+#if DEBUG_TIME
+# define DEBUG_TIME_BEGIN() \
+   struct timespec ts1, ts2; \
+   clock_gettime(CLOCK_MONOTONIC, &ts1);
+# define DEBUG_TIME_END() \
+   clock_gettime(CLOCK_MONOTONIC, &ts2); \
+   long long int t = 100LL * (ts2.tv_sec - ts1.tv_sec) \
+   + (ts2.tv_nsec - ts1.tv_nsec) / 1000LL; \
+   INF("TIME SPENT: %lldus", t);
+#else
+# define DEBUG_TIME_BEGIN() do {} while(0)
+# define DEBUG_TIME_END() do {} while(0)
+#endif
+
 typedef enum _Evas_Filter_Interpolation_Mode Evas_Filter_Interpolation_Mode;
 
 struct _Evas_Filter_Context

-- 




[EGIT] [core/efl] master 13/14: Evas filters: Optimize RGBA blur as well

2014-03-11 Thread Jean-Philippe ANDRÉ
jpeg pushed a commit to branch master.

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

commit 592204fe73cb7198aea2a3be3dbe1efdad6999b1
Author: Jean-Philippe Andre 
Date:   Wed Mar 12 13:55:44 2014 +0900

Evas filters: Optimize RGBA blur as well

Same as Alpha blur, use combination of box blurs,
and put all that code into optimizable functions.
---
 src/lib/evas/filters/blur/blur_box_alpha_.c |   5 +-
 src/lib/evas/filters/blur/blur_box_rgba_.c  | 326 ++--
 src/lib/evas/filters/evas_filter.c  |  32 +--
 src/lib/evas/filters/evas_filter_blur.c |  30 ++-
 4 files changed, 296 insertions(+), 97 deletions(-)

diff --git a/src/lib/evas/filters/blur/blur_box_alpha_.c 
b/src/lib/evas/filters/blur/blur_box_alpha_.c
index 4a9facd..71ac943 100644
--- a/src/lib/evas/filters/blur/blur_box_alpha_.c
+++ b/src/lib/evas/filters/blur/blur_box_alpha_.c
@@ -1,6 +1,7 @@
 /* @file blur_box_alpha_.c
- * Defines the following function:
- * _box_blur_alpha_step
+ * Defines the following functions:
+ * _box_blur_alpha_horiz_step
+ * _box_blur_alpha_vert_step
  */
 
 #include "evas_common_private.h"
diff --git a/src/lib/evas/filters/blur/blur_box_rgba_.c 
b/src/lib/evas/filters/blur/blur_box_rgba_.c
index b930d6e..95d381a 100644
--- a/src/lib/evas/filters/blur/blur_box_rgba_.c
+++ b/src/lib/evas/filters/blur/blur_box_rgba_.c
@@ -7,89 +7,281 @@
 #include "evas_common_private.h"
 #include "../evas_filter_private.h"
 
-#if !defined (FUNCTION_NAME) || !defined (STEP)
-# error Must define FUNCTION_NAME and STEP
-#endif
-
 static inline void
-FUNCTION_NAME(const DATA32* restrict src, DATA32* restrict dst,
-  const int radius, const int len,
-  const int loops, const int loopstep)
+_box_blur_horiz_rgba_step(const DATA32* restrict const srcdata,
+  DATA32* restrict const dstdata,
+  const int* restrict const radii,
+  const int len,
+  const int loops)
 {
-   DEFINE_DIVIDER(2 * radius + 1);
-   const int left = MIN(radius, len);
-   const int right = MIN(radius, (len - radius));
+   const DATA32* restrict src;
+   DATA32* restrict dst;
+   DATA32* restrict span1;
+   DATA32* restrict span2;
+
+#if DIV_USING_BITSHIFT
+   int pow2_shifts[6] = {0};
+   int numerators[6] = {0};
+   for (int run = 0; radii[run]; run++)
+ {
+const int div = radii[run] * 2 + 1;
+pow2_shifts[run] = evas_filter_smallest_pow2_larger_than(div << 10);
+numerators[run] = (1 << pow2_shifts[run]) / (div);
+ }
+#endif
 
-   for (int l = loops; l; --l)
+   span1 = alloca(len * sizeof(DATA32));
+   span2 = alloca(len * sizeof(DATA32));
+
+   // For each line, apply as many blurs as requested
+   for (int l = 0; l < loops; l++)
  {
-int acc[4] = {0};
-int x, k;
-int divider;
+int run;
 
-const DATA8* restrict sl = (DATA8 *) src;
-const DATA8* restrict sr = (DATA8 *) src;
-DATA8* restrict d = (DATA8 *) dst;
+// New line: reset source & destination pointers
+src = srcdata + len * l;
+if (!radii[1]) // Only one run
+  dst = dstdata + len * l;
+else
+  dst = span1;
 
-// Read-ahead
-for (x = left; x; x--)
+// Apply blur with current radius
+for (run = 0; radii[run]; run++)
   {
- for (k = 0; k < 4; k++)
-   acc[k] += sr[k];
- sr += STEP;
+ const int radius = radii[run];
+ const int left = MIN(radius, len);
+ const int right = MIN(radius, (len - radius));
+
+#if DIV_USING_BITSHIFT
+ const int pow2 = pow2_shifts[run];
+ const int numerator = numerators[run];
+#else
+ const int divider = 2 * radius + 1;
+#endif
+
+ const DATA8* restrict sl = (DATA8 *) src;
+ const DATA8* restrict sr = (DATA8 *) src;
+ DATA8* restrict d = (DATA8 *) dst;
+ int acc[4] = {0};
+ int x, k;
+
+ // Read-ahead
+ for (x = left; x; x--)
+   {
+  for (k = 0; k < 4; k++)
+acc[k] += sr[k];
+  sr += sizeof(DATA32);
+   }
+
+ // Left
+ for (x = 0; x < left; x++)
+   {
+  for (k = 0; k < 4; k++)
+acc[k] += sr[k];
+  sr += sizeof(DATA32);
+
+  const int divider = x + left + 1;
+  d[ALPHA] = acc[ALPHA] / divider;
+  d[RED]   = acc[RED]   / divider;
+  d[GREEN] = acc[GREEN] / divider;
+  d[BLUE]  = acc[BLUE]  / divider;
+  d += sizeof(DATA32);
+   }
+
+ // Main part
+ for (x = len - (2 * radius); x > 0; x--)
+   {
+  for

[EGIT] [core/efl] master 06/14: Evas filters: Add basic optimization for RGBA gaussian blur

2014-03-11 Thread Jean-Philippe ANDRÉ
jpeg pushed a commit to branch master.

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

commit 9c3a3373b3076e1442f4b719fe6fd0d5c0657186
Author: Jean-Philippe Andre 
Date:   Tue Mar 11 12:10:42 2014 +0900

Evas filters: Add basic optimization for RGBA gaussian blur
---
 src/lib/evas/filters/blur/blur_gaussian_alpha_.c |   6 ++
 src/lib/evas/filters/blur/blur_gaussian_rgba_.c  |  99 
 src/lib/evas/filters/evas_filter_blur.c  | 110 +++
 3 files changed, 119 insertions(+), 96 deletions(-)

diff --git a/src/lib/evas/filters/blur/blur_gaussian_alpha_.c 
b/src/lib/evas/filters/blur/blur_gaussian_alpha_.c
index 297ddb7..fc70ccb 100644
--- a/src/lib/evas/filters/blur/blur_gaussian_alpha_.c
+++ b/src/lib/evas/filters/blur/blur_gaussian_alpha_.c
@@ -1,3 +1,9 @@
+/* @file blur_gaussian_alpha_.c
+ * Should define the functions:
+ * - _gaussian_blur_horiz_alpha_step
+ * - _gaussian_blur_vert_alpha_step
+ */
+
 /* Datatypes and MIN macro */
 #include "evas_common_private.h"
 #include "../evas_filter_private.h"
diff --git a/src/lib/evas/filters/blur/blur_gaussian_rgba_.c 
b/src/lib/evas/filters/blur/blur_gaussian_rgba_.c
new file mode 100644
index 000..d2a
--- /dev/null
+++ b/src/lib/evas/filters/blur/blur_gaussian_rgba_.c
@@ -0,0 +1,99 @@
+/* @file blur_gaussian_rgba_.c
+ * Should define the functions:
+ * - _gaussian_blur_horiz_rgba_step
+ * - _gaussian_blur_vert_rgba_step
+ */
+
+#include "evas_common_private.h"
+#include "../evas_filter_private.h"
+
+#if !defined (FUNCTION_NAME) || !defined (STEP)
+# error Must define FUNCTION_NAME and STEP
+#endif
+
+static inline void
+FUNCTION_NAME(const DATA32* restrict srcdata, DATA32* restrict dstdata,
+  const int radius, const int len,
+  const int loops, const int loopstep,
+  const int* restrict weights, const int pow2_divider)
+{
+   const int diameter = 2 * radius + 1;
+   const int left = MIN(radius, len);
+   const int right = MIN(radius, (len - radius));
+   const DATA32* restrict src;
+   DATA32* restrict dst;
+   int i, j, k;
+
+   for (i = loops; i; --i)
+ {
+src = srcdata;
+dst = dstdata;
+
+// left
+for (k = 0; k < left; k++, dst += STEP)
+  {
+ int acc[4] = {0};
+ int divider = 0;
+ const DATA32* restrict s = src;
+ for (j = 0; j <= k + radius; j++, s += STEP)
+   {
+  const int weightidx = j + radius - k;
+  acc[ALPHA] += A_VAL(s) * weights[weightidx];
+  acc[RED]   += R_VAL(s) * weights[weightidx];
+  acc[GREEN] += G_VAL(s) * weights[weightidx];
+  acc[BLUE]  += B_VAL(s) * weights[weightidx];
+  divider += weights[weightidx];
+   }
+ //if (!divider) abort();
+ A_VAL(dst) = acc[ALPHA] / divider;
+ R_VAL(dst) = acc[RED]   / divider;
+ G_VAL(dst) = acc[GREEN] / divider;
+ B_VAL(dst) = acc[BLUE]  / divider;
+  }
+
+// middle
+for (k = len - (2 * radius); k > 0; k--, src += STEP, dst += STEP)
+  {
+ int acc[4] = {0};
+ const DATA32* restrict s = src;
+ for (j = 0; j < diameter; j++, s += STEP)
+   {
+  acc[ALPHA] += A_VAL(s) * weights[j];
+  acc[RED]   += R_VAL(s) * weights[j];
+  acc[GREEN] += G_VAL(s) * weights[j];
+  acc[BLUE]  += B_VAL(s) * weights[j];
+   }
+ A_VAL(dst) = acc[ALPHA] >> pow2_divider;
+ R_VAL(dst) = acc[RED]   >> pow2_divider;
+ G_VAL(dst) = acc[GREEN] >> pow2_divider;
+ B_VAL(dst) = acc[BLUE]  >> pow2_divider;
+  }
+
+// right
+for (k = 0; k < right; k++, dst += STEP, src += STEP)
+  {
+ int acc[4] = {0};
+ int divider = 0;
+ const DATA32* restrict s = src;
+ for (j = 0; j < 2 * radius - k; j++, s += STEP)
+   {
+  acc[ALPHA] += A_VAL(s) * weights[j];
+  acc[RED]   += R_VAL(s) * weights[j];
+  acc[GREEN] += G_VAL(s) * weights[j];
+  acc[BLUE]  += B_VAL(s) * weights[j];
+  divider += weights[j];
+   }
+ //if (!divider) abort();
+ A_VAL(dst) = acc[ALPHA] / divider;
+ R_VAL(dst) = acc[RED]   / divider;
+ G_VAL(dst) = acc[GREEN] / divider;
+ B_VAL(dst) = acc[BLUE]  / divider;
+  }
+
+dstdata += loopstep;
+srcdata += loopstep;
+ }
+}
+
+#undef FUNCTION_NAME
+#undef STEP
diff --git a/src/lib/evas/filters/evas_filter_blur.c 
b/src/lib/evas/filters/evas_filter_blur.c
index b29654a..747ac22 100644
--- a/src/lib/evas/filters/evas_filter_blur.c
+++ b/src/lib/evas/filters/evas_filter_

[EGIT] [core/efl] master 09/14: Evas filters: Fix 1-D blurs on a single buffer

2014-03-11 Thread Jean-Philippe ANDRÉ
jpeg pushed a commit to branch master.

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

commit 0dace7721e6c233725a1ac6c416c0d631b0afe95
Author: Jean-Philippe Andre 
Date:   Tue Mar 11 15:11:21 2014 +0900

Evas filters: Fix 1-D blurs on a single buffer

When a blur operation requires a copy-back to the source
buffer, then the render_op must be set to COPY instead of
BLEND. Otherwise the non blurred content will be visible.

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

diff --git a/src/lib/evas/filters/evas_filter.c 
b/src/lib/evas/filters/evas_filter.c
index 59d5653..f336da7 100644
--- a/src/lib/evas/filters/evas_filter.c
+++ b/src/lib/evas/filters/evas_filter.c
@@ -1047,12 +1047,17 @@ evas_filter_command_blur_add(Evas_Filter_Context *ctx, 
void *drawctx,
 
if (copy_back)
  {
+int render_op;
+
 if (!cmd) goto fail;
 if (!copybuf) goto fail;
 DBG("Add copy %d -> %d", copybuf->id, blur_out->id);
 cmd->ENFN->context_color_set(cmd->ENDT, drawctx, 0, 0, 0, 255);
+render_op = cmd->ENFN->context_render_op_get(cmd->ENDT, drawctx);
+cmd->ENFN->context_render_op_set(cmd->ENDT, drawctx, EVAS_RENDER_COPY);
 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);
+cmd->ENFN->context_render_op_set(cmd->ENDT, drawctx, render_op);
 if (id < 0) goto fail;
 ox = oy = 0;
  }

-- 




Re: [E-devel] [EGIT] [apps/terminology] master 01/01: Make an option to disable tab switch animations.

2014-03-11 Thread Cedric BAIL
On Wed, Mar 12, 2014 at 11:51 AM, Gustavo Lima Chaves
 wrote:
> glima pushed a commit to branch master.
>
> http://git.enlightenment.org/apps/terminology.git/commit/?id=1d689839c065964333cd2ee8f3e6573b1f38a020
>
> commit 1d689839c065964333cd2ee8f3e6573b1f38a020
> Author: Gustavo Lima Chaves 
> Date:   Tue Mar 11 23:49:40 2014 -0300
>
> Make an option to disable tab switch animations.

Wasn't setting the animation time to zero enough to do the same things ?

> I bet I'm not the one driven crazy by them. So let's keep the bling by
> default, but make it possible to override that.
>
> In this patch I also sugest usage of tooltips on the config knobs.
> How do you like it?
> ---
>  src/bin/config.c   |  5 +
>  src/bin/config.h   |  3 +++
>  src/bin/main.c | 17 ++---
>  src/bin/options_behavior.c | 21 +
>  4 files changed, 43 insertions(+), 3 deletions(-)
>
> diff --git a/src/bin/config.c b/src/bin/config.c
> index ba6397b..d47a893 100644
> --- a/src/bin/config.c
> +++ b/src/bin/config.c
> @@ -97,6 +97,8 @@ config_init(void)
> EET_DATA_DESCRIPTOR_ADD_BASIC
>   (edd_base, Config, "disable_visual_bell", disable_visual_bell, 
> EET_T_UCHAR);
> EET_DATA_DESCRIPTOR_ADD_BASIC
> + (edd_base, Config, "disable_switch_anim", disable_switch_anim, 
> EET_T_UCHAR);
> +   EET_DATA_DESCRIPTOR_ADD_BASIC
>   (edd_base, Config, "translucent", translucent, EET_T_UCHAR);
> EET_DATA_DESCRIPTOR_ADD_BASIC
>   (edd_base, Config, "mute", mute, EET_T_UCHAR);
> @@ -207,6 +209,7 @@ config_sync(const Config *config_src, Config *config)
> config->flicker_on_key = config_src->flicker_on_key;
> config->disable_cursor_blink = config_src->disable_cursor_blink;
> config->disable_visual_bell = config_src->disable_visual_bell;
> +   config->disable_switch_anim = config_src->disable_switch_anim;
> config->mute = config_src->mute;
> config->urg_bell = config_src->urg_bell;
> config->multi_instance = config_src->multi_instance;
> @@ -495,6 +498,7 @@ config_load(const char *key)
>   config->flicker_on_key = EINA_FALSE;
>   config->disable_cursor_blink = EINA_FALSE;
>   config->disable_visual_bell = EINA_FALSE;
> + config->disable_switch_anim = EINA_FALSE;
>   s = eina_unicode_unicode_to_utf8(sep, &slen);
>   if (s)
> {
> @@ -574,6 +578,7 @@ config_fork(Config *config)
> CPY(flicker_on_key);
> CPY(disable_cursor_blink);
> CPY(disable_visual_bell);
> +   CPY(disable_switch_anim);
> CPY(translucent);
> CPY(mute);
> CPY(urg_bell);
> diff --git a/src/bin/config.h b/src/bin/config.h
> index e83b6b9..fe4451d 100644
> --- a/src/bin/config.h
> +++ b/src/bin/config.h
> @@ -42,6 +42,9 @@ struct _Config
> Eina_Bool flicker_on_key;
> Eina_Bool disable_cursor_blink;
> Eina_Bool disable_visual_bell;
> +   Eina_Bool disable_switch_anim; /* disable terminal switch
> +   * animations when issued by
> +   * key binds */
> Eina_Bool translucent;
> Eina_Bool mute;
> Eina_Bool urg_bell;
> diff --git a/src/bin/main.c b/src/bin/main.c
> index 9ccb4a0..9cb805d 100644
> --- a/src/bin/main.c
> +++ b/src/bin/main.c
> @@ -1373,6 +1373,7 @@ _cb_prev(void *data, Evas_Object *obj EINA_UNUSED, void 
> *event EINA_UNUSED)
>  {
> Term *term = data;
> Term *term2 = NULL;
> +   Config *config = termio_config_get(term->term);
>
> if (term->focused) term2 = _term_prev_get(term);
> if (term2)
> @@ -1381,7 +1382,7 @@ _cb_prev(void *data, Evas_Object *obj EINA_UNUSED, void 
> *event EINA_UNUSED)
>
>  sp0 = _split_find(term->wn->win, term->term);
>  sp = _split_find(term2->wn->win, term2->term);
> -if (sp == sp0)
> +if (sp == sp0 && !config->disable_switch_anim)
>_sel_go(sp, term2);
>  else
>{
> @@ -1396,7 +1397,8 @@ _cb_next(void *data, Evas_Object *obj EINA_UNUSED, void 
> *event EINA_UNUSED)
>  {
> Term *term = data;
> Term *term2 = NULL;
> -
> +   Config *config = termio_config_get(term->term);
> +
> if (term->focused) term2 = _term_next_get(term);
> if (term2)
>   {
> @@ -1404,7 +1406,7 @@ _cb_next(void *data, Evas_Object *obj EINA_UNUSED, void 
> *event EINA_UNUSED)
>
>  sp0 = _split_find(term->wn->win, term->term);
>  sp = _split_find(term2->wn->win, term2->term);
> -if (sp == sp0)
> +if (sp == sp0 && !config->disable_switch_anim)
>_sel_go(sp, term2);
>  else
>{
> @@ -2584,6 +2586,8 @@ static const Ecore_Getopt options = {
>"Set cursor blink mode."),
>ECORE_GETOPT_STORE_BOOL('G', "visual-bell",
>"Set visual bell mode."),
> +  ECORE_GETOPT_STORE_BOOL('

[EGIT] [core/elementary] elementary-1.9 01/01: elm_win: Unbreak the ABI break of window type.

2014-03-11 Thread Daniel Juyung Seo
seoz pushed a commit to branch elementary-1.9.

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

commit 6ebc1d808bd6e310017b3ab65ec45c27a81960b7
Author: Daniel Juyung Seo 
Date:   Wed Mar 12 12:42:59 2014 +0900

elm_win: Unbreak the ABI break of window type.

@fix
---
 src/lib/elm_win_common.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/lib/elm_win_common.h b/src/lib/elm_win_common.h
index b5eb567..3c88278 100644
--- a/src/lib/elm_win_common.h
+++ b/src/lib/elm_win_common.h
@@ -9,7 +9,7 @@
  */
 typedef enum
 {
-   ELM_WIN_UNKNOWN, /**< Unknown window type. */
+   ELM_WIN_UNKNOWN = -1, /**< Unknown window type. */
ELM_WIN_BASIC, /**< A normal window. Indicates a normal, top-level
  window. Almost every window will be created with this
  type. */

-- 




Re: [E-devel] [EGIT] [core/elementary] master 01/01: win: Add a API, elm_win_type_get.

2014-03-11 Thread Daniel Juyung Seo
On Wed, Mar 12, 2014 at 3:16 AM, Gustavo Sverzut Barbieri <
barbi...@gmail.com> wrote:

> On Tue, Mar 11, 2014 at 9:21 AM, Daniel Juyung Seo 
> wrote:
> > On Thu, Feb 6, 2014 at 7:28 PM, Jaehwan Kim  >wrote:
> >>  typedef enum
> >>  {
> >> +   ELM_WIN_UNKNOWN, /**< Unknown window type. */
> >> ELM_WIN_BASIC, /**< A normal window. Indicates a normal, top-level
> >>   window. Almost every window will be created with
> this
> >>   type. */
> >>
> >
> > This looks like a big ABI break.
> > Any idea on this?
>
>
> indeed this is a break we can't have.
>
>
OK, fixed it in master and elementary-1.9.
Thanks.

Daniel Juyung Seo (SeoZ)


>
> --
> Learn Graph Databases - Download FREE O'Reilly Book
> "Graph Databases" is the definitive new guide to graph databases and their
> applications. Written by three acclaimed leaders in the field,
> this first edition is now available. Download your free book today!
> http://p.sf.net/sfu/13534_NeoTech
> ___
> enlightenment-devel mailing list
> enlightenment-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
>
--
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


[EGIT] [core/elementary] master 01/01: elm_win: Unbreak the ABI break of window type.

2014-03-11 Thread Daniel Juyung Seo
seoz pushed a commit to branch master.

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

commit 79d2df12fe5e4d57d7a6247975feac1f0793ec72
Author: Daniel Juyung Seo 
Date:   Wed Mar 12 12:42:59 2014 +0900

elm_win: Unbreak the ABI break of window type.

@fix
---
 src/lib/elm_win_common.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/lib/elm_win_common.h b/src/lib/elm_win_common.h
index b5eb567..3c88278 100644
--- a/src/lib/elm_win_common.h
+++ b/src/lib/elm_win_common.h
@@ -9,7 +9,7 @@
  */
 typedef enum
 {
-   ELM_WIN_UNKNOWN, /**< Unknown window type. */
+   ELM_WIN_UNKNOWN = -1, /**< Unknown window type. */
ELM_WIN_BASIC, /**< A normal window. Indicates a normal, top-level
  window. Almost every window will be created with this
  type. */

-- 




[EGIT] [apps/terminology] master 01/01: Make an option to disable tab switch animations.

2014-03-11 Thread Gustavo Lima Chaves
glima pushed a commit to branch master.

http://git.enlightenment.org/apps/terminology.git/commit/?id=1d689839c065964333cd2ee8f3e6573b1f38a020

commit 1d689839c065964333cd2ee8f3e6573b1f38a020
Author: Gustavo Lima Chaves 
Date:   Tue Mar 11 23:49:40 2014 -0300

Make an option to disable tab switch animations.

I bet I'm not the one driven crazy by them. So let's keep the bling by
default, but make it possible to override that.

In this patch I also sugest usage of tooltips on the config knobs.
How do you like it?
---
 src/bin/config.c   |  5 +
 src/bin/config.h   |  3 +++
 src/bin/main.c | 17 ++---
 src/bin/options_behavior.c | 21 +
 4 files changed, 43 insertions(+), 3 deletions(-)

diff --git a/src/bin/config.c b/src/bin/config.c
index ba6397b..d47a893 100644
--- a/src/bin/config.c
+++ b/src/bin/config.c
@@ -97,6 +97,8 @@ config_init(void)
EET_DATA_DESCRIPTOR_ADD_BASIC
  (edd_base, Config, "disable_visual_bell", disable_visual_bell, 
EET_T_UCHAR);
EET_DATA_DESCRIPTOR_ADD_BASIC
+ (edd_base, Config, "disable_switch_anim", disable_switch_anim, 
EET_T_UCHAR);
+   EET_DATA_DESCRIPTOR_ADD_BASIC
  (edd_base, Config, "translucent", translucent, EET_T_UCHAR);
EET_DATA_DESCRIPTOR_ADD_BASIC
  (edd_base, Config, "mute", mute, EET_T_UCHAR);
@@ -207,6 +209,7 @@ config_sync(const Config *config_src, Config *config)
config->flicker_on_key = config_src->flicker_on_key;
config->disable_cursor_blink = config_src->disable_cursor_blink;
config->disable_visual_bell = config_src->disable_visual_bell;
+   config->disable_switch_anim = config_src->disable_switch_anim;
config->mute = config_src->mute;
config->urg_bell = config_src->urg_bell;
config->multi_instance = config_src->multi_instance;
@@ -495,6 +498,7 @@ config_load(const char *key)
  config->flicker_on_key = EINA_FALSE;
  config->disable_cursor_blink = EINA_FALSE;
  config->disable_visual_bell = EINA_FALSE;
+ config->disable_switch_anim = EINA_FALSE;
  s = eina_unicode_unicode_to_utf8(sep, &slen);
  if (s)
{
@@ -574,6 +578,7 @@ config_fork(Config *config)
CPY(flicker_on_key);
CPY(disable_cursor_blink);
CPY(disable_visual_bell);
+   CPY(disable_switch_anim);
CPY(translucent);
CPY(mute);
CPY(urg_bell);
diff --git a/src/bin/config.h b/src/bin/config.h
index e83b6b9..fe4451d 100644
--- a/src/bin/config.h
+++ b/src/bin/config.h
@@ -42,6 +42,9 @@ struct _Config
Eina_Bool flicker_on_key;
Eina_Bool disable_cursor_blink;
Eina_Bool disable_visual_bell;
+   Eina_Bool disable_switch_anim; /* disable terminal switch
+   * animations when issued by
+   * key binds */
Eina_Bool translucent;
Eina_Bool mute;
Eina_Bool urg_bell;
diff --git a/src/bin/main.c b/src/bin/main.c
index 9ccb4a0..9cb805d 100644
--- a/src/bin/main.c
+++ b/src/bin/main.c
@@ -1373,6 +1373,7 @@ _cb_prev(void *data, Evas_Object *obj EINA_UNUSED, void 
*event EINA_UNUSED)
 {
Term *term = data;
Term *term2 = NULL;
+   Config *config = termio_config_get(term->term);
 
if (term->focused) term2 = _term_prev_get(term);
if (term2)
@@ -1381,7 +1382,7 @@ _cb_prev(void *data, Evas_Object *obj EINA_UNUSED, void 
*event EINA_UNUSED)
 
 sp0 = _split_find(term->wn->win, term->term);
 sp = _split_find(term2->wn->win, term2->term);
-if (sp == sp0)
+if (sp == sp0 && !config->disable_switch_anim)
   _sel_go(sp, term2);
 else
   {
@@ -1396,7 +1397,8 @@ _cb_next(void *data, Evas_Object *obj EINA_UNUSED, void 
*event EINA_UNUSED)
 {
Term *term = data;
Term *term2 = NULL;
-   
+   Config *config = termio_config_get(term->term);
+
if (term->focused) term2 = _term_next_get(term);
if (term2)
  {
@@ -1404,7 +1406,7 @@ _cb_next(void *data, Evas_Object *obj EINA_UNUSED, void 
*event EINA_UNUSED)
 
 sp0 = _split_find(term->wn->win, term->term);
 sp = _split_find(term2->wn->win, term2->term);
-if (sp == sp0)
+if (sp == sp0 && !config->disable_switch_anim)
   _sel_go(sp, term2);
 else
   {
@@ -2584,6 +2586,8 @@ static const Ecore_Getopt options = {
   "Set cursor blink mode."),
   ECORE_GETOPT_STORE_BOOL('G', "visual-bell",
   "Set visual bell mode."),
+  ECORE_GETOPT_STORE_BOOL('A', "switch-anim",
+  "Set terminal switch animations mode."),
   ECORE_GETOPT_STORE_TRUE('F', "fullscreen",
   "Go into the fullscreen mode from start."),
   ECORE_GETOPT_STORE_TRUE('I', "iconic",
@@ -2629,6 +2633,7 @@ elm_main(int argc, char **argv)
Eina_Bool video_mute = 0

[E-devel] Why isn't deskshow a core module?

2014-03-11 Thread Jeff Hoogland
Is there a reason the deskshow module isn't include in E's core? It is a
very simple module that works well and is a feature most users expect to
have for their desktop.

-- 
~Jeff Hoogland 
Thoughts on Technology , Tech Blog
Bodhi Linux , Enlightenment for your Desktop
--
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


Re: [E-devel] [EGIT] [core/efl] master 02/03: eina-cxx: Added eina_log support for C++, using IOStreams syntax

2014-03-11 Thread David Seikel
On Tue, 11 Mar 2014 17:24:30 -0300 Gustavo Sverzut Barbieri
 wrote:

> On Tue, Mar 11, 2014 at 5:04 PM, Felipe Magno de Almeida
>  wrote:
> > On Tue, Mar 11, 2014 at 3:07 PM, Gustavo Sverzut Barbieri
> >  wrote:
> >>
> >
> > Hello Gustavo,
> >
> >> On Tue, Mar 11, 2014 at 9:02 AM, Felipe Magno de Almeida
> >>  wrote:
> >
> > [snip]
> >
> >>> That is possible, we can change the name though to something
> >>> unlikely to clash.
> >>
> >> I mean if you call the macro 3 times, one in the main function,
> >> another inside "if()". Then in C it would declare the variable with
> >> the same name 2 times, that will warn that the inner block
> >> (if-statement) shadows the one in function scope.
> >
> > Yeah, that doesn't happen in C++ though. So there wouldn't be that
> > problem. In C++ the variable defined in a for-loop lives only in
> > the for-loop scope and is destroyed when the loop ends.
> >
> > [snip]
> >
> >>> OK. So let me know if this is really what you want:
> >>>
> >>> EINA_LOG(err) << "error " << error_code;
> >>> EINA_LOG(dbg) << "error " << error_code;
> >>> EINA_LOG(crit) << "error " << error_code;
> >>>
> >>> efl::eina::log_domain my_domain("mylib", "yellow");
> >>> EINA_LOG(my_domain.err) << "error " << error_code;
> >>> EINA_LOG(my_domain.dbg) << "error " << error_code;
> >>> EINA_LOG(my_domain.crit) << "error " << error_code;
> >>
> >> exactly what I want!
> >>
> >> I liked the idea of using "endl" to flush, allowing multiple on
> >> single statement such as:
> >> EINA_LOG(crit) << "error " << error_code << endl << "another line"
> >> << endl;
> >>
> >> but that's minor. I like the way you have it now.
> >
> > Ok.
> >
> >>> Is the EINA_LOG(err) going to log on the default domain or the
> >>> global domain? If it is this that you want I think this is
> >>> doable.  If not, let me know where is my
> >>> misunderstanding.
> >>
> >> that's it. EINA_LOG(err) logs to err... whatever err is. If the guy
> >> says "using namespace efl::eina::log", then it's the global log
> >> domain. If he does a global variable on his project called "err",
> >> then he is using his own log domain.
> >
> > That is more complicated, also I dislike using namespace in headers
> > for obvious reasons.
> 
> not so obvious to me... don't you like the "efl::eina::log"
> namespace? Or what?
> 
> the "using namespace efl::eina::log" thing is not to be done in
> headers. It is to be done in the ".cxx" files that wants to use
> logging.
> 
> 
> > What is easy is to just log to
> > EINA_LOG_DOMAIN_DEFAULT and have the user #define it as already
> > is for C. Give me sometime to think.
> 
> nobody defines that, people just #define DBG() and others to use their
> domain, because it is shorter :-)

D() is even shorter.  Why waste those extra two characters?  B-)

-- 
A big old stinking pile of genius that no one wants
coz there are too many silver coated monkeys in the world.


signature.asc
Description: PGP signature
--
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


[EGIT] [apps/terminology] master 01/01: keep default theme compatible with efl 1.7/8

2014-03-11 Thread Boris Faure
billiob pushed a commit to branch master.

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

commit d9e076fe88823906b31cc5b009b773ae7d3b58d7
Author: Boris Faure 
Date:   Tue Mar 11 22:40:12 2014 +0100

keep default theme compatible with efl 1.7/8
---
 data/themes/default.edc | 24 
 1 file changed, 24 insertions(+)

diff --git a/data/themes/default.edc b/data/themes/default.edc
index 8d41774..d74358d 100644
--- a/data/themes/default.edc
+++ b/data/themes/default.edc
@@ -629,7 +629,11 @@ collections {
  }
  program {
 signal: "bell"; source: "terminology";
+#if (EFL_VERSION_MAJOR > 1) || (EFL_VERSION_MINOR >= 9)
 action: PLAY_SAMPLE "bell" 1.0 ALERT;
+#else
+action: PLAY_SAMPLE "bell" 1.0;
+#endif
  }
  program {
 signal: "bell"; source: "terminology";
@@ -2410,19 +2414,39 @@ target: "0.clip"; target: "1.clip"; target: "2.clip"; 
target: "3.clip"; target:
}
 }
 program { name: "key-down1";
+#if (EFL_VERSION_MAJOR > 1) || (EFL_VERSION_MINOR >= 9)
action: PLAY_SAMPLE "key-tap1" 1.0 INPUT;
+#else
+   action: PLAY_SAMPLE "key-tap1" 1.0;
+#endif
 }
 program { name: "key-down2";
+#if (EFL_VERSION_MAJOR > 1) || (EFL_VERSION_MINOR >= 9)
action: PLAY_SAMPLE "key-tap2" 1.0 INPUT;
+#else
+   action: PLAY_SAMPLE "key-tap2" 1.0;
+#endif
 }
 program { name: "key-down3";
+#if (EFL_VERSION_MAJOR > 1) || (EFL_VERSION_MINOR >= 9)
action: PLAY_SAMPLE "key-tap3" 1.0 INPUT;
+#else
+   action: PLAY_SAMPLE "key-tap3" 1.0;
+#endif
 }
 program { name: "key-down4";
+#if (EFL_VERSION_MAJOR > 1) || (EFL_VERSION_MINOR >= 9)
action: PLAY_SAMPLE "key-tap4" 1.0 INPUT;
+#else
+   action: PLAY_SAMPLE "key-tap4" 1.0;
+#endif
 }
 program { name: "key-down5";
+#if (EFL_VERSION_MAJOR > 1) || (EFL_VERSION_MINOR >= 9)
action: PLAY_SAMPLE "key-tap5" 1.0 INPUT;
+#else
+   action: PLAY_SAMPLE "key-tap5" 1.0;
+#endif
 }
 program {
signal: "key,down"; source: "terminology";

-- 




[EGIT] [core/efl] master 01/01: evas: @fix use the correct composite op on lines with pixman

2014-03-11 Thread Boris Faure
billiob pushed a commit to branch master.

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

commit e8c0e71f89bfd127bbc7cb227a698d27c7f3cf82
Author: Boris Faure 
Date:   Mon Feb 3 22:06:37 2014 +0100

evas: @fix use the correct composite op on lines with pixman
---
 src/lib/evas/common/evas_line_main.c | 16 ++--
 1 file changed, 6 insertions(+), 10 deletions(-)

diff --git a/src/lib/evas/common/evas_line_main.c 
b/src/lib/evas/common/evas_line_main.c
index 8f4d160..9d3aa6b 100644
--- a/src/lib/evas/common/evas_line_main.c
+++ b/src/lib/evas/common/evas_line_main.c
@@ -1261,8 +1261,7 @@ _evas_draw_line_aa(RGBA_Image *dst, RGBA_Draw_Context 
*dc, int x0, int y0, int x
(uint32_t 
*)&alpha_data_buffer, 4);
   
   if ((dst->pixman.im) && (dc->col.pixman_color_image))
-pixman_image_composite(PIXMAN_OP_OVER,
-   dc->col.pixman_color_image,
+pixman_image_composite(op, dc->col.pixman_color_image,
aa_mask_image, dst->pixman.im,
pix_x, pix_y, 0, 0,
pix_x, pix_y, 1, 1);
@@ -1285,8 +1284,7 @@ _evas_draw_line_aa(RGBA_Image *dst, RGBA_Draw_Context 
*dc, int x0, int y0, int x
(uint32_t 
*)&alpha_data_buffer, 4);
   
   if ((dst->pixman.im) && (dc->col.pixman_color_image))
-pixman_image_composite(PIXMAN_OP_OVER,
-   dc->col.pixman_color_image,
+pixman_image_composite(op, dc->col.pixman_color_image,
aa_mask_image, dst->pixman.im,
pix_x, pix_y + 1, 0, 0,
pix_x, pix_y + 1, 1, 1);
@@ -1354,8 +1352,7 @@ next_x:
   aa_mask_image = pixman_image_create_bits(PIXMAN_a8, 1, 1, 
(uint32_t *)&alpha_data_buffer, 4);
   
   if ((dst->pixman.im) && (dc->col.pixman_color_image))
-pixman_image_composite(PIXMAN_OP_OVER,
-   dc->col.pixman_color_image,
+pixman_image_composite(op, dc->col.pixman_color_image,
aa_mask_image, dst->pixman.im,
pix_x, pix_y, 0, 0,
pix_x, pix_y, 1, 1);
@@ -1377,12 +1374,11 @@ next_x:
   alpha_data_buffer = aa;
   aa_mask_image = pixman_image_create_bits(PIXMAN_a8, 1, 1, 
(uint32_t 
*)&alpha_data_buffer, 4);
-  
+
   if ((dst->pixman.im) && (dc->col.pixman_color_image))
-   pixman_image_composite(PIXMAN_OP_OVER, 
-  dc->col.pixman_color_image, 
+   pixman_image_composite(op, dc->col.pixman_color_image,
   aa_mask_image, dst->pixman.im,
-  pix_x + 1, pix_y, 0, 0, 
+  pix_x + 1, pix_y, 0, 0,
   pix_x + 1, pix_y, 1, 1);
   else
 # endif

-- 




Re: [E-devel] [EGIT] [core/efl] master 02/03: eina-cxx: Added eina_log support for C++, using IOStreams syntax

2014-03-11 Thread Gustavo Sverzut Barbieri
On Tue, Mar 11, 2014 at 5:04 PM, Felipe Magno de Almeida
 wrote:
> On Tue, Mar 11, 2014 at 3:07 PM, Gustavo Sverzut Barbieri
>  wrote:
>>
>
> Hello Gustavo,
>
>> On Tue, Mar 11, 2014 at 9:02 AM, Felipe Magno de Almeida
>>  wrote:
>
> [snip]
>
>>> That is possible, we can change the name though to something unlikely
>>> to clash.
>>
>> I mean if you call the macro 3 times, one in the main function,
>> another inside "if()". Then in C it would declare the variable with
>> the same name 2 times, that will warn that the inner block
>> (if-statement) shadows the one in function scope.
>
> Yeah, that doesn't happen in C++ though. So there wouldn't be that problem.
> In C++ the variable defined in a for-loop lives only in the for-loop scope and
> is destroyed when the loop ends.
>
> [snip]
>
>>> OK. So let me know if this is really what you want:
>>>
>>> EINA_LOG(err) << "error " << error_code;
>>> EINA_LOG(dbg) << "error " << error_code;
>>> EINA_LOG(crit) << "error " << error_code;
>>>
>>> efl::eina::log_domain my_domain("mylib", "yellow");
>>> EINA_LOG(my_domain.err) << "error " << error_code;
>>> EINA_LOG(my_domain.dbg) << "error " << error_code;
>>> EINA_LOG(my_domain.crit) << "error " << error_code;
>>
>> exactly what I want!
>>
>> I liked the idea of using "endl" to flush, allowing multiple on single
>> statement such as:
>> EINA_LOG(crit) << "error " << error_code << endl << "another line" << endl;
>>
>> but that's minor. I like the way you have it now.
>
> Ok.
>
>>> Is the EINA_LOG(err) going to log on the default domain or the global 
>>> domain?
>>> If it is this that you want I think this is doable.  If not, let me
>>> know where is my
>>> misunderstanding.
>>
>> that's it. EINA_LOG(err) logs to err... whatever err is. If the guy
>> says "using namespace efl::eina::log", then it's the global log
>> domain. If he does a global variable on his project called "err", then
>> he is using his own log domain.
>
> That is more complicated, also I dislike using namespace in headers for
> obvious reasons.

not so obvious to me... don't you like the "efl::eina::log" namespace? Or what?

the "using namespace efl::eina::log" thing is not to be done in
headers. It is to be done in the ".cxx" files that wants to use
logging.


> What is easy is to just log to
> EINA_LOG_DOMAIN_DEFAULT and have the user #define it as already
> is for C. Give me sometime to think.

nobody defines that, people just #define DBG() and others to use their
domain, because it is shorter :-)



-- 
Gustavo Sverzut Barbieri
--
Mobile: +55 (19) 99225-2202
Contact: http://www.gustavobarbieri.com.br/contact

--
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


Re: [E-devel] [EGIT] [core/efl] master 02/03: eina-cxx: Added eina_log support for C++, using IOStreams syntax

2014-03-11 Thread Felipe Magno de Almeida
On Tue, Mar 11, 2014 at 3:07 PM, Gustavo Sverzut Barbieri
 wrote:
>

Hello Gustavo,

> On Tue, Mar 11, 2014 at 9:02 AM, Felipe Magno de Almeida
>  wrote:

[snip]

>> That is possible, we can change the name though to something unlikely
>> to clash.
>
> I mean if you call the macro 3 times, one in the main function,
> another inside "if()". Then in C it would declare the variable with
> the same name 2 times, that will warn that the inner block
> (if-statement) shadows the one in function scope.

Yeah, that doesn't happen in C++ though. So there wouldn't be that problem.
In C++ the variable defined in a for-loop lives only in the for-loop scope and
is destroyed when the loop ends.

[snip]

>> OK. So let me know if this is really what you want:
>>
>> EINA_LOG(err) << "error " << error_code;
>> EINA_LOG(dbg) << "error " << error_code;
>> EINA_LOG(crit) << "error " << error_code;
>>
>> efl::eina::log_domain my_domain("mylib", "yellow");
>> EINA_LOG(my_domain.err) << "error " << error_code;
>> EINA_LOG(my_domain.dbg) << "error " << error_code;
>> EINA_LOG(my_domain.crit) << "error " << error_code;
>
> exactly what I want!
>
> I liked the idea of using "endl" to flush, allowing multiple on single
> statement such as:
> EINA_LOG(crit) << "error " << error_code << endl << "another line" << endl;
>
> but that's minor. I like the way you have it now.

Ok.

>> Is the EINA_LOG(err) going to log on the default domain or the global domain?
>> If it is this that you want I think this is doable.  If not, let me
>> know where is my
>> misunderstanding.
>
> that's it. EINA_LOG(err) logs to err... whatever err is. If the guy
> says "using namespace efl::eina::log", then it's the global log
> domain. If he does a global variable on his project called "err", then
> he is using his own log domain.

That is more complicated, also I dislike using namespace in headers for
obvious reasons. What is easy is to just log to
EINA_LOG_DOMAIN_DEFAULT and have the user #define it as already
is for C. Give me sometime to think.

> --
> Gustavo Sverzut Barbieri
> --
> Mobile: +55 (19) 99225-2202
> Contact: http://www.gustavobarbieri.com.br/contact

Regards,
-- 
Felipe Magno de Almeida

--
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


Re: [E-devel] [EGIT] [core/efl] efl-1.9 01/01: release: Update NEWS and bump version for 1.9.1 release

2014-03-11 Thread Davide Andreoli
2014-03-11 11:22 GMT+01:00 Stefan Schmidt :

> Hello.
>
> On Tue, 2014-03-11 at 09:34, Carsten Haitzler wrote:
> > On Mon, 10 Mar 2014 18:12:21 +0100 Davide Andreoli <
> d...@gurumeditation.it>
> > said:
> >
> > > Also this change broke something
> > > * evas: replace EINA_LIST_FREE to EINA_LIST_FOREACH_SAFE.
> > >
> > > and still waiting a replay from the author in ML...
> > >
> > > Just try elementary_test -to Photo, it segfault on start with that
> change
> >
> > yeah. this is a problem... i am unsure why though. i haven't looked yet.
> > valgrind says:
>
> WooHyun fixed it in master and backported it as well. Cha ged the
> macro to a while loop to avoid this.
>
> Davide, Raster are you both happy with this? Right now I consider it
> fixed for an upcoming 1.9.1
>

yes, I confirm it is fixed now, both elm_test and egitu works without
segfault now.


>
> regards
> Stefan Schmidt
>
>
> --
> Learn Graph Databases - Download FREE O'Reilly Book
> "Graph Databases" is the definitive new guide to graph databases and their
> applications. Written by three acclaimed leaders in the field,
> this first edition is now available. Download your free book today!
> http://p.sf.net/sfu/13534_NeoTech
> ___
> enlightenment-devel mailing list
> enlightenment-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
>
--
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


Re: [E-devel] [EGIT] [core/elementary] master 01/01: win: Add a API, elm_win_type_get.

2014-03-11 Thread Gustavo Sverzut Barbieri
On Tue, Mar 11, 2014 at 9:21 AM, Daniel Juyung Seo  wrote:
> On Thu, Feb 6, 2014 at 7:28 PM, Jaehwan Kim wrote:
>>  typedef enum
>>  {
>> +   ELM_WIN_UNKNOWN, /**< Unknown window type. */
>> ELM_WIN_BASIC, /**< A normal window. Indicates a normal, top-level
>>   window. Almost every window will be created with this
>>   type. */
>>
>
> This looks like a big ABI break.
> Any idea on this?


indeed this is a break we can't have.

--
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


Re: [E-devel] [EGIT] [core/efl] master 02/03: eina-cxx: Added eina_log support for C++, using IOStreams syntax

2014-03-11 Thread Gustavo Sverzut Barbieri
On Tue, Mar 11, 2014 at 9:02 AM, Felipe Magno de Almeida
 wrote:
> Hello Gustavo,
>
> On Mon, Mar 10, 2014 at 9:15 PM, Gustavo Sverzut Barbieri
>  wrote:
>> On Mon, Mar 10, 2014 at 6:14 PM, Felipe Magno de Almeida
>
> [snip]
>
 This works:

   EINA_CXX_DOM_LOG_CRIT(domain) << "foo 0x" << std::hex << 10;

 [snip]

 Is this better?
>>>
>>> https://phab.enlightenment.org/D623
>>
>> no, I'm complaining about a different issue. See my other email. I'm
>> complaining about the syntax and usage.
>
> That patch does change the syntax, it was:
>
> EINA_CXX_DOM_LOG_CRIT(domain, "foo 0x" << std::hex << 10);
>
> It is now:
>
> EINA_CXX_DOM_LOG_CRIT(domain) << "foo 0x" << std::hex << 10;
>
>> You can also think about a different solution where instad of locking
>> and an internal "this.message" you keep a per-thread local storage,
>> each thread appends to its own string/stringstream.
>
> I really don't want to take that road unless it is really necessary, and I
> don't think it is necessary.
>
>> Your idea to have a stack-allocated stream may work to avoid the issue
>> as well, not sure if it will trigger a shadow warning if there is a
>> "stream" variable set before
>
> That is possible, we can change the name though to something unlikely
> to clash.

I mean if you call the macro 3 times, one in the main function,
another inside "if()". Then in C it would declare the variable with
the same name 2 times, that will warn that the inner block
(if-statement) shadows the one in function scope.


>> or how that behaves with memory allocations.
>
> I don't understand what you mean here by memory allocations. Which
> issues could there be? And which allocations?

that was related to my idea of keeping a stream that accumulates the
messages before flushing to eina_log_print(). The stream will allocate
memory to keep its data, once you flush it, it will dispose the
memory. If you keep the stream and you're able to reset the pointer
back to index=0, then we avoid allocating/deallocating, since we can
reset the stream and reuse it in all calls, not only in the same
scope/function. Usually it will grow to some max size and stay
constant (ie: go to 100 chars and stay at that size).


>> In any way there are multiple ways to achieve that, be
>> your for() trick, Thread-Local-Storage or whatever. That's not my
>> issue.
>
> The for trick works OK and is the least expensive way. It also avoids
> calling the expensive_call unless it is going to be logged.

you mean because you call level check() inside the for(), and the "<<"
will be evaluated inside that for() statement? ok. Would be even nicer
than C, which can't do that, but in years of usage I never saw such
thing -- granted that in C it's harder to manage memory and if you
return a "char *" (allocated) then you'd need to at least call free()
on that, so you need a block and calling level check at that point
makes more sense.


>> Also, I do think we do NOT need one macro per level, that's an issue
>> for C, but not for C++.
>
> OK. I hadn't thought of that. It is not unusual for C++ to use macros
> here to differentiate. But it is possible to have something nicer too.

if you can have something nicer, even better.


>> Eventually we can even remove the CXX from the
>> name as it doesn't conflict with C and use either EINA_CXX_LOG(stream)
>> or EINA_LOG(stream). A small and simple way to log is essential to
>> allow someone to use logs.
>>
>> The global log level just expose its level_as_stream as globals or
>> efl::eina:log namespace, such as err, dbg, crit, inf, wrn...
>>
>> BTW, you don't need to cope with log domains created by C other than
>> the global log level (that is a special case). If you want to use a
>> log level in C++ you will be creating that in C++, there should be no
>> reason to use one that was created by C and use that in C++. If one
>> that that ever comes to happen, the developer can fallback to use the
>> C macros.
>
> OK. So let me know if this is really what you want:
>
> EINA_LOG(err) << "error " << error_code;
> EINA_LOG(dbg) << "error " << error_code;
> EINA_LOG(crit) << "error " << error_code;
>
> efl::eina::log_domain my_domain("mylib", "yellow");
> EINA_LOG(my_domain.err) << "error " << error_code;
> EINA_LOG(my_domain.dbg) << "error " << error_code;
> EINA_LOG(my_domain.crit) << "error " << error_code;

exactly what I want!

I liked the idea of using "endl" to flush, allowing multiple on single
statement such as:
EINA_LOG(crit) << "error " << error_code << endl << "another line" << endl;

but that's minor. I like the way you have it now.


> Is the EINA_LOG(err) going to log on the default domain or the global domain?
> If it is this that you want I think this is doable.  If not, let me
> know where is my
> misunderstanding.

that's it. EINA_LOG(err) logs to err... whatever err is. If the guy
says "using namespace efl::eina::log", then it's the global log
domain. If he does a global variable on his project called "err", 

[EGIT] [core/efl] master 01/01: Eo: removed redundant macro.

2014-03-11 Thread Tom Hacohen
tasn pushed a commit to branch master.

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

commit e280f32c010764b7b1dfbabfe32386b06615b7ed
Author: Tom Hacohen 
Date:   Tue Mar 11 15:58:43 2014 +

Eo: removed redundant macro.
---
 src/lib/eo/eo.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/src/lib/eo/eo.c b/src/lib/eo/eo.c
index 7d16b68..39b5abf 100644
--- a/src/lib/eo/eo.c
+++ b/src/lib/eo/eo.c
@@ -39,8 +39,6 @@ static const Eo_Op_Description *_eo_op_id_desc_get(Eo_Op op);
 #define DICH_CHAIN_LAST(x) ((x) & ((1 << DICH_CHAIN_LAST_BITS) - 1))
 
 
-#define OP_CLASS_OFFSET_GET(x) (((x) >> EO_OP_CLASS_OFFSET) & 0x)
-
 /* We are substracting the mask here instead of "AND"ing because it's a hot 
path,
  * it should be a valid class at this point, and this lets the compiler do 1
  * substraction at compile time. */

-- 




[EGIT] [core/efl] master 01/01: Eo: Made eo id for classes a bit more secure.

2014-03-11 Thread Tom Hacohen
tasn pushed a commit to branch master.

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

commit 122a2f890e4995a211e857b60414b7af503693d3
Author: Tom Hacohen 
Date:   Tue Mar 11 15:50:44 2014 +

Eo: Made eo id for classes a bit more secure.

This patch sets the one before most significant bit on for classes. This
means that class ids are now very big, compared to the old ids which
were growing small integers (1, 2, 3...).
This makes accidental passing of integers (corrupted obj pointers) less
common.

@feature
---
 src/lib/eo/eo.c | 11 +++
 src/lib/eo/eo_ptr_indirection.x |  5 +
 2 files changed, 12 insertions(+), 4 deletions(-)

diff --git a/src/lib/eo/eo.c b/src/lib/eo/eo.c
index 26a91d2..7d16b68 100644
--- a/src/lib/eo/eo.c
+++ b/src/lib/eo/eo.c
@@ -8,7 +8,6 @@
 #include "eo_ptr_indirection.h"
 #include "eo_private.h"
 
-/* The last id that should be reserved for statically allocated classes. */
 #define EO_CLASS_IDS_FIRST 1
 #define EO_OP_IDS_FIRST 1
 
@@ -42,9 +41,13 @@ static const Eo_Op_Description *_eo_op_id_desc_get(Eo_Op op);
 
 #define OP_CLASS_OFFSET_GET(x) (((x) >> EO_OP_CLASS_OFFSET) & 0x)
 
+/* We are substracting the mask here instead of "AND"ing because it's a hot 
path,
+ * it should be a valid class at this point, and this lets the compiler do 1
+ * substraction at compile time. */
+#define _UNMASK_ID(id) ((id) - MASK_CLASS_TAG)
 #define ID_CLASS_GET(id) ({ \
-  (_Eo_Class *) (((id <= _eo_classes_last_id) && (id > 0)) ? \
-  (_eo_classes[id - 1]) : NULL); \
+  (_Eo_Class *) (((_UNMASK_ID(id) <= _eo_classes_last_id) && 
(_UNMASK_ID(id) > 0)) ? \
+  (_eo_classes[_UNMASK_ID(id) - 1]) : NULL); \
   })
 
 static inline void
@@ -1012,7 +1015,7 @@ eo_class_new(const Eo_Class_Description *desc, const 
Eo_Class *parent_id, ...)
  }
 
eina_spinlock_take(&_eo_class_creation_lock);
-   klass->header.id = ++_eo_classes_last_id;
+   klass->header.id = ++_eo_classes_last_id | MASK_CLASS_TAG;
  {
 /* FIXME: Handle errors. */
 size_t arrsize = _eo_classes_last_id * sizeof(*_eo_classes);
diff --git a/src/lib/eo/eo_ptr_indirection.x b/src/lib/eo/eo_ptr_indirection.x
index 9bfd584..870d6a1 100644
--- a/src/lib/eo/eo_ptr_indirection.x
+++ b/src/lib/eo/eo_ptr_indirection.x
@@ -101,6 +101,11 @@ typedef uint32_t Generation_Counter;
 #define MASK_ENTRY_ID ((1 << BITS_ENTRY_ID) - 1)
 #define MASK_GENERATIONS  (MAX_GENERATIONS - 1)
 
+/* This only applies to classes. Used to artificially enlarge the class ids
+ * to reduce the likelihood of a clash with normal integers. */
+#define CLASS_TAG_SHIFT   (REF_TAG_SHIFT - 1)
+#define MASK_CLASS_TAG(((Eo_Id) 1) << (CLASS_TAG_SHIFT))
+
 #define MEM_HEADER_SIZE   16
 #define MEM_PAGE_SIZE 4096
 #define MEM_MAGIC 0x3f61ec8a

-- 




[EGIT] [core/efl] master 03/04: Eolian/Generator: fix type when no data type exists.

2014-03-11 Thread Daniel Zaoui
jackdanielz pushed a commit to branch master.

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

commit d3f343bdcced4ab88ef694fc900b978f4b2cfe75
Author: Daniel Zaoui 
Date:   Tue Mar 11 14:00:44 2014 +0200

Eolian/Generator: fix type when no data type exists.

When data is set as "null", the generator was writing for this data
variable "void * *_pd" instead of "void *_pd".
---
 src/bin/eolian/eo1_generator.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/bin/eolian/eo1_generator.c b/src/bin/eolian/eo1_generator.c
index b3cf366..0b02d5b 100644
--- a/src/bin/eolian/eo1_generator.c
+++ b/src/bin/eolian/eo1_generator.c
@@ -460,7 +460,7 @@ eo1_bind_func_generate(const char *classname, 
Eolian_Function funcid, Eolian_Fun
eina_strbuf_replace_all(fbody, "@#list_params", 
eina_strbuf_string_get(params));
const char *data_type = eolian_class_data_type_get(classname);
if (data_type && !strcmp(data_type, "null"))
-  eina_strbuf_replace_all(fbody, "@#Datatype_Data", "void *");
+  eina_strbuf_replace_all(fbody, "@#Datatype_Data", "void");
else
  {
 if (data_type) eina_strbuf_replace_all(fbody, "@#Datatype_Data", 
data_type);

-- 




[EGIT] [core/efl] master 02/04: Eolian/Lexer: support of legacy overriding for properties.

2014-03-11 Thread Daniel Zaoui
jackdanielz pushed a commit to branch master.

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

commit 6f2657c3fb65a2ea4f1216686e27f170742456fe
Author: Daniel Zaoui 
Date:   Tue Mar 11 14:02:31 2014 +0200

Eolian/Lexer: support of legacy overriding for properties.
---
 src/lib/eolian/eo_lexer.c  | 6 ++
 src/lib/eolian/eo_lexer.rl | 6 ++
 2 files changed, 12 insertions(+)

diff --git a/src/lib/eolian/eo_lexer.c b/src/lib/eolian/eo_lexer.c
index 120a0ee..27a9893 100644
--- a/src/lib/eolian/eo_lexer.c
+++ b/src/lib/eolian/eo_lexer.c
@@ -4412,6 +4412,12 @@ eo_tokenizer_database_fill(const char *filename)
database_function_return_flag_set_as_warn_unused(foo_id,
  accessor->type == SETTER?SET:GET, 
accessor->ret.warn_unused);
 }
+  if (accessor->legacy)
+{
+   database_function_data_set(foo_id,
+ (accessor->type == 
SETTER?EOLIAN_LEGACY_SET:EOLIAN_LEGACY_GET),
+ accessor->legacy);
+}
   database_function_description_set(foo_id,
 (accessor->type == 
SETTER?EOLIAN_COMMENT_SET:EOLIAN_COMMENT_GET),
 accessor->comment);
diff --git a/src/lib/eolian/eo_lexer.rl b/src/lib/eolian/eo_lexer.rl
index 6a34cf5..a62b39b 100644
--- a/src/lib/eolian/eo_lexer.rl
+++ b/src/lib/eolian/eo_lexer.rl
@@ -1328,6 +1328,12 @@ eo_tokenizer_database_fill(const char *filename)
database_function_return_flag_set_as_warn_unused(foo_id,
  accessor->type == SETTER?SET:GET, 
accessor->ret.warn_unused);
 }
+  if (accessor->legacy)
+{
+   database_function_data_set(foo_id,
+ (accessor->type == 
SETTER?EOLIAN_LEGACY_SET:EOLIAN_LEGACY_GET),
+ accessor->legacy);
+}
   database_function_description_set(foo_id,
 (accessor->type == 
SETTER?EOLIAN_COMMENT_SET:EOLIAN_COMMENT_GET),
 accessor->comment);

-- 




[EGIT] [core/efl] master 04/04: Eolian/Generator: fix generation for return values.

2014-03-11 Thread Daniel Zaoui
jackdanielz pushed a commit to branch master.

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

commit fd67c1692c9385c4edbc314d2edc12c13cf9e429
Author: Daniel Zaoui 
Date:   Tue Mar 11 15:17:12 2014 +0200

Eolian/Generator: fix generation for return values.

- Remove space between type and variable if a star is present.
- Initialize return value to NULL before eo_do. It is needed in case the
eo_do invocation fails (NULL object...).
- Add const to the internal return value if needed.
---
 src/bin/eolian/eo1_generator.c| 2 +-
 src/bin/eolian/legacy_generator.c | 4 +++-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/bin/eolian/eo1_generator.c b/src/bin/eolian/eo1_generator.c
index 0b02d5b..7ca7628 100644
--- a/src/bin/eolian/eo1_generator.c
+++ b/src/bin/eolian/eo1_generator.c
@@ -431,7 +431,7 @@ eo1_bind_func_generate(const char *classname, 
Eolian_Function funcid, Eolian_Fun
   ret_const?"const ":"",
   rettype, had_star?"":" ");
 Eina_Strbuf *ret_param = eina_strbuf_new();
-if (rettype) eina_strbuf_append_printf(ret_param, "%s _%s = ", 
rettype, retname);
+if (rettype) eina_strbuf_append_printf(ret_param, "%s%s%s_%s = ", 
ret_const?"const ":"", rettype, had_star?"":" ", retname);
 eina_strbuf_replace_all(fbody, "@#ret_param", 
eina_strbuf_string_get(ret_param));
 sprintf(tmpstr, "%s%s", ret_const?"const ":"", rettype);
 eina_strbuf_replace_all(fbody, "@#ret_type", tmpstr);
diff --git a/src/bin/eolian/legacy_generator.c 
b/src/bin/eolian/legacy_generator.c
index f7b2363..301886e 100644
--- a/src/bin/eolian/legacy_generator.c
+++ b/src/bin/eolian/legacy_generator.c
@@ -298,7 +298,9 @@ _eapi_func_generate(const char *classname, Eolian_Function 
funcid, Eolian_Functi
  {
 if (eina_strbuf_length_get(eoparam)) eina_strbuf_append(eoparam, ", ");
 Eina_Bool had_star = !!strchr(rettype, '*');
-sprintf (tmpstr, "   %s%s%s%s;\n", ret_const?"const ":"", rettype, 
had_star?"":" ", retname);
+sprintf (tmpstr, "   %s%s%s%s%s;\n",
+  ret_const?"const ":"", rettype, had_star?"":" ", retname,
+  had_star?" = NULL":"");
 eina_strbuf_append_printf(eoparam, "&%s", retname);
  }
 

-- 




[EGIT] [core/efl] master 01/04: Eolian/Generator: fix for virtual pure implementations

2014-03-11 Thread Daniel Zaoui
jackdanielz pushed a commit to branch master.

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

commit 0d6fadcab97c6597dd0858e9ebd99763a3a72421
Author: Daniel Zaoui 
Date:   Tue Mar 11 14:02:03 2014 +0200

Eolian/Generator: fix for virtual pure implementations
---
 src/bin/eolian/eo1_generator.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/bin/eolian/eo1_generator.c b/src/bin/eolian/eo1_generator.c
index 2f3b8e0..b3cf366 100644
--- a/src/bin/eolian/eo1_generator.c
+++ b/src/bin/eolian/eo1_generator.c
@@ -348,7 +348,7 @@ eo1_bind_func_generate(const char *classname, 
Eolian_Function funcid, Eolian_Fun
Eina_Bool ret_const = EINA_FALSE;
Eina_Bool add_star = EINA_FALSE;
 
-   if (eolian_function_is_virtual_pure(funcid)) return EINA_TRUE;
+   if (!impl_name && eolian_function_is_virtual_pure(funcid)) return EINA_TRUE;
Eina_Strbuf *fbody = eina_strbuf_new();
Eina_Strbuf *va_args = eina_strbuf_new();
Eina_Strbuf *params = eina_strbuf_new(); /* only variables names */

-- 




[EGIT] [admin/release-management] master 01/01: Fixed help message.

2014-03-11 Thread Tom Hacohen
tasn pushed a commit to branch master.

http://git.enlightenment.org/admin/release-management.git/commit/?id=34c7e6f3b6f448140aabf8d8406607a05f84494a

commit 34c7e6f3b6f448140aabf8d8406607a05f84494a
Author: Tom Hacohen 
Date:   Tue Mar 11 13:14:39 2014 +

Fixed help message.
---
 generate_news.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/generate_news.py b/generate_news.py
index f6b8cd9..c55aa5a 100755
--- a/generate_news.py
+++ b/generate_news.py
@@ -61,7 +61,7 @@ if __name__ == '__main__':
 import argparse
 parser = argparse.ArgumentParser(description='NEWS generator')
 parser.add_argument('commit_range',
-help='The git commit range to work with, e.g: "..efl-1.9".')
+help='The git commit range to work with, e.g: "v1.9.0..".')
 
 args = parser.parse_args()
 

-- 




[EGIT] [admin/release-management] master 01/01: Remove duplicates in coverity/tag list.

2014-03-11 Thread Tom Hacohen
tasn pushed a commit to branch master.

http://git.enlightenment.org/admin/release-management.git/commit/?id=4264ce73bac895e0c93fd3dbdeec245353a38133

commit 4264ce73bac895e0c93fd3dbdeec245353a38133
Author: Tom Hacohen 
Date:   Tue Mar 11 13:09:58 2014 +

Remove duplicates in coverity/tag list.
---
 generate_news.py | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/generate_news.py b/generate_news.py
index 26c8596..f6b8cd9 100755
--- a/generate_news.py
+++ b/generate_news.py
@@ -20,6 +20,8 @@ def news_entry_get(commit):
 if not extra_info:
 return log['subject']
 else:
+# Remove duplicates
+extra_info = list(set(extra_info))
 return "{} ({})".format(log['subject'], ', '.join(extra_info))
 
 def commit_list_by_type_get(commit_range, list_type):

-- 




[EGIT] [core/efl] master 01/01: ChangeLog: Put notice at the top for efl.

2014-03-11 Thread Stefan Schmidt
stefan pushed a commit to branch master.

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

commit f38dc856bf96f42580817eb5d4d54e9aeb365e1c
Author: Stefan Schmidt 
Date:   Tue Mar 11 13:58:11 2014 +0100

ChangeLog: Put notice at the top for efl.

For reasons that are beyond me we have a different order for the ChangeLog
in EFL compared to the other repos. But its gone now anyway no need to feel
bad about it.

+1 karma for TAsn to point it out -1 karma for TAsn to force his name into
commit messages.
---
 ChangeLog | 12 ++--
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 88aafb5..48dee48 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+OUT OF DATE NOTICE:
+---
+With the start of the 1.9.x release cycle we now longer update the ChangeLog 
and rely on git log for
+this functionality. We keep however a NEWS files for a high level overview of 
changes in a new
+release which will be filled at the end of the release cycle.
+
 2013-12-01  Carsten Haitzler (The Rasterman)
 
 * 1.8 release
@@ -1478,9 +1484,3 @@
 2012-09-03  Igor Murzov
 
 * Add WebP image loader.
-
-OUT OF DATE NOTICE:

-With the start of the 1.9.x release cycle we now longer update the ChangeLog 
and rely on git log for
-this functionality. We keep however a NEWS files for a high level overview of 
changes in a new
-release which will be filled at the end of the release cycle.

-- 




[EGIT] [admin/release-management] master 02/03: Add functions to get commit message and generate news entry.

2014-03-11 Thread Tom Hacohen
tasn pushed a commit to branch master.

http://git.enlightenment.org/admin/release-management.git/commit/?id=a8a21d9de729006b79f8ce264922411ca1e044d2

commit a8a21d9de729006b79f8ce264922411ca1e044d2
Author: Tom Hacohen 
Date:   Tue Mar 11 12:23:39 2014 +

Add functions to get commit message and generate news entry.
---
 generate_news.py | 36 
 1 file changed, 36 insertions(+)

diff --git a/generate_news.py b/generate_news.py
new file mode 100755
index 000..08f31ff
--- /dev/null
+++ b/generate_news.py
@@ -0,0 +1,36 @@
+#!/usr/bin/env python2
+
+import subprocess
+import re
+
+def git_commit_message_get(commit):
+ret = {}
+crange = "{0}^..{0}".format(commit)
+out = subprocess.check_output(['git', 'log', '--format=format:%s%n%b', 
crange])
+ret['subject'], ret['message'] = out.split('\n', 1)
+return ret
+
+def news_entry_get(commit):
+log = git_commit_message_get(commit)
+extra_info = []
+
+for match in re.finditer('CID ?\d+|T\d+', log['message']):
+extra_info.append(match.group(0).replace(' ', ''))
+
+if not extra_info:
+return log['subject']
+else:
+return "{} ({})".format(log['subject'], ', '.join(extra_info))
+
+def run(args):
+pass
+
+if __name__ == '__main__':
+import argparse
+parser = argparse.ArgumentParser(description='NEWS generator')
+parser.add_argument('commit_range',
+help='The git commit range to work with, e.g: "..efl-1.9".')
+
+args = parser.parse_args()
+
+run(args)

-- 




[EGIT] [admin/release-management] master 01/03: Initial commit.

2014-03-11 Thread Tom Hacohen
tasn pushed a commit to branch master.

http://git.enlightenment.org/admin/release-management.git/commit/?id=dba027e982795959383f88136fdddb5b678ee85f

commit dba027e982795959383f88136fdddb5b678ee85f
Author: Tom Hacohen 
Date:   Tue Mar 11 11:46:09 2014 +

Initial commit.
---
 README | 1 +
 1 file changed, 1 insertion(+)

diff --git a/README b/README
new file mode 100644
index 000..b3e83ad
--- /dev/null
+++ b/README
@@ -0,0 +1 @@
+Tools for release management.

-- 




[EGIT] [admin/release-management] master 03/03: Finished the news generator.

2014-03-11 Thread Tom Hacohen
tasn pushed a commit to branch master.

http://git.enlightenment.org/admin/release-management.git/commit/?id=a85b1b120a5acaea4122e4d0b0517a2e56ae1002

commit a85b1b120a5acaea4122e4d0b0517a2e56ae1002
Author: Tom Hacohen 
Date:   Tue Mar 11 12:50:05 2014 +

Finished the news generator.
---
 generate_news.py | 32 +++-
 1 file changed, 31 insertions(+), 1 deletion(-)

diff --git a/generate_news.py b/generate_news.py
index 08f31ff..26c8596 100755
--- a/generate_news.py
+++ b/generate_news.py
@@ -22,8 +22,38 @@ def news_entry_get(commit):
 else:
 return "{} ({})".format(log['subject'], ', '.join(extra_info))
 
+def commit_list_by_type_get(commit_range, list_type):
+cmd = ['git', 'log', '--format=format:%H']
+if list_type == 'feature':
+cmd.extend(['--grep', '@feature'])
+elif list_type == 'fix':
+cmd.extend(['--grep', '@fix', '--grep', '@bugfix'])
+
+cmd.append(commit_range)
+out = subprocess.check_output(cmd)
+ret = out.split('\n')
+if ret[0] == '':
+return None
+else:
+return ret
+
+def news_range_print(commit_range, list_type):
+commit_list = commit_list_by_type_get(commit_range, list_type)
+if commit_list:
+for commit in reversed(commit_list):
+print('   * {}'.format(news_entry_get(commit)))
+
+def news_features_print(commit_range):
+print('Features:\n')
+news_range_print(commit_range, 'feature')
+
+def news_fixes_print(commit_range):
+print('Fixes:\n')
+news_range_print(commit_range, 'fix')
+
 def run(args):
-pass
+news_features_print(args.commit_range)
+news_fixes_print(args.commit_range)
 
 if __name__ == '__main__':
 import argparse

-- 




[EGIT] [core/efl] master 02/02: eolian: regroup buffer allocation and read checks

2014-03-11 Thread Jérémy Zurcher
jeyzu pushed a commit to branch master.

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

commit c69b28dac0f87b0218bb396eda794f4b4d738735
Author: Jérémy Zurcher 
Date:   Tue Mar 11 14:00:20 2014 +0100

eolian: regroup buffer allocation and read checks
---
 src/lib/eolian/eo_lexer.c  | 45 -
 src/lib/eolian/eo_lexer.rl | 27 +++
 2 files changed, 39 insertions(+), 33 deletions(-)

diff --git a/src/lib/eolian/eo_lexer.c b/src/lib/eolian/eo_lexer.c
index c4f408b..120a0ee 100644
--- a/src/lib/eolian/eo_lexer.c
+++ b/src/lib/eolian/eo_lexer.c
@@ -2745,20 +2745,8 @@ eo_tokenizer_mem_walk(Eo_Tokenizer *toknz, const char 
*source, char *buffer, uns
 
Eina_Bool ret = EINA_TRUE;
 
-   if (!len)
- {
-ERR("%s: given size is 0", source);
-return EINA_FALSE;
- }
-
-   if (len > BUFSIZE)
- {
-ERR("%s: buffer not enough big. Required size: %d", source, len);
-return EINA_FALSE;
- }
-

-#line 2762 "lib/eolian/eo_lexer.c"
+#line 2750 "lib/eolian/eo_lexer.c"
{
 toknz->cs = eo_tokenizer_start;
 toknz->ts = 0;
@@ -2766,7 +2754,7 @@ eo_tokenizer_mem_walk(Eo_Tokenizer *toknz, const char 
*source, char *buffer, uns
 toknz->act = 0;
}
 
-#line 1073 "lib/eolian/eo_lexer.rl"
+#line 1061 "lib/eolian/eo_lexer.rl"
 
toknz->p = buffer;
 
@@ -2775,7 +2763,7 @@ eo_tokenizer_mem_walk(Eo_Tokenizer *toknz, const char 
*source, char *buffer, uns
toknz->eof = toknz->pe;
 

-#line 2779 "lib/eolian/eo_lexer.c"
+#line 2767 "lib/eolian/eo_lexer.c"
{
int _klen;
unsigned int _trans;
@@ -2794,7 +2782,7 @@ _resume:
 #line 1 "NONE"
{ toknz->ts = ( toknz->p);}
break;
-#line 2798 "lib/eolian/eo_lexer.c"
+#line 2786 "lib/eolian/eo_lexer.c"
}
}
 
@@ -4126,7 +4114,7 @@ _eof_trans:
   {( toknz->p)++; goto _out; }  /* necessary to stop scanners */
}}
break;
-#line 4130 "lib/eolian/eo_lexer.c"
+#line 4118 "lib/eolian/eo_lexer.c"
}
}
 
@@ -4139,7 +4127,7 @@ _again:
 #line 1 "NONE"
{ toknz->ts = 0;}
break;
-#line 4143 "lib/eolian/eo_lexer.c"
+#line 4131 "lib/eolian/eo_lexer.c"
}
}
 
@@ -4157,12 +4145,12 @@ _again:
_out: {}
}
 
-#line 1081 "lib/eolian/eo_lexer.rl"
+#line 1069 "lib/eolian/eo_lexer.rl"
 
if ( toknz->cs == 
-#line 4164 "lib/eolian/eo_lexer.c"
+#line 4152 "lib/eolian/eo_lexer.c"
 -1
-#line 1082 "lib/eolian/eo_lexer.rl"
+#line 1070 "lib/eolian/eo_lexer.rl"
  )
  {
 ERR("%s: wrong termination", source);
@@ -4325,8 +4313,23 @@ eo_tokenizer_database_fill(const char *filename)
  }
 
buffer = malloc(BUFSIZE);
+   if (!buffer)
+ {
+ERR("unable to allocate read buffer");
+goto end;
+ }
+
unsigned int len = fread(buffer, 1, BUFSIZE, stream);
 
+   if (!len)
+ {
+ERR("%s: is an empty file", filename);
+goto end;
+ }
+
+   if (len == BUFSIZE)
+  WRN("%s: buffer(%d) is full, might not be big enough.", filename, len);
+
if (!eo_tokenizer_mem_walk(toknz, filename, buffer, len)) goto end;
 
if (!toknz->classes)
diff --git a/src/lib/eolian/eo_lexer.rl b/src/lib/eolian/eo_lexer.rl
index d2428a6..6a34cf5 100644
--- a/src/lib/eolian/eo_lexer.rl
+++ b/src/lib/eolian/eo_lexer.rl
@@ -1057,18 +1057,6 @@ eo_tokenizer_mem_walk(Eo_Tokenizer *toknz, const char 
*source, char *buffer, uns
 
Eina_Bool ret = EINA_TRUE;
 
-   if (!len)
- {
-ERR("%s: given size is 0", source);
-return EINA_FALSE;
- }
-
-   if (len > BUFSIZE)
- {
-ERR("%s: buffer not enough big. Required size: %d", source, len);
-return EINA_FALSE;
- }
-
%% write init;
 
toknz->p = buffer;
@@ -1241,8 +1229,23 @@ eo_tokenizer_database_fill(const char *filename)
  }
 
buffer = malloc(BUFSIZE);
+   if (!buffer)
+ {
+ERR("unable to allocate read buffer");
+goto end;
+ }
+
unsigned int len = fread(buffer, 1, BUFSIZE, stream);
 
+   if (!len)
+ {
+ERR("%s: is an empty file", filename);
+goto end;
+ }
+
+   if (len == BUFSIZE)
+  WRN("%s: buffer(%d) is full, might not be big enough.", filename, len);
+
if (!eo_tokenizer_mem_walk(toknz, filename, buffer, len)) goto end;
 
if (!toknz->classes)

-- 




[EGIT] [core/efl] master 01/02: eolian: silence uninitialized var warning

2014-03-11 Thread Jérémy Zurcher
jeyzu pushed a commit to branch master.

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

commit 1e2f00e654f6d53c2f32e8edb0135397ed3ff437
Author: Jérémy Zurcher 
Date:   Tue Mar 11 11:59:13 2014 +0100

eolian: silence uninitialized var warning
---
 src/lib/eolian/eo_lexer.c  | 8 
 src/lib/eolian/eo_lexer.rl | 2 +-
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/lib/eolian/eo_lexer.c b/src/lib/eolian/eo_lexer.c
index c0329ef..c4f408b 100644
--- a/src/lib/eolian/eo_lexer.c
+++ b/src/lib/eolian/eo_lexer.c
@@ -2204,7 +2204,7 @@ _eof_trans:
case 86:
 #line 627 "lib/eolian/eo_lexer.rl"
{ toknz->te = ( toknz->p)+1;{
-  Eina_List **l;
+  Eina_List **l = NULL;
   if (!toknz->tmp.meth) ABORT(toknz, "No method!!!");
   if (eina_list_count(toknz->tmp.meth->params) == 0)
 WRN("method '%s' has no parameters.", toknz->tmp.meth->name);
@@ -2259,7 +2259,7 @@ _eof_trans:
case 90:
 #line 627 "lib/eolian/eo_lexer.rl"
{ toknz->te = ( toknz->p);( toknz->p)--;{
-  Eina_List **l;
+  Eina_List **l = NULL;
   if (!toknz->tmp.meth) ABORT(toknz, "No method!!!");
   if (eina_list_count(toknz->tmp.meth->params) == 0)
 WRN("method '%s' has no parameters.", toknz->tmp.meth->name);
@@ -3666,7 +3666,7 @@ _eof_trans:
case 86:
 #line 627 "lib/eolian/eo_lexer.rl"
{ toknz->te = ( toknz->p)+1;{
-  Eina_List **l;
+  Eina_List **l = NULL;
   if (!toknz->tmp.meth) ABORT(toknz, "No method!!!");
   if (eina_list_count(toknz->tmp.meth->params) == 0)
 WRN("method '%s' has no parameters.", toknz->tmp.meth->name);
@@ -3721,7 +3721,7 @@ _eof_trans:
case 90:
 #line 627 "lib/eolian/eo_lexer.rl"
{ toknz->te = ( toknz->p);( toknz->p)--;{
-  Eina_List **l;
+  Eina_List **l = NULL;
   if (!toknz->tmp.meth) ABORT(toknz, "No method!!!");
   if (eina_list_count(toknz->tmp.meth->params) == 0)
 WRN("method '%s' has no parameters.", toknz->tmp.meth->name);
diff --git a/src/lib/eolian/eo_lexer.rl b/src/lib/eolian/eo_lexer.rl
index 47346eb..d2428a6 100644
--- a/src/lib/eolian/eo_lexer.rl
+++ b/src/lib/eolian/eo_lexer.rl
@@ -625,7 +625,7 @@ _eo_tokenizer_implement_get(Eo_Tokenizer *toknz, char *p)
}
 
action end_method {
-  Eina_List **l;
+  Eina_List **l = NULL;
   if (!toknz->tmp.meth) ABORT(toknz, "No method!!!");
   if (eina_list_count(toknz->tmp.meth->params) == 0)
 WRN("method '%s' has no parameters.", toknz->tmp.meth->name);

-- 




[EGIT] [core/elementary] master 01/01: ChangeLog: Add forgetten out of date notice

2014-03-11 Thread Stefan Schmidt
stefan pushed a commit to branch master.

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

commit 683120680384bf7f36f36720bb4aff1d8198ea0c
Author: Stefan Schmidt 
Date:   Tue Mar 11 13:44:11 2014 +0100

ChangeLog: Add forgetten out of date notice

I only added it to some of our repos but not all. Adding it now to make
it clear for people that this file is now longer updated
---
 ChangeLog | 6 ++
 1 file changed, 6 insertions(+)

diff --git a/ChangeLog b/ChangeLog
index 663a5c5..3dbb96d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1764,3 +1764,9 @@
 2013-12-01  Carsten Haitzler (The Rasterman)
 
 * 1.8 release
+
+OUT OF DATE NOTICE:
+ ---
+With the start of the 1.9.x release cycle we now longer update the ChangeLog 
and rely on git log for
+this functionality. We keep however a NEWS files for a high level overview of 
changes in a new
+release which will be filled at the end of the release cycle.

-- 




[EGIT] [core/efl] master 01/01: ChangeLog: Add forgetten out of date notice

2014-03-11 Thread Stefan Schmidt
stefan pushed a commit to branch master.

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

commit 90fe81a02ab4ca9cee444d5218d10fd8d63b096c
Author: Stefan Schmidt 
Date:   Tue Mar 11 13:41:55 2014 +0100

ChangeLog: Add forgetten out of date notice

I only added it to some of our repos but not all. Adding it now to make
it clear for people that this file is now longer updated
---
 ChangeLog | 6 ++
 1 file changed, 6 insertions(+)

diff --git a/ChangeLog b/ChangeLog
index 9ddd455..88aafb5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1478,3 +1478,9 @@
 2012-09-03  Igor Murzov
 
 * Add WebP image loader.
+
+OUT OF DATE NOTICE:
+---
+With the start of the 1.9.x release cycle we now longer update the ChangeLog 
and rely on git log for
+this functionality. We keep however a NEWS files for a high level overview of 
changes in a new
+release which will be filled at the end of the release cycle.

-- 




Re: [E-devel] [EGIT] [core/elementary] master 01/01: win: Add a API, elm_win_type_get.

2014-03-11 Thread Daniel Juyung Seo
On Thu, Feb 6, 2014 at 7:28 PM, Jaehwan Kim wrote:

> jaehwan pushed a commit to branch master.
>
>
> http://git.enlightenment.org/core/elementary.git/commit/?id=313eaab843194083d5dee11f053a156f88c6c219
>
> commit 313eaab843194083d5dee11f053a156f88c6c219
> Author: Jaehwan Kim 
> Date:   Thu Feb 6 19:28:39 2014 +0900
>
> win: Add a API, elm_win_type_get.
> ---
>  src/lib/elm_win.c| 19 +++
>  src/lib/elm_win_common.h |  1 +
>  src/lib/elm_win_eo.h | 13 +
>  src/lib/elm_win_legacy.h | 11 +++
>  4 files changed, 44 insertions(+)
>
> diff --git a/src/lib/elm_win.c b/src/lib/elm_win.c
> index 2f02652..72f64d3 100644
> --- a/src/lib/elm_win.c
> +++ b/src/lib/elm_win.c
> @@ -3236,6 +3236,23 @@ _constructor(Eo *obj, void *_pd EINA_UNUSED,
> va_list *list EINA_UNUSED)
> ERR("only custom constructor can be used with '%s' class",
> MY_CLASS_NAME);
>  }
>
> +EAPI Elm_Win_Type
> +elm_win_type_get(const Evas_Object *obj)
> +{
> +   ELM_WIN_CHECK(obj) ELM_WIN_UNKNOWN;
> +   Elm_Win_Type ret = ELM_WIN_UNKNOWN;
> +   eo_do((Eo *) obj, elm_obj_win_type_get(&ret));
> +   return ret;
> +}
> +
> +static void
> +_type_get(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
> +{
> +   Elm_Win_Type *ret = va_arg(*list, Elm_Win_Type *);
> +   Elm_Win_Smart_Data *sd = _pd;
> +   *ret = sd->type;
> +}
> +
>  EAPI Evas_Object *
>  elm_win_util_standard_add(const char *name,
>const char *title)
> @@ -5623,6 +5640,7 @@ _class_constructor(Eo_Class *klass)
>  EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_WIN_CONSTRUCTOR),
> _win_constructor),
>  EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_RESIZE_OBJECT_ADD),
> _resize_object_add),
>  EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_RESIZE_OBJECT_DEL),
> _resize_object_del),
> +EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_TYPE_GET),
> _type_get),
>  EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_TITLE_SET),
> _title_set),
>  EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_TITLE_GET),
> _title_get),
>  EO_OP_FUNC(ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_ICON_NAME_SET),
> _icon_name_set),
> @@ -5726,6 +5744,7 @@ static const Eo_Op_Description op_desc[] = {
>   EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_WIN_CONSTRUCTOR, "Adds a window
> object."),
>   EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_RESIZE_OBJECT_ADD, "Add subobj
> as a resize object of window obj."),
>   EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_RESIZE_OBJECT_DEL, "Delete
> subobj as a resize object of window obj."),
> + EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_TYPE_GET, "Get the type of the
> window."),
>   EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_TITLE_SET, "Set the title of
> the window."),
>   EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_TITLE_GET, "Get the title of
> the window."),
>   EO_OP_DESCRIPTION(ELM_OBJ_WIN_SUB_ID_ICON_NAME_SET, "Set the icon
> name of the window."),
> diff --git a/src/lib/elm_win_common.h b/src/lib/elm_win_common.h
> index 664b29b..b5eb567 100644
> --- a/src/lib/elm_win_common.h
> +++ b/src/lib/elm_win_common.h
> @@ -9,6 +9,7 @@
>   */
>

Hi


>  typedef enum
>  {
> +   ELM_WIN_UNKNOWN, /**< Unknown window type. */
> ELM_WIN_BASIC, /**< A normal window. Indicates a normal, top-level
>   window. Almost every window will be created with this
>   type. */
>

This looks like a big ABI break.
Any idea on this?

Daniel Juyung Seo (SeoZ)


> diff --git a/src/lib/elm_win_eo.h b/src/lib/elm_win_eo.h
> index e7f0dcd..8ccc901 100644
> --- a/src/lib/elm_win_eo.h
> +++ b/src/lib/elm_win_eo.h
> @@ -14,6 +14,7 @@ enum
>   ELM_OBJ_WIN_SUB_ID_WIN_CONSTRUCTOR,
>   ELM_OBJ_WIN_SUB_ID_RESIZE_OBJECT_ADD,
>   ELM_OBJ_WIN_SUB_ID_RESIZE_OBJECT_DEL,
> + ELM_OBJ_WIN_SUB_ID_TYPE_GET,
>   ELM_OBJ_WIN_SUB_ID_TITLE_SET,
>   ELM_OBJ_WIN_SUB_ID_TITLE_GET,
>   ELM_OBJ_WIN_SUB_ID_ICON_NAME_SET,
> @@ -148,6 +149,18 @@ enum
>  #define elm_obj_win_resize_object_del(subobj)
> ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_RESIZE_OBJECT_DEL),
> EO_TYPECHECK(Evas_Object *, subobj)
>
>  /**
> + * @def elm_obj_win_type_get
> + * @since 1.9
> + *
> + * Get the type of the window
> + *
> + * @param[out] ret
> + *
> + * @see elm_win_type_get
> + */
> +#define elm_obj_win_type_get(ret)
> ELM_OBJ_WIN_ID(ELM_OBJ_WIN_SUB_ID_TYPE_GET), EO_TYPECHECK(Elm_Win_Type *,
> ret)
> +
> +/**
>   * @def elm_obj_win_title_set
>   * @since 1.8
>   *
> diff --git a/src/lib/elm_win_legacy.h b/src/lib/elm_win_legacy.h
> index eab92d0..2a31c01 100644
> --- a/src/lib/elm_win_legacy.h
> +++ b/src/lib/elm_win_legacy.h
> @@ -17,6 +17,17 @@
>  EAPI Evas_Object  *elm_win_add(Evas_Object *parent, const char
> *name, Elm_Win_Type type);
>
>  /**
> + * Get the type of a window.
> + *
> + * @param obj The window object for which it gets the type.
> + *
> + * @return The type of a window object. If the object is not window
> object, return ELM_WIN_UNKNOWN.
> + *
> + * @ingroup Win
> + */
> +EAPI Elm

Re: [E-devel] [EGIT] [core/efl] master 02/03: eina-cxx: Added eina_log support for C++, using IOStreams syntax

2014-03-11 Thread Felipe Magno de Almeida
Hello Gustavo,

On Mon, Mar 10, 2014 at 9:15 PM, Gustavo Sverzut Barbieri
 wrote:
> On Mon, Mar 10, 2014 at 6:14 PM, Felipe Magno de Almeida

[snip]

>>> This works:
>>>
>>>   EINA_CXX_DOM_LOG_CRIT(domain) << "foo 0x" << std::hex << 10;
>>>
>>> [snip]
>>>
>>> Is this better?
>>
>> https://phab.enlightenment.org/D623
>
> no, I'm complaining about a different issue. See my other email. I'm
> complaining about the syntax and usage.

That patch does change the syntax, it was:

EINA_CXX_DOM_LOG_CRIT(domain, "foo 0x" << std::hex << 10);

It is now:

EINA_CXX_DOM_LOG_CRIT(domain) << "foo 0x" << std::hex << 10;

> You can also think about a different solution where instad of locking
> and an internal "this.message" you keep a per-thread local storage,
> each thread appends to its own string/stringstream.

I really don't want to take that road unless it is really necessary, and I
don't think it is necessary.

> Your idea to have a stack-allocated stream may work to avoid the issue
> as well, not sure if it will trigger a shadow warning if there is a
> "stream" variable set before

That is possible, we can change the name though to something unlikely
to clash.

> or how that behaves with memory allocations.

I don't understand what you mean here by memory allocations. Which
issues could there be? And which allocations?

> In any way there are multiple ways to achieve that, be
> your for() trick, Thread-Local-Storage or whatever. That's not my
> issue.

The for trick works OK and is the least expensive way. It also avoids
calling the expensive_call unless it is going to be logged.

> Also, I do think we do NOT need one macro per level, that's an issue
> for C, but not for C++.

OK. I hadn't thought of that. It is not unusual for C++ to use macros
here to differentiate. But it is possible to have something nicer too.

> Eventually we can even remove the CXX from the
> name as it doesn't conflict with C and use either EINA_CXX_LOG(stream)
> or EINA_LOG(stream). A small and simple way to log is essential to
> allow someone to use logs.
>
> The global log level just expose its level_as_stream as globals or
> efl::eina:log namespace, such as err, dbg, crit, inf, wrn...
>
> BTW, you don't need to cope with log domains created by C other than
> the global log level (that is a special case). If you want to use a
> log level in C++ you will be creating that in C++, there should be no
> reason to use one that was created by C and use that in C++. If one
> that that ever comes to happen, the developer can fallback to use the
> C macros.

OK. So let me know if this is really what you want:

EINA_LOG(err) << "error " << error_code;
EINA_LOG(dbg) << "error " << error_code;
EINA_LOG(crit) << "error " << error_code;

efl::eina::log_domain my_domain("mylib", "yellow");
EINA_LOG(my_domain.err) << "error " << error_code;
EINA_LOG(my_domain.dbg) << "error " << error_code;
EINA_LOG(my_domain.crit) << "error " << error_code;

Is the EINA_LOG(err) going to log on the default domain or the global domain?
If it is this that you want I think this is doable.  If not, let me
know where is my
misunderstanding.

> I'm telling you that because once you instantiate a new log domain you
> already instantiate the level_as_streams, or make it lazy-allocate
> based on usage.

We don't really need any allocation at all except for the formatting.

> --
> Gustavo Sverzut Barbieri
> --
> Mobile: +55 (19) 99225-2202
> Contact: http://www.gustavobarbieri.com.br/contact

Regards,
-- 
Felipe Magno de Almeida

--
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


[EGIT] [core/efl] efl-1.9 01/01: release: Remove uinrelevant NEWS file entry.

2014-03-11 Thread Stefan Schmidt
stefan pushed a commit to branch efl-1.9.

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

commit bd292073952471db99e8590525382b3521086c53
Author: Stefan Schmidt 
Date:   Tue Mar 11 12:54:37 2014 +0100

release: Remove uinrelevant NEWS file entry.

Hopefully the last change to this file before the release.
---
 NEWS | 1 -
 1 file changed, 1 deletion(-)

diff --git a/NEWS b/NEWS
index bab9618..5fe4603 100644
--- a/NEWS
+++ b/NEWS
@@ -12,7 +12,6 @@ Improvements:
 Fixes:
 
* evas: Replace EINA_LIST_FOREACH_SAFE to while statement.
-   * Eina Log: Fixed ABI break introduce by the addition of 'color'.
* Evas font: Don't add canvas specific path to the global fontconfig path 
list.
* edje - allow lager clipper space.
* eina_log: Update domain colouring when color_disable_set is called (T1029)

-- 




[EGIT] [core/elementary] master 01/01: config - remove old engines not supported in evas anymore.

2014-03-11 Thread Carsten Haitzler
raster pushed a commit to branch master.

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

commit 997671a363336c510cd9a48016b6e186a84c2501
Author: Carsten Haitzler (Rasterman) 
Date:   Tue Mar 11 20:55:33 2014 +0900

config - remove old engines not supported in evas anymore.
---
 src/lib/elm_config.c | 28 
 1 file changed, 28 deletions(-)

diff --git a/src/lib/elm_config.c b/src/lib/elm_config.c
index e906aac..33d21db 100644
--- a/src/lib/elm_config.c
+++ b/src/lib/elm_config.c
@@ -1820,40 +1820,16 @@ _env_get(void)
  (!strcasecmp(s, "opengl-x11")) ||
  (!strcasecmp(s, "opengl_x11")))
   eina_stringshare_replace(&_elm_config->engine, ELM_OPENGL_X11);
-else if ((!strcasecmp(s, "x11-8")) ||
- (!strcasecmp(s, "x8")) ||
- (!strcasecmp(s, "software-8-x11")) ||
- (!strcasecmp(s, "software_8_x11")))
-  eina_stringshare_replace(&_elm_config->engine, ELM_SOFTWARE_8_X11);
-else if ((!strcasecmp(s, "x11-16")) ||
- (!strcasecmp(s, "x16")) ||
- (!strcasecmp(s, "software-16-x11")) ||
- (!strcasecmp(s, "software_16_x11")))
-  eina_stringshare_replace(&_elm_config->engine, ELM_SOFTWARE_16_X11);
-/*
-else if ((!strcasecmp(s, "xrender")) ||
- (!strcasecmp(s, "xr")) ||
- (!strcasecmp(s, "xrender-x11")) ||
- (!strcasecmp(s, "xrender_x11")))
-  eina_stringshare_replace(&_elm_config->engine, ELM_XRENDER_X11);
- */
 else if ((!strcasecmp(s, "fb")) ||
  (!strcasecmp(s, "software-fb")) ||
  (!strcasecmp(s, "software_fb")))
   eina_stringshare_replace(&_elm_config->engine, ELM_SOFTWARE_FB);
-else if ((!strcasecmp(s, "directfb")) ||
- (!strcasecmp(s, "dfb")))
-  eina_stringshare_replace(&_elm_config->engine, 
ELM_SOFTWARE_DIRECTFB);
 else if ((!strcasecmp(s, "psl1ght")))
   eina_stringshare_replace(&_elm_config->engine, ELM_SOFTWARE_PSL1GHT);
 else if ((!strcasecmp(s, "sdl")) ||
  (!strcasecmp(s, "software-sdl")) ||
  (!strcasecmp(s, "software_sdl")))
   eina_stringshare_replace(&_elm_config->engine, ELM_SOFTWARE_SDL);
-else if ((!strcasecmp(s, "sdl-16")) ||
- (!strcasecmp(s, "software-16-sdl")) ||
- (!strcasecmp(s, "software_16_sdl")))
-  eina_stringshare_replace(&_elm_config->engine, ELM_SOFTWARE_16_SDL);
 else if ((!strcasecmp(s, "opengl-sdl")) ||
  (!strcasecmp(s, "opengl_sdl")) ||
  (!strcasecmp(s, "gl-sdl")) ||
@@ -1868,10 +1844,6 @@ _env_get(void)
  (!strcasecmp(s, "software-gdi")) ||
  (!strcasecmp(s, "software_gdi")))
   eina_stringshare_replace(&_elm_config->engine, ELM_SOFTWARE_WIN32);
-else if ((!strcasecmp(s, "wince-gdi")) ||
- (!strcasecmp(s, "software-16-wince-gdi")) ||
- (!strcasecmp(s, "software_16_wince_gdi")))
-  eina_stringshare_replace(&_elm_config->engine, 
ELM_SOFTWARE_16_WINCE);
 else if (!strcasecmp(s, "buffer"))
   eina_stringshare_replace(&_elm_config->engine, ELM_BUFFER);
 else if ((!strncmp(s, "shot:", 5)))

-- 




Re: [E-devel] [EGIT] [core/efl] efl-1.9 01/01: release: Update NEWS for last minute changes to 1.9.1

2014-03-11 Thread Stefan Schmidt
Hello.

On Tue, 2014-03-11 at 11:06, Tom Hacohen wrote:
> On 11/03/14 10:54, Stefan Schmidt wrote:
> > +   * Eina Log: Fixed ABI break introduce by the addition of 'color'.
> 
> This was introduced after 1.9, so it shouldn't be in the news/changelog.

Grumbl. Sadly you have a point here. Would be easier if you would not.
Fixing.

regards
Stefan Schmidt

--
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


[EGIT] [core/efl] master 01/01: evas/font: Added evas_font_path_global_* APIs.

2014-03-11 Thread Youngbok Shin
tasn pushed a commit to branch master.

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

commit cb5026137b70739c768474c6ea8633abb710c70d
Author: Youngbok Shin 
Date:   Tue Mar 11 11:15:55 2014 +

evas/font: Added evas_font_path_global_* APIs.

Summary:
These APIs will be used for adding font paths for the application.
The existing APIs for font path, such as evas_font_path_append,
are used for adding font paths to the given evas.
But, these APIs will affect to every evas in the process.

Reviewers: tasn, woohyun, Hermet, seoz

CC: cedric, herdsman

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

@feature
---
 src/lib/evas/Evas_Common.h  |  50 ++
 src/lib/evas/canvas/evas_font_dir.c | 132 +++-
 src/lib/evas/canvas/evas_main.c |   1 +
 3 files changed, 165 insertions(+), 18 deletions(-)

diff --git a/src/lib/evas/Evas_Common.h b/src/lib/evas/Evas_Common.h
index 5d931ca..801846b 100644
--- a/src/lib/evas/Evas_Common.h
+++ b/src/lib/evas/Evas_Common.h
@@ -5253,3 +5253,53 @@ EAPI Eina_Boolevas_key_lock_is_set(const 
Evas_Lock *l, const char *k
  */
 
 typedef Eo Evas_Out;
+
+/**
+ * @ingroup Evas_Font_Group
+ *
+ * @{
+ */
+
+/**
+ * @defgroup Evas_Font_Path_Group Font Path Functions
+ *
+ * Functions that edit the paths being used to load fonts.
+ *
+ * @ingroup Evas_Font_Group
+ */
+
+/**
+ * Removes all font paths loaded into memory by evas_font_path_app_* APIs
+ * for the application.
+ * @ingroup Evas_Font_Path_Group
+ * @since 1.9
+ */
+EAPI voidevas_font_path_global_clear(void);
+
+/**
+ * Appends a font path to the list of font paths used by the application.
+ * @param   path The new font path.
+ * @ingroup Evas_Font_Path_Group
+ * @since 1.9
+ */
+EAPI voidevas_font_path_global_append(const char *path) 
EINA_ARG_NONNULL(1);
+
+/**
+ * Prepends a font path to the list of font paths used by the application.
+ * @param   path The new font path.
+ * @ingroup Evas_Font_Path_Group
+ * @since 1.9
+ */
+EAPI voidevas_font_path_global_prepend(const char *path) 
EINA_ARG_NONNULL(1);
+
+/**
+ * Retrieves the list of font paths used by the application.
+ * @return  The list of font paths used.
+ * @ingroup Evas_Font_Path_Group
+ * @since 1.9
+ */
+EAPI const Eina_List*evas_font_path_global_list(void) 
EINA_WARN_UNUSED_RESULT;
+
+/**
+ * @}
+ */
diff --git a/src/lib/evas/canvas/evas_font_dir.c 
b/src/lib/evas/canvas/evas_font_dir.c
index f8a8a10..33d3eed 100644
--- a/src/lib/evas/canvas/evas_font_dir.c
+++ b/src/lib/evas/canvas/evas_font_dir.c
@@ -20,6 +20,7 @@
 static Eina_Hash *font_dirs = NULL;
 static Eina_List *fonts_cache = NULL;
 static Eina_List *fonts_zero = NULL;
+static Eina_List *global_font_path = NULL;
 
 typedef struct _Fndat Fndat;
 
@@ -662,8 +663,23 @@ evas_font_load(Evas *eo_evas, Evas_Font_Description 
*fdesc, const char *source,
 font = 
evas->engine.func->font_load(evas->engine.data.output, f_file, size, 
wanted_rend);
 if (font) break;
  }
-}
-   }
+ }
+
+   if (!font)
+ {
+EINA_LIST_FOREACH(global_font_path, ll, dir)
+  {
+ const char *f_file;
+
+ f_file = evas_font_dir_cache_find(dir, (char 
*)nm);
+ if (f_file)
+   {
+  font = 
evas->engine.func->font_load(evas->engine.data.output, f_file, size, 
wanted_rend);
+  if (font) break;
+   }
+  }
+ }
+}
   }
  }
else /* Base font loaded, append others */
@@ -710,6 +726,7 @@ evas_font_load(Evas *eo_evas, Evas_Font_Description *fdesc, 
const char *source,
{
   Eina_List *ll;
   char *dir;
+  RGBA_Font *fn = NULL;
 
   EINA_LIST_FOREACH(evas->font_path, ll, dir)
 {
@@ -718,11 +735,28 @@ evas_font_load(Evas *eo_evas, Evas_Font_Description 
*fdesc, const char *source,
f_file = evas_font_dir_cache_find(dir, (char *)nm);
if (f_file)
  {
-if 
(evas->engine.func->font_add(evas->engine.data.output, font, f_file, size, 
wanted_rend))
+fn = (RGBA_Font 
*)evas->engine.func->font_add(evas->engine.data.output, font, f_file, size, 
wanted_rend);
+  

Re: [E-devel] [EGIT] [core/efl] efl-1.9 01/01: release: Update NEWS for last minute changes to 1.9.1

2014-03-11 Thread Tom Hacohen
On 11/03/14 10:54, Stefan Schmidt wrote:
> +   * Eina Log: Fixed ABI break introduce by the addition of 'color'.

This was introduced after 1.9, so it shouldn't be in the news/changelog.

--
Tom.


--
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


[EGIT] [core/efl] efl-1.9 01/01: release: Update NEWS for last minute changes to 1.9.1

2014-03-11 Thread Stefan Schmidt
stefan pushed a commit to branch efl-1.9.

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

commit f3aacba22ffef9fa3e57f762eaa696de744c8c1d
Author: Stefan Schmidt 
Date:   Mon Mar 10 17:26:29 2014 +0100

release: Update NEWS for last minute changes to 1.9.1

Last minute fixes to avoid crashes and ABI breaks with 1.9.1.
---
 NEWS | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/NEWS b/NEWS
index 9b1d4b4..bab9618 100644
--- a/NEWS
+++ b/NEWS
@@ -11,6 +11,9 @@ Improvements:
 
 Fixes:
 
+   * evas: Replace EINA_LIST_FOREACH_SAFE to while statement.
+   * Eina Log: Fixed ABI break introduce by the addition of 'color'.
+   * Evas font: Don't add canvas specific path to the global fontconfig path 
list.
* edje - allow lager clipper space.
* eina_log: Update domain colouring when color_disable_set is called (T1029)
* edje/entry: fix to not emit "changed" signal in unnecessary cases of 
password mode.

-- 




[EGIT] [core/elementary] master 01/01: Eolian: Fixed build.

2014-03-11 Thread Tom Hacohen
tasn pushed a commit to branch master.

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

commit 94ec6f7ded7379df952454611d3be5d812bc6575
Author: Tom Hacohen 
Date:   Tue Mar 11 10:39:51 2014 +

Eolian: Fixed build.

Needed to initialize CLEANFILES.
---
 src/lib/Makefile.am | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/lib/Makefile.am b/src/lib/Makefile.am
index 9bea7ba..443f68c 100644
--- a/src/lib/Makefile.am
+++ b/src/lib/Makefile.am
@@ -1,6 +1,8 @@
 AUTOMAKE_OPTIONS = 1.4 foreign
 MAINTAINERCLEANFILES = Makefile.in
 
+CLEANFILES=
+
 include ../../Makefile_Eolian_Helper.am
 
 AM_CPPFLAGS = \

-- 




Re: [E-devel] [EGIT] [core/efl] efl-1.9 01/01: release: Update NEWS and bump version for 1.9.1 release

2014-03-11 Thread Stefan Schmidt
Hello.

On Tue, 2014-03-11 at 09:34, Carsten Haitzler wrote:
> On Mon, 10 Mar 2014 18:12:21 +0100 Davide Andreoli 
> said:
> 
> > Also this change broke something
> > * evas: replace EINA_LIST_FREE to EINA_LIST_FOREACH_SAFE.
> > 
> > and still waiting a replay from the author in ML...
> > 
> > Just try elementary_test -to Photo, it segfault on start with that change
> 
> yeah. this is a problem... i am unsure why though. i haven't looked yet.
> valgrind says:

WooHyun fixed it in master and backported it as well. Cha ged the
macro to a while loop to avoid this.

Davide, Raster are you both happy with this? Right now I consider it
fixed for an upcoming 1.9.1

regards
Stefan Schmidt

--
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


Re: [E-devel] eo things to do

2014-03-11 Thread The Rasterman
On Tue, 11 Mar 2014 09:31:47 + Tom Hacohen  said:

> On 11/03/14 07:20, Carsten Haitzler (The Rasterman) wrote:
> > so now we're getting more into eo... it's time to look at 3 things that
> > turn up on my profiles of things that are NOT expedite.
> >
> >   8.21%  elementary_test  libeo.so.1.9.99  [.] eo_do_internal
> >   7.77%  elementary_test  libeo.so.1.9.99  [.] _ev_cb_call
> >   3.03%  elementary_test  libeo.so.1.9.99  [.] eo_data_scope_get
> >
> > this is a pretty simply test. open elm test. scroll to bottom, scroll back
> > to top. close.  almost 20% of our cpu is spent in the above 3 calls. it's
> > time to cut this down... a LOT.
> >
> > so i am looking at _ev_cb_call() and callbacks in general. this is a single
> > linked list of cb's for ALL cb's for an object. we filter out cb's not
> > matching the callback type (desc) as we walk the list. this of course
> > causes us to do a lot of cache misses and hunt through a lot of memory to
> > then... do nothing.
> >
> > imho this needs to be restructured to...
> >
> > 1. have fewer linked list nodes. that means instead of:
> >
> >node (cb) -> node (cb2) -> node (cb3) ...
> >
> > what might be better is:
> >
> >node (cb1,cb2,cb3,cb4,cb5,cb6,cb7,cb8) -> node (cb9,cb10,cb11,cb12) ...
> >
> > ie bigger buckets with more cb's per buckets, fewer links. possibly have a
> > cb "optimizer" that figures out if the cb list has been changed since it
> > last optimized and then might group all cb's into a flat array (if cb's are
> > removed, array is split at that point and fragments until the next optimize
> > call). this should save a little memory too.
> >
> > 2. but much more important here is to divide cb's into type specific
> > lists/arrays so we don't walk tonnes of cb's we then filter out, and to
> > have a fast "select" to select the appropriate list to walk for that event
> > (as we call 1 event at a time only - but all cb's for that event).
> >
> > 3. global freeze_count AND object freeze count is checked in the inner loop
> > per walk, and not outside the loop before even beginning a walk! these
> > should at least be checked first to abort any callback list walk that we
> > KNOW will all fail. we know the desc is unfreezable direct from the input
> > desc and don't need to use the cb->items.item.desc.
> >
> > ... comments?
> >
> > now eo_data_scope_get()... i can't find much to imptove here... the mixin
> > path isn't hit often and data_sizes are notmally > 0... so some way to
> > oprimize:
> >
> > if (EINA_LIKELY((klass->desc->data_size > 0) && (klass->desc->type !=
> > EO_CLASS_TYPE_MIXIN))) return ((char *) obj) + _eo_sz + klass->data_offset;
> >
> > is most likely what's needed... but there isn't much there. :)
> >
> > now eo_do_internal()... i think we need to wait for eo2... TOM!
> >
> 
> 
> We'll be switching to Eo2 soon which changes (and improves?) things in 
> many ways. There's no point hacking deeply into the eo1 code just before 
> we are switching.
> 
> I'll reply to this email, but let's revisit this after Eo2 is in. Eo2 
> can only go in after the Eolian switch has been completed.
> 
> 1. We support callback arrays (let's users register for a list of 
> callbacks instead of just one), which improves this, but yeah, we should 
> probably have an automatic optimizer. This should be the same/as bad as 
> normal evas callbacks.
> 
> 2. Sure. :)
> 
> 3. I think I copied that from Evas (didn't want to change the 
> behaviour). I guess it's meant to let people freeze events from inside a 
> callback, which makes sense. Yeah, we could add a quicker abort too.
> 
> Eo2: As I said, waiting for Eolian. Might be able to go in soon.

actually this is the base class.. this shouldnt change for eo2.. right? event
cb's are still the same.

i was just bringing it up to see if there is any love being shown to this atm,
and if so - what kind of love (or thoughts about love) :). butthis does
definitely figure in profiles... prominently enough for me to read it. :) the
freeze thing is trivial. an extra check and abort before doing anything (even
the ref/unref) would be an obvious fast path. yes - still needs doing per call
too in case one cb freezes. you CANT thaw back to working... if u are already
thawed as u cant call anything to make the thaw happen... :)

the q really is.. how to optimize this. cedric pointed out that the cb arrays
have DIFFERENT cb types per array member - that is annoying as that nukes the
idea of optimizing the entire data structure in-place as we need to keep the
original array... so what would work is where we build an optimized func+data
array per desc "seen" by the callback caller - the first time it sees an event
desc and it has no optimized array, it builds one (either with N entries, or
empty) and any time you add or del callbacks, you nuke the optimized arrays and
rebuild next call. this though will require we need to track how often these
arrays are used and if not used often they ne

Re: [E-devel] [EGIT] [core/efl] efl-1.9 01/01: release: Update NEWS and bump version for 1.9.1 release

2014-03-11 Thread Stefan Schmidt
Hello.

On Mon, 2014-03-10 at 16:52, Tom Hacohen wrote:
> On 10/03/14 16:32, Stefan Schmidt wrote:
> > Hello.
> >
> > On Mon, 2014-03-10 at 13:20, Gustavo Sverzut Barbieri wrote:
> >> sorry, but you did release it with the Eina_Log_Domain struct abi
> >> break that I requested the guy to fix, it wasn't fixed and got
> >> released :-(
> >
> > I have good news for you. It was not released. Was still in the
> > preparation when Tom pointed this mail out to me. Not even testing
> > tarballs for efl are up.
> >
> >> move new member color as the last one in the struct, not in the
> >> middle. And this needs fixing in the main branch.
> >
> > I will postpone 1.9.1 until this is fixed in master and backported to
> > the 1.9 branch.
> >
> > I have seen your complain before put somehow had it in my had that it
> > was already taken care of. :)
> >
> > Anyway, not released yet so all is good. Waiting for Andy to fix it up
> > now. :)
> >
> > regards
> > Stefan Schmidt
> >
> > --
> > Learn Graph Databases - Download FREE O'Reilly Book
> > "Graph Databases" is the definitive new guide to graph databases and their
> > applications. Written by three acclaimed leaders in the field,
> > this first edition is now available. Download your free book today!
> > http://p.sf.net/sfu/13534_NeoTech
> > ___
> > enlightenment-devel mailing list
> > enlightenment-devel@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
> >
> 
> 
> Fixed and backported.
> 
> Gustavo: next time you see something like this which is not addressed 
> (reply or fix) after a timely manner, just revert.

I consider this issue handled for an upcomign 1.9.1 now. Thanks Tom
for fixing it up.

regards
Stefan Schmidt

--
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


Re: [E-devel] eo things to do

2014-03-11 Thread David Seikel
On Tue, 11 Mar 2014 09:46:26 + Tom Hacohen
 wrote:

> On 11/03/14 09:22, David Seikel wrote:
> > On Tue, 11 Mar 2014 16:20:37 +0900 Carsten Haitzler (The Rasterman)
> >  wrote:
> >
> >> so now we're getting more into eo... it's time to look at 3 things
> >> that turn up on my profiles of things that are NOT expedite.
> >>
> >>   8.21%  elementary_test  libeo.so.1.9.99  [.]
> >> eo_do_internal 7.77%  elementary_test  libeo.so.1.9.99  [.]
> >> _ev_cb_call 3.03%  elementary_test  libeo.so.1.9.99  [.]
> >> eo_data_scope_get
> >>
> >> this is a pretty simply test. open elm test. scroll to bottom,
> >> scroll back to top. close.  almost 20% of our cpu is spent in the
> >> above 3 calls. it's time to cut this down... a LOT.
> >>
> >> so i am looking at _ev_cb_call() and callbacks in general. this is
> >> a single linked list of cb's for ALL cb's for an object. we filter
> >> out cb's not matching the callback type (desc) as we walk the
> >> list. this of course causes us to do a lot of cache misses and
> >> hunt through a lot of memory to then... do nothing.
> >>
> >> imho this needs to be restructured to...
> >>
> >> 1. have fewer linked list nodes. that means instead of:
> >>
> >>node (cb) -> node (cb2) -> node (cb3) ...
> >>
> >> what might be better is:
> >>
> >>node (cb1,cb2,cb3,cb4,cb5,cb6,cb7,cb8) -> node
> >> (cb9,cb10,cb11,cb12) ...
> >>
> >> ie bigger buckets with more cb's per buckets, fewer links. possibly
> >> have a cb "optimizer" that figures out if the cb list has been
> >> changed since it last optimized and then might group all cb's into
> >> a flat array (if cb's are removed, array is split at that point and
> >> fragments until the next optimize call). this should save a little
> >> memory too.
> >>
> >> 2. but much more important here is to divide cb's into type
> >> specific lists/arrays so we don't walk tonnes of cb's we then
> >> filter out, and to have a fast "select" to select the appropriate
> >> list to walk for that event (as we call 1 event at a time only -
> >> but all cb's for that event).
> >
> > That sounds like a great idea.
> >
> >> 3. global freeze_count AND object freeze count is checked in the
> >> inner loop per walk, and not outside the loop before even
> >> beginning a walk! these should at least be checked first to abort
> >> any callback list walk that we KNOW will all fail. we know the
> >> desc is unfreezable direct from the input desc and don't need to
> >> use the cb->items.item.desc.
> >>
> >> ... comments?
> >>
> >> now eo_data_scope_get()... i can't find much to imptove here... the
> >> mixin path isn't hit often and data_sizes are notmally > 0... so
> >> some way to oprimize:
> >>
> >> if (EINA_LIKELY((klass->desc->data_size > 0) &&
> >> (klass->desc->type != EO_CLASS_TYPE_MIXIN))) return ((char *) obj)
> >> + _eo_sz + klass->data_offset;
> >>
> >> is most likely what's needed... but there isn't much there. :)
> >>
> >> now eo_do_internal()... i think we need to wait for eo2... TOM!
> >
> > I finally have some time this week (unless a client wants me to be
> > busy) to look at this eo stuff, and now you tell me that eo2 is
> > coming?  lol
> >
> > I'll be going over all the old emails I have marked, try to learn
> > how eo works, and consider if it can be used for the Edje Lua
> > stuff.  I think it's either eo for Lua bindings, or LuaJIT FFI.
> > Manually writing the Edje Lua bindings is obviously not so good, I
> > kinda balked at all those text APIs.
> 
> Eo2 is known to be coming for about half a year now...

Like I said, I had marked a bunch of eo related emails to be read, so
it's likely I missed seeing eo2 mentioned.  After reading your other
reply on this thread, perhaps I should wait another half a year for
eo2?  B-)

-- 
A big old stinking pile of genius that no one wants
coz there are too many silver coated monkeys in the world.


signature.asc
Description: PGP signature
--
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


[EGIT] [core/efl] master 01/01: Eolian: Ship pc file.

2014-03-11 Thread Tom Hacohen
tasn pushed a commit to branch master.

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

commit 2dba63119b7660271484fe7b0dfaa36ad85b616d
Author: Tom Hacohen 
Date:   Tue Mar 11 10:03:30 2014 +

Eolian: Ship pc file.
---
 Makefile.am | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Makefile.am b/Makefile.am
index a2b70b5..cfdb304 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -122,6 +122,7 @@ pkgconfig_DATA += \
 pc/eina.pc \
 pc/eina-cxx.pc \
 pc/eo.pc \
+pc/eolian.pc \
 pc/eet.pc \
 pc/evas.pc \
 pc/ecore.pc \

-- 




[EGIT] [core/elementary] master 01/01: Eolian: Fix binary-name and show found binary in summary.

2014-03-11 Thread Tom Hacohen
tasn pushed a commit to branch master.

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

commit 01172f19d914710cc2daed161a077fff34a0e97f
Author: Tom Hacohen 
Date:   Tue Mar 11 10:04:15 2014 +

Eolian: Fix binary-name and show found binary in summary.

This fixes Eolian integration. We were looking for the wrong binary.
---
 configure.ac | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/configure.ac b/configure.ac
index 4a95272..b4b146a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -649,7 +649,7 @@ AC_SUBST(requirement_elm)
 
 EFL_WITH_BIN([eet], [eet-eet], [eet])
 EFL_WITH_BIN([edje], [edje-cc], [edje_cc])
-EFL_WITH_BIN([eolian], [eolian-codegen], [eolian_codegen])
+EFL_WITH_BIN([eolian], [eolian-gen], [eolian_gen])
 EFL_WITH_BIN([elementary], [elementary-codegen], [elementary_codegen])
 EFL_WITH_BIN([elementary], [elm-prefs-cc], [elm_prefs_cc])
 
@@ -775,6 +775,7 @@ echo "Elocation..: 
${have_elementary_elocation}"
 echo
 echo "  eet..: ${eet_eet}"
 echo "  edje_cc..: ${edje_cc}"
+echo "  eolian_gen...: ${eolian_gen}"
 echo
 echo "  Build elementary_test: ${have_elementary_test}"
 echo "  Build elementary_codegen.: ${have_elementary_codegen}"

-- 




Re: [E-devel] [EGIT] [core/efl] master 01/01: eolian: generate eo_lexer.c with ragel if available

2014-03-11 Thread Tom Hacohen
On 11/03/14 10:05, Jérémy Zurcher wrote:
> Ho,
>
> On Monday 10 March 2014  17:05, Tom Hacohen wrote :
>> Hey,
>>
>> The reason why I haven't added it until now, is that we do
>> auto-detection any more (i.e you have to enable/disable), and I didn't
>> want to pollute the configure script with this option. Not sure which is
>> worse.
> I know about the no more auto-detect rule,
> but thought it is feature a centric rule,
> that for me is an optional dev tool (luckilly we don't need to (en|dis)able 
> ar disable gcc ;)
> for me the worse is clearly to have to manually generate the parser

This is not a good comparison. If you don't have gcc, it won't compile. 
If you don't have ragel, it'll quietly continue. This means that people 
could get stuck in a "I'm changing the ragel file, while doesn't my code 
work" debug hell, until they figure this out.

This is bad.

--
Tom.




--
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


[EGIT] [core/elementary] master 01/01: Added Eolian support.

2014-03-11 Thread Tom Hacohen
tasn pushed a commit to branch master.

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

commit f204eecf6bdb656a6d2da46b85e81ec64c76e396
Author: Tom Hacohen 
Date:   Tue Mar 11 09:50:59 2014 +

Added Eolian support.

This adds needed support for compilation of .eo files.
---
 Makefile_Eolian_Helper.am | 24 
 configure.ac  |  1 +
 src/lib/Makefile.am   |  2 ++
 3 files changed, 27 insertions(+)

diff --git a/Makefile_Eolian_Helper.am b/Makefile_Eolian_Helper.am
new file mode 100644
index 000..6106379
--- /dev/null
+++ b/Makefile_Eolian_Helper.am
@@ -0,0 +1,24 @@
+if HAVE_EOLIAN_GEN
+EOLIAN_GEN = @eolian_gen@
+_EOLIAN_GEN_DEP =
+else
+EOLIAN_GEN = EFL_RUN_IN_TREE=1 
$(top_builddir)/src/bin/eolian/eolian_gen${EXEEXT}
+_EOLIAN_GEN_DEP = bin/eolian/eolian_gen${EXEEXT}
+endif
+
+AM_V_EOL = $(am__v_EOL_@AM_V@)
+am__v_EOL_ = $(am__v_EOL_@AM_DEFAULT_V@)
+am__v_EOL_0 = @echo "  EOLIAN   " $@;
+
+SUFFIXES = .eo .eo.c .eo.h .eo.legacy.h
+
+%.eo.c: %.eo ${_EOLIAN_GEN_DEP}
+   $(AM_V_EOL)$(EOLIAN_GEN) --eo1 --legacy $(EOLIAN_FLAGS) --gc -o $@ $<
+
+%.eo.h: %.eo ${_EOLIAN_GEN_DEP}
+   $(AM_V_EOL)$(EOLIAN_GEN) --eo1 $(EOLIAN_FLAGS) --gh -o $@ $<
+
+%.eo.legacy.h: %.eo ${_EOLIAN_GEN_DEP}
+   $(AM_V_EOL)$(EOLIAN_GEN) --legacy $(EOLIAN_FLAGS) --gh -o $@ $<
+
+CLEANFILES += $(BUILT_SOURCES)
diff --git a/configure.ac b/configure.ac
index 99d8e3b..4a95272 100644
--- a/configure.ac
+++ b/configure.ac
@@ -649,6 +649,7 @@ AC_SUBST(requirement_elm)
 
 EFL_WITH_BIN([eet], [eet-eet], [eet])
 EFL_WITH_BIN([edje], [edje-cc], [edje_cc])
+EFL_WITH_BIN([eolian], [eolian-codegen], [eolian_codegen])
 EFL_WITH_BIN([elementary], [elementary-codegen], [elementary_codegen])
 EFL_WITH_BIN([elementary], [elm-prefs-cc], [elm_prefs_cc])
 
diff --git a/src/lib/Makefile.am b/src/lib/Makefile.am
index 1d046c4..9bea7ba 100644
--- a/src/lib/Makefile.am
+++ b/src/lib/Makefile.am
@@ -1,6 +1,8 @@
 AUTOMAKE_OPTIONS = 1.4 foreign
 MAINTAINERCLEANFILES = Makefile.in
 
+include ../../Makefile_Eolian_Helper.am
+
 AM_CPPFLAGS = \
 -DELM_INTERNAL_API_ARGESFSDFEFC=1 \
 -DMODULES_PATH=\"$(libdir)/elementary/modules\" \

-- 




[EGIT] [core/efl] efl-1.9 01/01: evas: Replace EINA_LIST_FOREACH_SAFE to while statement.

2014-03-11 Thread WooHyun Jung
woohyun pushed a commit to branch efl-1.9.

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

commit 7a0fb4977343c655eb30907587302767d1dd44d0
Author: WooHyun Jung 
Date:   Tue Mar 11 16:34:56 2014 +0900

evas: Replace EINA_LIST_FOREACH_SAFE to while statement.

Clipees can be cleared before the loop is finished because
evas_object_clip_unset calls smart function of clip_unset.
So, if we use EINA_LIST_FOREACH_SAFE, invalid next list pointer
can be kept and read after obj->clip.clipees is freed.

Thanks to Davide Andreoli for reporting.

@fix
---
 src/lib/evas/canvas/evas_object_main.c | 11 ---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/src/lib/evas/canvas/evas_object_main.c 
b/src/lib/evas/canvas/evas_object_main.c
index 637551a..9591a19 100644
--- a/src/lib/evas/canvas/evas_object_main.c
+++ b/src/lib/evas/canvas/evas_object_main.c
@@ -621,7 +621,6 @@ _destructor(Eo *eo_obj, void *_pd, va_list *list 
EINA_UNUSED)
return;
MAGIC_CHECK_END();
Evas_Object_Protected_Data *obj = _pd;
-   Evas_Object_Protected_Data *tmp;
Evas_Object *proxy;
Eina_List *l, *l2;
 
@@ -654,8 +653,14 @@ _destructor(Eo *eo_obj, void *_pd, va_list *list 
EINA_UNUSED)
 goto end;
  }
evas_object_grabs_cleanup(eo_obj, obj);
-   EINA_LIST_FOREACH_SAFE(obj->clip.clipees, l, l2, tmp)
- evas_object_clip_unset(tmp->object);
+   /* "while" should be used for null check of obj->clip.clipees,
+  because evas_objct_clip_unset can set null to obj->clip.clipees */
+   while (obj->clip.clipees)
+ {
+Evas_Object_Protected_Data *tmp;
+tmp = eina_list_data_get(obj->clip.clipees);
+evas_object_clip_unset(tmp->object);
+ }
EINA_LIST_FOREACH_SAFE(obj->proxy->proxies, l, l2, proxy)
  evas_object_image_source_unset(proxy);
if (obj->cur->clipper) evas_object_clip_unset(eo_obj);

-- 




Re: [E-devel] [EGIT] [core/efl] master 01/01: eolian: generate eo_lexer.c with ragel if available

2014-03-11 Thread Jérémy Zurcher
Ho,

On Monday 10 March 2014  17:05, Tom Hacohen wrote :
> Hey,
> 
> The reason why I haven't added it until now, is that we do 
> auto-detection any more (i.e you have to enable/disable), and I didn't 
> want to pollute the configure script with this option. Not sure which is 
> worse.
I know about the no more auto-detect rule,
but thought it is feature a centric rule,
that for me is an optional dev tool (luckilly we don't need to (en|dis)able ar 
disable gcc ;)
for me the worse is clearly to have to manually generate the parser
> 
> Anyhow, is
> "lib/eolian/eo_lexer.c: lib/eolian/eo_lexer.rl"
> 
> Really needed? The whole point of adding the .rl.c rule, is that it's 
> done automatically, no?
you're damn right !
> 
> --
> Tom.
> 
> On 10/03/14 17:00, Jérémy Zurcher wrote:
> > jeyzu pushed a commit to branch master.
> >
> > http://git.enlightenment.org/core/efl.git/commit/?id=995eac166a22b61054be0ccc8901db04f49a1ec7
> >
> > commit 995eac166a22b61054be0ccc8901db04f49a1ec7
> > Author: Jérémy Zurcher 
> > Date:   Mon Mar 10 18:14:16 2014 +0100
> >
> >  eolian: generate eo_lexer.c with ragel if available
> > ---
> >   configure.ac   |  5 +
> >   src/Makefile_Eolian.am | 13 +
> >   2 files changed, 18 insertions(+)
> >
> > diff --git a/configure.ac b/configure.ac
> > index 0d7e464..0b0dac3 100644
> > --- a/configure.ac
> > +++ b/configure.ac
> > @@ -330,6 +330,11 @@ fi
> >
> >   AM_CONDITIONAL([EFL_ENABLE_COVERAGE], [test "${want_coverage}" = "yes"])
> >
> > +# ragel
> > +
> > +AC_CHECK_PROG([have_ragel], [ragel], [yes], [no])
> > +AM_CONDITIONAL([EFL_HAVE_RAGEL], [test "${have_ragel}" = "yes"])
> > +
> >    Checks for libraries
> >
> >   # check unit testing library
> > diff --git a/src/Makefile_Eolian.am b/src/Makefile_Eolian.am
> > index 871..6807557 100644
> > --- a/src/Makefile_Eolian.am
> > +++ b/src/Makefile_Eolian.am
> > @@ -42,3 +42,16 @@ bin_eolian_eolian_gen_DEPENDENCIES = 
> > @USE_EOLIAN_INTERNAL_LIBS@
> >   include Makefile_Eolian_Helper.am
> >
> >   EXTRA_DIST += lib/eolian/eo_lexer.rl
> > +
> > +if EFL_HAVE_RAGEL
> > +SUFFIXES += .rl
> > +
> > +AM_V_RAGEL = $(am__v_RAGEL_@AM_V@)
> > +am__v_RAGEL_ = $(am__v_RAGEL_@AM_DEFAULT_V@)
> > +am__v_RAGEL_0 = @echo "  RAGEL   " $@;
> > +
> > +.rl.c:
> > +   $(AM_V_RAGEL) ragel -o $@ $<
> > +
> > +lib/eolian/eo_lexer.c: lib/eolian/eo_lexer.rl
> > +endif
> >
> 
> 
> 
> 
> --
> Learn Graph Databases - Download FREE O'Reilly Book
> "Graph Databases" is the definitive new guide to graph databases and their
> applications. Written by three acclaimed leaders in the field,
> this first edition is now available. Download your free book today!
> http://p.sf.net/sfu/13534_NeoTech
> ___
> enlightenment-devel mailing list
> enlightenment-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
--- Hell'O from Yverdoom

Jérémy (jeyzu)

--
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


Re: [E-devel] eo things to do

2014-03-11 Thread Tom Hacohen
On 11/03/14 09:22, David Seikel wrote:
> On Tue, 11 Mar 2014 16:20:37 +0900 Carsten Haitzler (The Rasterman)
>  wrote:
>
>> so now we're getting more into eo... it's time to look at 3 things
>> that turn up on my profiles of things that are NOT expedite.
>>
>>   8.21%  elementary_test  libeo.so.1.9.99  [.] eo_do_internal
>>   7.77%  elementary_test  libeo.so.1.9.99  [.] _ev_cb_call
>>   3.03%  elementary_test  libeo.so.1.9.99  [.]
>> eo_data_scope_get
>>
>> this is a pretty simply test. open elm test. scroll to bottom, scroll
>> back to top. close.  almost 20% of our cpu is spent in the above 3
>> calls. it's time to cut this down... a LOT.
>>
>> so i am looking at _ev_cb_call() and callbacks in general. this is a
>> single linked list of cb's for ALL cb's for an object. we filter out
>> cb's not matching the callback type (desc) as we walk the list. this
>> of course causes us to do a lot of cache misses and hunt through a
>> lot of memory to then... do nothing.
>>
>> imho this needs to be restructured to...
>>
>> 1. have fewer linked list nodes. that means instead of:
>>
>>node (cb) -> node (cb2) -> node (cb3) ...
>>
>> what might be better is:
>>
>>node (cb1,cb2,cb3,cb4,cb5,cb6,cb7,cb8) -> node
>> (cb9,cb10,cb11,cb12) ...
>>
>> ie bigger buckets with more cb's per buckets, fewer links. possibly
>> have a cb "optimizer" that figures out if the cb list has been
>> changed since it last optimized and then might group all cb's into a
>> flat array (if cb's are removed, array is split at that point and
>> fragments until the next optimize call). this should save a little
>> memory too.
>>
>> 2. but much more important here is to divide cb's into type specific
>> lists/arrays so we don't walk tonnes of cb's we then filter out, and
>> to have a fast "select" to select the appropriate list to walk for
>> that event (as we call 1 event at a time only - but all cb's for that
>> event).
>
> That sounds like a great idea.
>
>> 3. global freeze_count AND object freeze count is checked in the
>> inner loop per walk, and not outside the loop before even beginning a
>> walk! these should at least be checked first to abort any callback
>> list walk that we KNOW will all fail. we know the desc is unfreezable
>> direct from the input desc and don't need to use the
>> cb->items.item.desc.
>>
>> ... comments?
>>
>> now eo_data_scope_get()... i can't find much to imptove here... the
>> mixin path isn't hit often and data_sizes are notmally > 0... so some
>> way to oprimize:
>>
>> if (EINA_LIKELY((klass->desc->data_size > 0) &&
>> (klass->desc->type != EO_CLASS_TYPE_MIXIN))) return ((char *) obj) +
>> _eo_sz + klass->data_offset;
>>
>> is most likely what's needed... but there isn't much there. :)
>>
>> now eo_do_internal()... i think we need to wait for eo2... TOM!
>
> I finally have some time this week (unless a client wants me to be
> busy) to look at this eo stuff, and now you tell me that eo2 is
> coming?  lol
>
> I'll be going over all the old emails I have marked, try to learn how
> eo works, and consider if it can be used for the Edje Lua stuff.  I
> think it's either eo for Lua bindings, or LuaJIT FFI.  Manually writing
> the Edje Lua bindings is obviously not so good, I kinda balked at all
> those text APIs.

Eo2 is known to be coming for about half a year now...

--
Tom.



--
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


Re: [E-devel] [EGIT] [core/efl] master 02/04: Eolian: Support of unsigned short as int in va_arg

2014-03-11 Thread Daniel Zaoui
We compare strings. We could use strstr but I don't think it is better 
than strcmp.

On 03/11/2014 11:32 AM, Tom Hacohen wrote:
> On 11/03/14 05:48, Yossi Kantor wrote:
>> jackdanielz pushed a commit to branch master.
>>
>> http://git.enlightenment.org/core/efl.git/commit/?id=b070981f8f16fa493489a7a2bd9d2caaaf25bbb1
>>
>> commit b070981f8f16fa493489a7a2bd9d2caaaf25bbb1
>> Author: Yossi Kantor 
>> Date:   Mon Mar 10 13:35:11 2014 +0200
>>
>>   Eolian: Support of unsigned short as int in va_arg
>> ---
>>src/bin/eolian/eo1_generator.c | 4 +++-
>>1 file changed, 3 insertions(+), 1 deletion(-)
>>
>> diff --git a/src/bin/eolian/eo1_generator.c b/src/bin/eolian/eo1_generator.c
>> index 3853a72..2f3b8e0 100644
>> --- a/src/bin/eolian/eo1_generator.c
>> +++ b/src/bin/eolian/eo1_generator.c
>> @@ -331,8 +331,10 @@ _varg_upgr(const char *stype)
>>{
>>   if (!strcmp(stype, "Eina_Bool") ||
>> !strcmp(stype, "char") ||
>> - !strcmp(stype, "short"))
>> + !strcmp(stype, "short") ||
>> + !strcmp(stype, "unsigned short"))
>> return "int";
>> +
>>   return stype;
>>}
>>
>>
> Hey,
>
> "unsigned" is not a size modifier. If it's "short" it should be an int.
> If it's "char" it should be an int as well, unsigned has nothing to do
> with your decision making.
>
> --
> Tom.
>
>
> --
> Learn Graph Databases - Download FREE O'Reilly Book
> "Graph Databases" is the definitive new guide to graph databases and their
> applications. Written by three acclaimed leaders in the field,
> this first edition is now available. Download your free book today!
> http://p.sf.net/sfu/13534_NeoTech
> ___
> enlightenment-devel mailing list
> enlightenment-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
>


--
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


Re: [E-devel] eo things to do

2014-03-11 Thread Tom Hacohen
On 11/03/14 07:20, Carsten Haitzler (The Rasterman) wrote:
> so now we're getting more into eo... it's time to look at 3 things that turn 
> up
> on my profiles of things that are NOT expedite.
>
>   8.21%  elementary_test  libeo.so.1.9.99  [.] eo_do_internal
>   7.77%  elementary_test  libeo.so.1.9.99  [.] _ev_cb_call
>   3.03%  elementary_test  libeo.so.1.9.99  [.] eo_data_scope_get
>
> this is a pretty simply test. open elm test. scroll to bottom, scroll back to
> top. close.  almost 20% of our cpu is spent in the above 3 calls. it's time to
> cut this down... a LOT.
>
> so i am looking at _ev_cb_call() and callbacks in general. this is a single
> linked list of cb's for ALL cb's for an object. we filter out cb's not 
> matching
> the callback type (desc) as we walk the list. this of course causes us to do a
> lot of cache misses and hunt through a lot of memory to then... do nothing.
>
> imho this needs to be restructured to...
>
> 1. have fewer linked list nodes. that means instead of:
>
>node (cb) -> node (cb2) -> node (cb3) ...
>
> what might be better is:
>
>node (cb1,cb2,cb3,cb4,cb5,cb6,cb7,cb8) -> node (cb9,cb10,cb11,cb12) ...
>
> ie bigger buckets with more cb's per buckets, fewer links. possibly have a cb
> "optimizer" that figures out if the cb list has been changed since it last
> optimized and then might group all cb's into a flat array (if cb's are 
> removed,
> array is split at that point and fragments until the next optimize call). this
> should save a little memory too.
>
> 2. but much more important here is to divide cb's into type specific
> lists/arrays so we don't walk tonnes of cb's we then filter out, and to have a
> fast "select" to select the appropriate list to walk for that event (as we 
> call
> 1 event at a time only - but all cb's for that event).
>
> 3. global freeze_count AND object freeze count is checked in the inner loop 
> per
> walk, and not outside the loop before even beginning a walk! these should at
> least be checked first to abort any callback list walk that we KNOW will all
> fail. we know the desc is unfreezable direct from the input desc and don't
> need to use the cb->items.item.desc.
>
> ... comments?
>
> now eo_data_scope_get()... i can't find much to imptove here... the mixin path
> isn't hit often and data_sizes are notmally > 0... so some way to oprimize:
>
> if (EINA_LIKELY((klass->desc->data_size > 0) && (klass->desc->type !=
> EO_CLASS_TYPE_MIXIN))) return ((char *) obj) + _eo_sz + klass->data_offset;
>
> is most likely what's needed... but there isn't much there. :)
>
> now eo_do_internal()... i think we need to wait for eo2... TOM!
>


We'll be switching to Eo2 soon which changes (and improves?) things in 
many ways. There's no point hacking deeply into the eo1 code just before 
we are switching.

I'll reply to this email, but let's revisit this after Eo2 is in. Eo2 
can only go in after the Eolian switch has been completed.

1. We support callback arrays (let's users register for a list of 
callbacks instead of just one), which improves this, but yeah, we should 
probably have an automatic optimizer. This should be the same/as bad as 
normal evas callbacks.

2. Sure. :)

3. I think I copied that from Evas (didn't want to change the 
behaviour). I guess it's meant to let people freeze events from inside a 
callback, which makes sense. Yeah, we could add a quicker abort too.

Eo2: As I said, waiting for Eolian. Might be able to go in soon.

--
Tom.


--
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


Re: [E-devel] [EGIT] [core/efl] master 02/04: Eolian: Support of unsigned short as int in va_arg

2014-03-11 Thread Tom Hacohen
On 11/03/14 05:48, Yossi Kantor wrote:
> jackdanielz pushed a commit to branch master.
>
> http://git.enlightenment.org/core/efl.git/commit/?id=b070981f8f16fa493489a7a2bd9d2caaaf25bbb1
>
> commit b070981f8f16fa493489a7a2bd9d2caaaf25bbb1
> Author: Yossi Kantor 
> Date:   Mon Mar 10 13:35:11 2014 +0200
>
>  Eolian: Support of unsigned short as int in va_arg
> ---
>   src/bin/eolian/eo1_generator.c | 4 +++-
>   1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/src/bin/eolian/eo1_generator.c b/src/bin/eolian/eo1_generator.c
> index 3853a72..2f3b8e0 100644
> --- a/src/bin/eolian/eo1_generator.c
> +++ b/src/bin/eolian/eo1_generator.c
> @@ -331,8 +331,10 @@ _varg_upgr(const char *stype)
>   {
>  if (!strcmp(stype, "Eina_Bool") ||
>!strcmp(stype, "char") ||
> - !strcmp(stype, "short"))
> + !strcmp(stype, "short") ||
> + !strcmp(stype, "unsigned short"))
>return "int";
> +
>  return stype;
>   }
>
>

Hey,

"unsigned" is not a size modifier. If it's "short" it should be an int. 
If it's "char" it should be an int as well, unsigned has nothing to do 
with your decision making.

--
Tom.


--
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


[EGIT] [core/efl] master 01/01: Eolian/Lexer: fix EOF issue.

2014-03-11 Thread Daniel Zaoui
jackdanielz pushed a commit to branch master.

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

commit 0f80ed90087186024453b03e5b70301f6d5b8df4
Author: Daniel Zaoui 
Date:   Tue Mar 11 10:05:02 2014 +0200

Eolian/Lexer: fix EOF issue.

When a new line was added before the last } in a .eo file, the parsing
was resulting in an error. It was due to the fact that some pointer
indicating the eof was not set when the parsing was done from memory.
---
 src/lib/eolian/eo_lexer.c  | 542 +++--
 src/lib/eolian/eo_lexer.rl |   2 +
 2 files changed, 274 insertions(+), 270 deletions(-)

diff --git a/src/lib/eolian/eo_lexer.c b/src/lib/eolian/eo_lexer.c
index 5e5b256..c0329ef 100644
--- a/src/lib/eolian/eo_lexer.c
+++ b/src/lib/eolian/eo_lexer.c
@@ -1,5 +1,5 @@
 
-#line 1 "eo_lexer.rl"
+#line 1 "lib/eolian/eo_lexer.rl"
 #include 
 #include 
 #include 
@@ -284,11 +284,11 @@ _eo_tokenizer_implement_get(Eo_Tokenizer *toknz, char *p)
 }
 
 
-#line 358 "eo_lexer.rl"
+#line 358 "lib/eolian/eo_lexer.rl"
 
 
 
-#line 292 "eo_lexer.c"
+#line 292 "lib/eolian/eo_lexer.c"
 static const char _eo_tokenizer_actions[] = {
0, 1, 0, 1, 2, 1, 3, 1, 
7, 1, 11, 1, 12, 1, 17, 1, 
@@ -1254,7 +1254,7 @@ static const int eo_tokenizer_en_tokenize_class = 377;
 static const int eo_tokenizer_en_main = 326;
 
 
-#line 966 "eo_lexer.rl"
+#line 966 "lib/eolian/eo_lexer.rl"
 
 
 Eina_Bool
@@ -1278,7 +1278,7 @@ eo_tokenizer_walk(Eo_Tokenizer *toknz, const char *source)
  }
 

-#line 1282 "eo_lexer.c"
+#line 1282 "lib/eolian/eo_lexer.c"
{
 toknz->cs = eo_tokenizer_start;
 toknz->ts = 0;
@@ -1286,7 +1286,7 @@ eo_tokenizer_walk(Eo_Tokenizer *toknz, const char *source)
 toknz->act = 0;
}
 
-#line 989 "eo_lexer.rl"
+#line 989 "lib/eolian/eo_lexer.rl"
 
while (!done)
  {
@@ -1313,7 +1313,7 @@ eo_tokenizer_walk(Eo_Tokenizer *toknz, const char *source)
   }
 
 
-#line 1317 "eo_lexer.c"
+#line 1317 "lib/eolian/eo_lexer.c"
{
int _klen;
unsigned int _trans;
@@ -1332,7 +1332,7 @@ _resume:
 #line 1 "NONE"
{ toknz->ts = ( toknz->p);}
break;
-#line 1336 "eo_lexer.c"
+#line 1336 "lib/eolian/eo_lexer.c"
}
}
 
@@ -1399,28 +1399,28 @@ _eof_trans:
switch ( *_acts++ )
{
case 0:
-#line 292 "eo_lexer.rl"
+#line 292 "lib/eolian/eo_lexer.rl"
{
   toknz->current_line += 1;
   DBG("inc[%d] %d", toknz->cs, toknz->current_line);
}
break;
case 1:
-#line 297 "eo_lexer.rl"
+#line 297 "lib/eolian/eo_lexer.rl"
{
   toknz->saved.line = toknz->current_line;
   DBG("save line[%d] %d", toknz->cs, toknz->current_line);
}
break;
case 2:
-#line 302 "eo_lexer.rl"
+#line 302 "lib/eolian/eo_lexer.rl"
{
   toknz->saved.tok = ( toknz->p);
   DBG("save token[%d] %p %c", toknz->cs, ( toknz->p), *( toknz->p));
}
break;
case 3:
-#line 376 "eo_lexer.rl"
+#line 376 "lib/eolian/eo_lexer.rl"
{
   if (!toknz->tmp.accessor) ABORT(toknz, "No accessor!!!");
   if (toknz->tmp.accessor->ret.type != NULL)
@@ -1430,7 +1430,7 @@ _eof_trans:
}
break;
case 4:
-#line 384 "eo_lexer.rl"
+#line 384 "lib/eolian/eo_lexer.rl"
{
   if (!toknz->tmp.accessor) ABORT(toknz, "No accessor!!!");
   if (toknz->tmp.accessor->ret.comment != NULL)
@@ -1440,7 +1440,7 @@ _eof_trans:
}
break;
case 5:
-#line 392 "eo_lexer.rl"
+#line 392 "lib/eolian/eo_lexer.rl"
{
   if (!toknz->tmp.accessor) ABORT(toknz, "No accessor!!!");
   toknz->tmp.accessor->ret.warn_unused = EINA_TRUE;
@@ -1448,20 +1448,20 @@ _eof_trans:
}
break;
case 6:
-#line 398 "eo_lexer.rl"
+#line 398 "lib/eolian/eo_lexer.rl"
{
   if (!toknz->tmp.accessor) ABORT(toknz, "No accessor!!!");
   toknz->tmp.accessor->legacy = _eo_tokenizer_token_get(toknz, ( 
toknz->p));
}
break;
case 7:
-#line 412 "eo_lexer.rl"
+#line 412 "lib/eolian/eo_lexer.rl"
{
   toknz->tmp.accessor_param = _eo_tokenizer_accessor_param_get(toknz, ( 
toknz->p));
}
break;
case 8:
-#line 416 "eo_lexer.rl"
+#line 416 "lib/eolian/eo_lexer.rl"
{
   if (!toknz->tmp.accessor_param)
  ABORT(toknz, "No accessor param!!!");
@@ -1472,7 +1472,7 @@ _eof_trans:
}
break;
case 9:
-#line 446 "eo_lexer.rl"
+#line 446 "lib/eolian/eo_lexer.rl"
{
   const char *c = _eo_tokenizer_token_get(toknz, ( toknz->p)-2);
   if (toknz->tmp.param == NULL)
@@ -1482,7 +1482,7 @@ _eof_trans:
}
break;
case 10:
-#line 454 "eo_lexer.rl"
+#line 454 "lib/eolian/eo_lexer.rl"
{
   toknz->tmp.param = _eo_tokenizer_param_get(toknz, ( toknz->p));
   if (toknz->tmp.params)
@@ -1493,7 +1493,7 @@ _eo

Re: [E-devel] eo things to do

2014-03-11 Thread David Seikel
On Tue, 11 Mar 2014 16:20:37 +0900 Carsten Haitzler (The Rasterman)
 wrote:

> so now we're getting more into eo... it's time to look at 3 things
> that turn up on my profiles of things that are NOT expedite.
> 
>  8.21%  elementary_test  libeo.so.1.9.99  [.] eo_do_internal
>  7.77%  elementary_test  libeo.so.1.9.99  [.] _ev_cb_call
>  3.03%  elementary_test  libeo.so.1.9.99  [.]
> eo_data_scope_get
> 
> this is a pretty simply test. open elm test. scroll to bottom, scroll
> back to top. close.  almost 20% of our cpu is spent in the above 3
> calls. it's time to cut this down... a LOT.
> 
> so i am looking at _ev_cb_call() and callbacks in general. this is a
> single linked list of cb's for ALL cb's for an object. we filter out
> cb's not matching the callback type (desc) as we walk the list. this
> of course causes us to do a lot of cache misses and hunt through a
> lot of memory to then... do nothing.
> 
> imho this needs to be restructured to...
> 
> 1. have fewer linked list nodes. that means instead of:
> 
>   node (cb) -> node (cb2) -> node (cb3) ...
> 
> what might be better is:
> 
>   node (cb1,cb2,cb3,cb4,cb5,cb6,cb7,cb8) -> node
> (cb9,cb10,cb11,cb12) ...
> 
> ie bigger buckets with more cb's per buckets, fewer links. possibly
> have a cb "optimizer" that figures out if the cb list has been
> changed since it last optimized and then might group all cb's into a
> flat array (if cb's are removed, array is split at that point and
> fragments until the next optimize call). this should save a little
> memory too.
> 
> 2. but much more important here is to divide cb's into type specific
> lists/arrays so we don't walk tonnes of cb's we then filter out, and
> to have a fast "select" to select the appropriate list to walk for
> that event (as we call 1 event at a time only - but all cb's for that
> event).

That sounds like a great idea.

> 3. global freeze_count AND object freeze count is checked in the
> inner loop per walk, and not outside the loop before even beginning a
> walk! these should at least be checked first to abort any callback
> list walk that we KNOW will all fail. we know the desc is unfreezable
> direct from the input desc and don't need to use the
> cb->items.item.desc.
> 
> ... comments?
> 
> now eo_data_scope_get()... i can't find much to imptove here... the
> mixin path isn't hit often and data_sizes are notmally > 0... so some
> way to oprimize:
> 
>if (EINA_LIKELY((klass->desc->data_size > 0) &&
> (klass->desc->type != EO_CLASS_TYPE_MIXIN))) return ((char *) obj) +
> _eo_sz + klass->data_offset;
> 
> is most likely what's needed... but there isn't much there. :)
> 
> now eo_do_internal()... i think we need to wait for eo2... TOM!

I finally have some time this week (unless a client wants me to be
busy) to look at this eo stuff, and now you tell me that eo2 is
coming?  lol

I'll be going over all the old emails I have marked, try to learn how
eo works, and consider if it can be used for the Edje Lua stuff.  I
think it's either eo for Lua bindings, or LuaJIT FFI.  Manually writing
the Edje Lua bindings is obviously not so good, I kinda balked at all
those text APIs.

-- 
A big old stinking pile of genius that no one wants
coz there are too many silver coated monkeys in the world.


signature.asc
Description: PGP signature
--
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


[EGIT] [core/efl] master 02/02: ecore-drm: Add code to handle mouse input

2014-03-11 Thread Christopher Michael
devilhorns pushed a commit to branch master.

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

commit 7d8059e4c51d4fe7863a6691b9fe15b27ad2d59e
Author: Chris Michael 
Date:   Tue Mar 11 08:41:42 2014 +

ecore-drm: Add code to handle mouse input

@feature: Add support in ecore-drm for handling mouse movement, wheel,
and buttons.

This adds code to pass mouse events from linux input to ecore by
raising ecore_events (ecore_event_add).

Signed-off-by: Chris Michael 
---
 src/lib/ecore_drm/ecore_drm_evdev.c | 178 ++--
 1 file changed, 168 insertions(+), 10 deletions(-)

diff --git a/src/lib/ecore_drm/ecore_drm_evdev.c 
b/src/lib/ecore_drm/ecore_drm_evdev.c
index 4c52104..cdc3437 100644
--- a/src/lib/ecore_drm/ecore_drm_evdev.c
+++ b/src/lib/ecore_drm/ecore_drm_evdev.c
@@ -72,6 +72,10 @@ _device_configure(Ecore_Drm_Evdev *edev)
  {
 DBG("Input device %s is a pointer", edev->name);
 edev->seat_caps |= EVDEV_SEAT_POINTER;
+
+/* FIXME: make this configurable */
+edev->mouse.threshold = 0.25;
+
 ret = EINA_TRUE;
  }
 
@@ -345,7 +349,7 @@ _device_notify_key(Ecore_Drm_Evdev *dev, struct input_event 
*event, unsigned int
e->event_window = (Ecore_Window)input->dev->window;
e->root_window = (Ecore_Window)input->dev->window;
e->timestamp = timestamp;
-   /* e->same_screen = 1; */
+   e->same_screen = 1;
 
_device_modifiers_update(dev);
e->modifiers = dev->xkb.modifiers;
@@ -354,25 +358,149 @@ _device_notify_key(Ecore_Drm_Evdev *dev, struct 
input_event *event, unsigned int
  ecore_event_add(ECORE_EVENT_KEY_DOWN, e, NULL, NULL);
else
  ecore_event_add(ECORE_EVENT_KEY_UP, e, NULL, NULL);
+}
+
+static void 
+_device_notify_motion(Ecore_Drm_Evdev *dev, unsigned int timestamp)
+{
+   Ecore_Drm_Input *input;
+   Ecore_Event_Mouse_Move *ev;
+
+   if (!(input = dev->seat->input)) return;
+   if (!(ev = calloc(1, sizeof(Ecore_Event_Mouse_Move return;
+
+   ev->window = (Ecore_Window)input->dev->window;
+   ev->event_window = (Ecore_Window)input->dev->window;
+   ev->root_window = (Ecore_Window)input->dev->window;
+   ev->timestamp = timestamp;
+   ev->same_screen = 1;
+
+   /* NB: Commented out. This borks mouse movement if no key has been 
+* pressed yet due to 'state' not being set */
+//   _device_modifiers_update(dev);
+   ev->modifiers = dev->xkb.modifiers;
+
+   ev->x = dev->mouse.x;
+   ev->y = dev->mouse.y;
+   ev->root.x = ev->x;
+   ev->root.y = ev->y;
+
+   ecore_event_add(ECORE_EVENT_MOUSE_MOVE, ev, NULL, NULL);
+}
+
+static void 
+_device_notify_wheel(Ecore_Drm_Evdev *dev, struct input_event *event, unsigned 
int timestamp)
+{
+   Ecore_Drm_Input *input;
+   Ecore_Event_Mouse_Wheel *ev;
+
+   if (!(input = dev->seat->input)) return;
+   if (!(ev = calloc(1, sizeof(Ecore_Event_Mouse_Wheel return;
+
+   ev->window = (Ecore_Window)input->dev->window;
+   ev->event_window = (Ecore_Window)input->dev->window;
+   ev->root_window = (Ecore_Window)input->dev->window;
+   ev->timestamp = timestamp;
+   ev->same_screen = 1;
+
+   /* NB: Commented out. This borks mouse wheel if no key has been 
+* pressed yet due to 'state' not being set */
+//   _device_modifiers_update(dev);
+   ev->modifiers = dev->xkb.modifiers;
+
+   ev->x = dev->mouse.x;
+   ev->y = dev->mouse.y;
+   ev->root.x = ev->x;
+   ev->root.y = ev->y;
+   if (event->value == REL_HWHEEL) ev->direction = 1;
+   ev->z = event->value;
+
+   ecore_event_add(ECORE_EVENT_MOUSE_WHEEL, ev, NULL, NULL);
+}
+
+static void 
+_device_notify_button(Ecore_Drm_Evdev *dev, struct input_event *event, 
unsigned int timestamp)
+{
+   Ecore_Drm_Input *input;
+   Ecore_Event_Mouse_Button *ev;
+   int button;
+
+   if (!(input = dev->seat->input)) return;
+   if (!(ev = calloc(1, sizeof(Ecore_Event_Mouse_Button return;
+
+   ev->window = (Ecore_Window)input->dev->window;
+   ev->event_window = (Ecore_Window)input->dev->window;
+   ev->root_window = (Ecore_Window)input->dev->window;
+   ev->timestamp = timestamp;
+   ev->same_screen = 1;
+
+   /* NB: Commented out. This borks mouse button if no key has been 
+* pressed yet due to 'state' not being set */
+//   _device_modifiers_update(dev);
+   ev->modifiers = dev->xkb.modifiers;
 
-   if ((event->code >= KEY_ESC) && (event->code <= KEY_COMPOSE))
+   ev->x = dev->mouse.x;
+   ev->y = dev->mouse.y;
+   ev->root.x = ev->x;
+   ev->root.y = ev->y;
+
+   button = ((event->code & 0x00F) + 1);
+
+   /* swap buttons 2 & 3 so behaviour is like X */
+   if (button == 3) button = 2;
+   else if (button == 2) button = 3;
+
+   if (event->value)
  {
-/* ignore key repeat */
-if (event->value == 2)
+unsigned int current;
+
+current = timestamp;
+dev->mouse.did_double = EINA_FALSE;
+dev->mouse.did_triple = EINA_FALSE;
+
+if (((current - dev->mouse.prev) <= dev->mouse.threshold

[EGIT] [core/efl] master 01/02: ecore-drm: Add private structure to store mouse information in evdev

2014-03-11 Thread Christopher Michael
devilhorns pushed a commit to branch master.

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

commit 8fe9adead1e212d23e915200adbad616bc000fe0
Author: Chris Michael 
Date:   Tue Mar 11 08:41:08 2014 +

ecore-drm: Add private structure to store mouse information in evdev

Signed-off-by: Chris Michael 
---
 src/lib/ecore_drm/ecore_drm_private.h | 12 +++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/src/lib/ecore_drm/ecore_drm_private.h 
b/src/lib/ecore_drm/ecore_drm_private.h
index b0fa1c9..6579807 100644
--- a/src/lib/ecore_drm/ecore_drm_private.h
+++ b/src/lib/ecore_drm/ecore_drm_private.h
@@ -70,7 +70,7 @@
 extern int _ecore_drm_log_dom;
 
 /* undef this for non-testing builds */
-# define LOG_TO_FILE
+//# define LOG_TO_FILE
 
 # ifdef LOG_TO_FILE
 extern FILE *lg;
@@ -187,6 +187,16 @@ struct _Ecore_Drm_Evdev
 
struct 
  {
+int x, y;
+unsigned int last, prev;
+double threshold;
+Eina_Bool did_double : 1;
+Eina_Bool did_triple : 1;
+int prev_button, last_button;
+ } mouse;
+
+   struct 
+ {
 struct xkb_keymap *keymap;
 struct xkb_state *state;
 xkb_mod_mask_t ctrl_mask;

-- 




[E-devel] eo things to do

2014-03-11 Thread The Rasterman
so now we're getting more into eo... it's time to look at 3 things that turn up
on my profiles of things that are NOT expedite.

 8.21%  elementary_test  libeo.so.1.9.99  [.] eo_do_internal
 7.77%  elementary_test  libeo.so.1.9.99  [.] _ev_cb_call
 3.03%  elementary_test  libeo.so.1.9.99  [.] eo_data_scope_get

this is a pretty simply test. open elm test. scroll to bottom, scroll back to
top. close.  almost 20% of our cpu is spent in the above 3 calls. it's time to
cut this down... a LOT.

so i am looking at _ev_cb_call() and callbacks in general. this is a single
linked list of cb's for ALL cb's for an object. we filter out cb's not matching
the callback type (desc) as we walk the list. this of course causes us to do a
lot of cache misses and hunt through a lot of memory to then... do nothing.

imho this needs to be restructured to...

1. have fewer linked list nodes. that means instead of:

  node (cb) -> node (cb2) -> node (cb3) ...

what might be better is:

  node (cb1,cb2,cb3,cb4,cb5,cb6,cb7,cb8) -> node (cb9,cb10,cb11,cb12) ...

ie bigger buckets with more cb's per buckets, fewer links. possibly have a cb
"optimizer" that figures out if the cb list has been changed since it last
optimized and then might group all cb's into a flat array (if cb's are removed,
array is split at that point and fragments until the next optimize call). this
should save a little memory too.

2. but much more important here is to divide cb's into type specific
lists/arrays so we don't walk tonnes of cb's we then filter out, and to have a
fast "select" to select the appropriate list to walk for that event (as we call
1 event at a time only - but all cb's for that event).

3. global freeze_count AND object freeze count is checked in the inner loop per
walk, and not outside the loop before even beginning a walk! these should at
least be checked first to abort any callback list walk that we KNOW will all
fail. we know the desc is unfreezable direct from the input desc and don't
need to use the cb->items.item.desc.

... comments?

now eo_data_scope_get()... i can't find much to imptove here... the mixin path
isn't hit often and data_sizes are notmally > 0... so some way to oprimize:

   if (EINA_LIKELY((klass->desc->data_size > 0) && (klass->desc->type !=
EO_CLASS_TYPE_MIXIN))) return ((char *) obj) + _eo_sz + klass->data_offset;

is most likely what's needed... but there isn't much there. :)

now eo_do_internal()... i think we need to wait for eo2... TOM!

-- 
- Codito, ergo sum - "I code, therefore I am" --
The Rasterman (Carsten Haitzler)ras...@rasterman.com


--
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech
___
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


[EGIT] [core/efl] master 01/01: evas: Replace EINA_LIST_FOREACH_SAFE to while statement.

2014-03-11 Thread WooHyun Jung
woohyun pushed a commit to branch master.

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

commit 2791c3dc06bc1fc8f4460df9056724102d0c7c66
Author: WooHyun Jung 
Date:   Tue Mar 11 16:34:56 2014 +0900

evas: Replace EINA_LIST_FOREACH_SAFE to while statement.

Clipees can be cleared before the loop is finished because
evas_object_clip_unset calls smart function of clip_unset.
So, if we use EINA_LIST_FOREACH_SAFE, invalid next list pointer
can be kept and read after obj->clip.clipees is freed.

Thanks to Davide Andreoli for reporting.

@fix
---
 src/lib/evas/canvas/evas_object_main.c | 11 ---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/src/lib/evas/canvas/evas_object_main.c 
b/src/lib/evas/canvas/evas_object_main.c
index ff679cb..cc6c59c 100644
--- a/src/lib/evas/canvas/evas_object_main.c
+++ b/src/lib/evas/canvas/evas_object_main.c
@@ -621,7 +621,6 @@ _destructor(Eo *eo_obj, void *_pd, va_list *list 
EINA_UNUSED)
return;
MAGIC_CHECK_END();
Evas_Object_Protected_Data *obj = _pd;
-   Evas_Object_Protected_Data *tmp;
Evas_Object *proxy;
Eina_List *l, *l2;
 
@@ -654,8 +653,14 @@ _destructor(Eo *eo_obj, void *_pd, va_list *list 
EINA_UNUSED)
 goto end;
  }
evas_object_grabs_cleanup(eo_obj, obj);
-   EINA_LIST_FOREACH_SAFE(obj->clip.clipees, l, l2, tmp)
- evas_object_clip_unset(tmp->object);
+   /* "while" should be used for null check of obj->clip.clipees,
+  because evas_objct_clip_unset can set null to obj->clip.clipees */
+   while (obj->clip.clipees)
+ {
+Evas_Object_Protected_Data *tmp;
+tmp = eina_list_data_get(obj->clip.clipees);
+evas_object_clip_unset(tmp->object);
+ }
EINA_LIST_FOREACH_SAFE(obj->proxy->proxies, l, l2, proxy)
  {
 if (eo_isa(proxy, EVAS_OBJ_IMAGE_CLASS))

--