summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJean-Philippe Andre <jp.andre@samsung.com>2017-03-09 17:36:39 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2017-03-09 17:39:39 +0900
commit815e53ee35dea8ce08532f5532d1da3d6a9df167 (patch)
tree1a5cfc126d7c6bece0c6689d908b4496562f2c4d
parentc1a2c89ac8ea05552f88134da9e66fb1c4a99bd6 (diff)
evas filters: Save selected render op of the final object
If an object is meant to use COPY mode (for evil purposes, most likely), then its filtered output should also be using COPY mode. @fix
-rw-r--r--src/lib/evas/filters/evas_filter.c2
-rw-r--r--src/lib/evas/filters/evas_filter_private.h1
2 files changed, 3 insertions, 0 deletions
diff --git a/src/lib/evas/filters/evas_filter.c b/src/lib/evas/filters/evas_filter.c
index 6ce9cb980d..9438a4e98a 100644
--- a/src/lib/evas/filters/evas_filter.c
+++ b/src/lib/evas/filters/evas_filter.c
@@ -1286,6 +1286,7 @@ evas_filter_target_set(Evas_Filter_Context *ctx, void *draw_context,
1286 if (ctx->target.r == 255 && ctx->target.g == 255 && 1286 if (ctx->target.r == 255 && ctx->target.g == 255 &&
1287 ctx->target.b == 255 && ctx->target.a == 255) 1287 ctx->target.b == 255 && ctx->target.a == 255)
1288 ctx->target.color_use = EINA_FALSE; 1288 ctx->target.color_use = EINA_FALSE;
1289 ctx->target.rop = ENFN->context_render_op_get(ENDT, draw_context);
1289 1290
1290 ENFN->context_clip_image_get 1291 ENFN->context_clip_image_get
1291 (ENDT, draw_context, &mask, &ctx->target.mask_x, &ctx->target.mask_y); 1292 (ENDT, draw_context, &mask, &ctx->target.mask_x, &ctx->target.mask_y);
@@ -1337,6 +1338,7 @@ _filter_target_render(Evas_Filter_Context *ctx)
1337 ctx->evas, EINA_FALSE); 1338 ctx->evas, EINA_FALSE);
1338 } 1339 }
1339 1340
1341 ENFN->context_render_op_set(ENDT, drawctx, ctx->target.rop);
1340 ENFN->image_draw(ENDT, drawctx, surface, image, 1342 ENFN->image_draw(ENDT, drawctx, surface, image,
1341 0, 0, src->w, src->h, 1343 0, 0, src->w, src->h,
1342 ctx->target.x, ctx->target.y, src->w, src->h, 1344 ctx->target.x, ctx->target.y, src->w, src->h,
diff --git a/src/lib/evas/filters/evas_filter_private.h b/src/lib/evas/filters/evas_filter_private.h
index 0eb2052b0c..c9be59e3a6 100644
--- a/src/lib/evas/filters/evas_filter_private.h
+++ b/src/lib/evas/filters/evas_filter_private.h
@@ -137,6 +137,7 @@ struct _Evas_Filter_Context
137 int r, g, b, a; // clip color 137 int r, g, b, a; // clip color
138 void *mask; // mask 138 void *mask; // mask
139 int mask_x, mask_y; // mask offset 139 int mask_x, mask_y; // mask offset
140 Evas_Render_Op rop;
140 Eina_Bool clip_use : 1; 141 Eina_Bool clip_use : 1;
141 Eina_Bool color_use : 1; 142 Eina_Bool color_use : 1;
142 } target; 143 } target;