Evas filters: Fix 1-D blurs on a single buffer
authorJean-Philippe Andre <jp.andre@samsung.com>
Tue, 11 Mar 2014 06:11:21 +0000 (15:11 +0900)
committerJean-Philippe Andre <jp.andre@samsung.com>
Wed, 12 Mar 2014 05:08:02 +0000 (14:08 +0900)
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

index 59d5653..f336da7 100644 (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;
      }