forked from enlightenment/efl
Evas filters: Allow BLUR and GROW with radius 0
Fallback to a standard blend instruction instead of failing miserably just because the radius is 0.
This commit is contained in:
parent
91a471b4dc
commit
eee3c1c773
|
@ -914,7 +914,11 @@ evas_filter_command_blur_add(Evas_Filter_Context *ctx, void *drawctx,
|
|||
|
||||
if (dx < 0) dx = 0;
|
||||
if (dy < 0) dy = 0;
|
||||
if (!dx && !dy) goto fail;
|
||||
if (!dx && !dy)
|
||||
{
|
||||
DBG("Changing 0px blur into simple blend");
|
||||
return evas_filter_command_blend_add(ctx, drawctx, inbuf, outbuf, ox, oy, EVAS_FILTER_FILL_MODE_NONE);
|
||||
}
|
||||
|
||||
in = _filter_buffer_get(ctx, inbuf);
|
||||
if (!in)
|
||||
|
@ -1213,6 +1217,12 @@ evas_filter_command_grow_add(Evas_Filter_Context *ctx, void *draw_context,
|
|||
|
||||
EINA_SAFETY_ON_NULL_RETURN_VAL(ctx, -1);
|
||||
|
||||
if (!radius)
|
||||
{
|
||||
DBG("Changing 0px grow into simple blend");
|
||||
return evas_filter_command_blend_add(ctx, draw_context, inbuf, outbuf, 0, 0, EVAS_FILTER_FILL_MODE_NONE);
|
||||
}
|
||||
|
||||
in = _filter_buffer_get(ctx, inbuf);
|
||||
EINA_SAFETY_ON_NULL_RETURN_VAL(in, -1);
|
||||
|
||||
|
|
Loading…
Reference in New Issue