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
This commit is contained in:
Jean-Philippe Andre 2014-03-11 15:11:21 +09:00
parent 6674ef5b35
commit 0dace7721e
1 changed files with 5 additions and 0 deletions

View File

@ -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;
}