From 0dace7721e6c233725a1ac6c416c0d631b0afe95 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Andre Date: Tue, 11 Mar 2014 15:11:21 +0900 Subject: [PATCH] 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; } -- 2.7.4