summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJean-Philippe Andre <jp.andre@samsung.com>2014-02-04 12:32:15 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2014-02-07 17:33:17 +0900
commit43962135be5cf2ad6c71d0e32d170ebd63e1a58f (patch)
treeff0c7274d2ae1f3d8049227a2d29c373ee6b3ca7
parent712566939dfb86339a8cb34cb5cac2fbe6bbffc8 (diff)
Evas filters: Remove FIXME and unimplemented code
Remove compilation warnings: we don't really need cubic interpolation at this point, we can still add it back later if wanted. Also, make it clear that buffer #2 is the output buffer. Remove meaningless FIXME.
-rw-r--r--src/lib/evas/filters/evas_filter.c8
-rw-r--r--src/lib/evas/filters/evas_filter_parser.c9
-rw-r--r--src/lib/evas/filters/evas_filter_private.h3
-rw-r--r--src/lib/evas/filters/evas_filter_utils.c9
-rw-r--r--src/lib/evas/include/evas_filter.h3
5 files changed, 11 insertions, 21 deletions
diff --git a/src/lib/evas/filters/evas_filter.c b/src/lib/evas/filters/evas_filter.c
index 8bf7b475ed..1d41f939e3 100644
--- a/src/lib/evas/filters/evas_filter.c
+++ b/src/lib/evas/filters/evas_filter.c
@@ -1450,7 +1450,9 @@ evas_filter_target_set(Evas_Filter_Context *ctx, void *draw_context,
1450 if (!ctx->gl_engine) 1450 if (!ctx->gl_engine)
1451 { 1451 {
1452 ctx->target.bufid = evas_filter_buffer_image_new(ctx, surface); 1452 ctx->target.bufid = evas_filter_buffer_image_new(ctx, surface);
1453 evas_filter_command_blend_add(ctx, draw_context, 2, ctx->target.bufid, 1453 evas_filter_command_blend_add(ctx, draw_context,
1454 EVAS_FILTER_BUFFER_OUTPUT_ID,
1455 ctx->target.bufid,
1454 x, y, EVAS_FILTER_FILL_MODE_NONE); 1456 x, y, EVAS_FILTER_FILL_MODE_NONE);
1455 } 1457 }
1456 else 1458 else
@@ -1468,7 +1470,7 @@ evas_filter_target_set(Evas_Filter_Context *ctx, void *draw_context,
1468 target->glimage = target->backing; 1470 target->glimage = target->backing;
1469 target->backing = NULL; 1471 target->backing = NULL;
1470 1472
1471 image = _filter_buffer_get(ctx, 2); 1473 image = _filter_buffer_get(ctx, EVAS_FILTER_BUFFER_OUTPUT_ID);
1472 im = image->backing; 1474 im = image->backing;
1473 image->glimage = ENFN->image_new_from_data 1475 image->glimage = ENFN->image_new_from_data
1474 (ENDT, image->w, image->h, im->image.data, EINA_TRUE, im->cache_entry.space); 1476 (ENDT, image->w, image->h, im->image.data, EINA_TRUE, im->cache_entry.space);
@@ -1491,7 +1493,7 @@ _filter_target_render(Evas_Filter_Context *ctx)
1491 if (!ctx->gl_engine) return EINA_FALSE; 1493 if (!ctx->gl_engine) return EINA_FALSE;
1492 EINA_SAFETY_ON_FALSE_RETURN_VAL(ctx->target.bufid, EINA_FALSE); 1494 EINA_SAFETY_ON_FALSE_RETURN_VAL(ctx->target.bufid, EINA_FALSE);
1493 1495
1494 src = _filter_buffer_get(ctx, 2); 1496 src = _filter_buffer_get(ctx, EVAS_FILTER_BUFFER_OUTPUT_ID);
1495 if (!src) return EINA_FALSE; 1497 if (!src) return EINA_FALSE;
1496 1498
1497 dst = _filter_buffer_get(ctx, ctx->target.bufid); 1499 dst = _filter_buffer_get(ctx, ctx->target.bufid);
diff --git a/src/lib/evas/filters/evas_filter_parser.c b/src/lib/evas/filters/evas_filter_parser.c
index 6033f43cad..f30095f539 100644
--- a/src/lib/evas/filters/evas_filter_parser.c
+++ b/src/lib/evas/filters/evas_filter_parser.c
@@ -1704,13 +1704,8 @@ _instr2cmd_curve(Evas_Filter_Context *ctx, Evas_Filter_Program *pgm,
1704 channel = EVAS_FILTER_CHANNEL_ALPHA; 1704 channel = EVAS_FILTER_CHANNEL_ALPHA;
1705 } 1705 }
1706 1706
1707 if (interpolation) 1707 if (interpolation && !strcasecmp(interpolation, "none"))
1708 { 1708 mode = EVAS_FILTER_INTERPOLATION_MODE_NONE;
1709 if (!strcasecmp(interpolation, "none"))
1710 mode = EVAS_FILTER_INTERPOLATION_MODE_NONE;
1711 else if (!strcasecmp(interpolation, "cubic"))
1712 mode = EVAS_FILTER_INTERPOLATION_MODE_CUBIC;
1713 }
1714 1709
1715 if (!points_str) goto interpolated; 1710 if (!points_str) goto interpolated;
1716 copy = strdup(points_str); 1711 copy = strdup(points_str);
diff --git a/src/lib/evas/filters/evas_filter_private.h b/src/lib/evas/filters/evas_filter_private.h
index a91cbcb7d1..f6ecc569f0 100644
--- a/src/lib/evas/filters/evas_filter_private.h
+++ b/src/lib/evas/filters/evas_filter_private.h
@@ -163,8 +163,7 @@ struct _Evas_Filter_Buffer
163enum _Evas_Filter_Interpolation_Mode 163enum _Evas_Filter_Interpolation_Mode
164{ 164{
165 EVAS_FILTER_INTERPOLATION_MODE_NONE, 165 EVAS_FILTER_INTERPOLATION_MODE_NONE,
166 EVAS_FILTER_INTERPOLATION_MODE_LINEAR, 166 EVAS_FILTER_INTERPOLATION_MODE_LINEAR
167 EVAS_FILTER_INTERPOLATION_MODE_CUBIC
168}; 167};
169 168
170void evas_filter_context_clear(Evas_Filter_Context *ctx); 169void evas_filter_context_clear(Evas_Filter_Context *ctx);
diff --git a/src/lib/evas/filters/evas_filter_utils.c b/src/lib/evas/filters/evas_filter_utils.c
index 5e80481d35..7ef552fb9e 100644
--- a/src/lib/evas/filters/evas_filter_utils.c
+++ b/src/lib/evas/filters/evas_filter_utils.c
@@ -105,13 +105,6 @@ _interpolate_linear(DATA8 *output, DATA8 *points, int point_count)
105 return EINA_TRUE; 105 return EINA_TRUE;
106} 106}
107 107
108static Eina_Bool
109_interpolate_cubic(DATA8 *output, DATA8 *points, int point_count)
110{
111 CRI("Not implemented yet");
112 return EINA_FALSE;
113}
114
115Eina_Bool 108Eina_Bool
116evas_filter_interpolate(DATA8 *output, DATA8 *points, int point_count, 109evas_filter_interpolate(DATA8 *output, DATA8 *points, int point_count,
117 Evas_Filter_Interpolation_Mode mode) 110 Evas_Filter_Interpolation_Mode mode)
@@ -120,8 +113,6 @@ evas_filter_interpolate(DATA8 *output, DATA8 *points, int point_count,
120 { 113 {
121 case EVAS_FILTER_INTERPOLATION_MODE_NONE: 114 case EVAS_FILTER_INTERPOLATION_MODE_NONE:
122 return _interpolate_none(output, points, point_count); 115 return _interpolate_none(output, points, point_count);
123 case EVAS_FILTER_INTERPOLATION_MODE_CUBIC:
124 return _interpolate_cubic(output, points, point_count);
125 case EVAS_FILTER_INTERPOLATION_MODE_LINEAR: 116 case EVAS_FILTER_INTERPOLATION_MODE_LINEAR:
126 default: 117 default:
127 return _interpolate_linear(output, points, point_count); 118 return _interpolate_linear(output, points, point_count);
diff --git a/src/lib/evas/include/evas_filter.h b/src/lib/evas/include/evas_filter.h
index 9de6532865..12d62c8613 100644
--- a/src/lib/evas/include/evas_filter.h
+++ b/src/lib/evas/include/evas_filter.h
@@ -23,6 +23,9 @@ typedef void (* Evas_Filter_Cb) (Evas_Filter_Context *ctx, void *data);
23#define EVAS_FILTER_BUFFER_RGBA EINA_FALSE 23#define EVAS_FILTER_BUFFER_RGBA EINA_FALSE
24#define EVAS_FILTER_BUFFER_ALPHA EINA_TRUE 24#define EVAS_FILTER_BUFFER_ALPHA EINA_TRUE
25 25
26#define EVAS_FILTER_BUFFER_INPUT_ID 1
27#define EVAS_FILTER_BUFFER_OUTPUT_ID 2
28
26enum _Evas_Filter_Mode 29enum _Evas_Filter_Mode
27{ 30{
28 EVAS_FILTER_MODE_BLEND, /**< Blend with current context render_op */ 31 EVAS_FILTER_MODE_BLEND, /**< Blend with current context render_op */