summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJean-Philippe Andre <jp.andre@samsung.com>2014-03-25 15:57:01 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2014-03-26 10:48:12 +0900
commitb045feefb1d61e682322acfecd18469a64b3c1b4 (patch)
treebfecf9f119e3fd16001f8109497e1092e2a1011e /src
parent27d97110cca5f15cebbc9a05f610bb0275fbab4b (diff)
Evas filters: Fix blur with src == dst
If dst == src, then we should not blend back to the buffer, as we actually want to blur the content and not keep the sharp version.
Diffstat (limited to 'src')
-rw-r--r--src/lib/evas/filters/evas_filter.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/lib/evas/filters/evas_filter.c b/src/lib/evas/filters/evas_filter.c
index 0c6c40f..dec5149 100644
--- a/src/lib/evas/filters/evas_filter.c
+++ b/src/lib/evas/filters/evas_filter.c
@@ -851,7 +851,7 @@ evas_filter_temporary_buffer_get(Evas_Filter_Context *ctx, int w, int h,
851 851
852 buf = _buffer_new(ctx, w, h, alpha_only); 852 buf = _buffer_new(ctx, w, h, alpha_only);
853 buf->locked = EINA_TRUE; 853 buf->locked = EINA_TRUE;
854 DBG("Created temporary buffer: %d", buf->id); 854 DBG("Created temporary buffer: %d (%s)", buf->id, alpha_only ? "Alpha" : "RGBA");
855 return buf; 855 return buf;
856} 856}
857 857
@@ -934,6 +934,7 @@ evas_filter_command_blur_add(Evas_Filter_Context *ctx, void *drawctx,
934 goto fail; 934 goto fail;
935 } 935 }
936 936
937 if (in == out) out->dirty = EINA_FALSE;
937 blend = (out->dirty && !out->transient); 938 blend = (out->dirty && !out->transient);
938 939
939 switch (type) 940 switch (type)
@@ -1017,7 +1018,9 @@ evas_filter_command_blur_add(Evas_Filter_Context *ctx, void *drawctx,
1017 } 1018 }
1018 else if (blend || (in->alpha_only && !out->alpha_only)) 1019 else if (blend || (in->alpha_only && !out->alpha_only))
1019 { 1020 {
1020 DBG("Adding extra blending step (%s --> RGBA)", in->alpha_only ? "Alpha" : "RGBA"); 1021 DBG("Adding extra blending step %d --> %d (%s --> %s)", in->id, out->id,
1022 in->alpha_only ? "Alpha" : "RGBA",
1023 out->alpha_only ? "Alpha" : "RGBA");
1021 blur_out = evas_filter_temporary_buffer_get(ctx, 0, 0, in->alpha_only); 1024 blur_out = evas_filter_temporary_buffer_get(ctx, 0, 0, in->alpha_only);
1022 if (!blur_out) goto fail; 1025 if (!blur_out) goto fail;
1023 blend = EINA_TRUE; 1026 blend = EINA_TRUE;