if (!ctx->gl_engine)
{
ctx->target.bufid = evas_filter_buffer_image_new(ctx, surface);
- evas_filter_command_blend_add(ctx, draw_context, 2, ctx->target.bufid,
+ evas_filter_command_blend_add(ctx, draw_context,
+ EVAS_FILTER_BUFFER_OUTPUT_ID,
+ ctx->target.bufid,
x, y, EVAS_FILTER_FILL_MODE_NONE);
}
else
target->glimage = target->backing;
target->backing = NULL;
- image = _filter_buffer_get(ctx, 2);
+ image = _filter_buffer_get(ctx, EVAS_FILTER_BUFFER_OUTPUT_ID);
im = image->backing;
image->glimage = ENFN->image_new_from_data
(ENDT, image->w, image->h, im->image.data, EINA_TRUE, im->cache_entry.space);
if (!ctx->gl_engine) return EINA_FALSE;
EINA_SAFETY_ON_FALSE_RETURN_VAL(ctx->target.bufid, EINA_FALSE);
- src = _filter_buffer_get(ctx, 2);
+ src = _filter_buffer_get(ctx, EVAS_FILTER_BUFFER_OUTPUT_ID);
if (!src) return EINA_FALSE;
dst = _filter_buffer_get(ctx, ctx->target.bufid);
channel = EVAS_FILTER_CHANNEL_ALPHA;
}
- if (interpolation)
- {
- if (!strcasecmp(interpolation, "none"))
- mode = EVAS_FILTER_INTERPOLATION_MODE_NONE;
- else if (!strcasecmp(interpolation, "cubic"))
- mode = EVAS_FILTER_INTERPOLATION_MODE_CUBIC;
- }
+ if (interpolation && !strcasecmp(interpolation, "none"))
+ mode = EVAS_FILTER_INTERPOLATION_MODE_NONE;
if (!points_str) goto interpolated;
copy = strdup(points_str);
enum _Evas_Filter_Interpolation_Mode
{
EVAS_FILTER_INTERPOLATION_MODE_NONE,
- EVAS_FILTER_INTERPOLATION_MODE_LINEAR,
- EVAS_FILTER_INTERPOLATION_MODE_CUBIC
+ EVAS_FILTER_INTERPOLATION_MODE_LINEAR
};
void evas_filter_context_clear(Evas_Filter_Context *ctx);
return EINA_TRUE;
}
-static Eina_Bool
-_interpolate_cubic(DATA8 *output, DATA8 *points, int point_count)
-{
- CRI("Not implemented yet");
- return EINA_FALSE;
-}
-
Eina_Bool
evas_filter_interpolate(DATA8 *output, DATA8 *points, int point_count,
Evas_Filter_Interpolation_Mode mode)
{
case EVAS_FILTER_INTERPOLATION_MODE_NONE:
return _interpolate_none(output, points, point_count);
- case EVAS_FILTER_INTERPOLATION_MODE_CUBIC:
- return _interpolate_cubic(output, points, point_count);
case EVAS_FILTER_INTERPOLATION_MODE_LINEAR:
default:
return _interpolate_linear(output, points, point_count);
#define EVAS_FILTER_BUFFER_RGBA EINA_FALSE
#define EVAS_FILTER_BUFFER_ALPHA EINA_TRUE
+#define EVAS_FILTER_BUFFER_INPUT_ID 1
+#define EVAS_FILTER_BUFFER_OUTPUT_ID 2
+
enum _Evas_Filter_Mode
{
EVAS_FILTER_MODE_BLEND, /**< Blend with current context render_op */