summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJean-Philippe Andre <jp.andre@samsung.com>2014-03-21 12:04:35 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2014-03-21 15:23:02 +0900
commiteee3c1c77389f6ee0dc0bf067c594335eba2d303 (patch)
treed3f75fce1adfb0a5222ea2d4cc498c7a6b154f49 /src
parent91a471b4dc72cdb621f782b54eba21188989f402 (diff)
Evas filters: Allow BLUR and GROW with radius 0
Fallback to a standard blend instruction instead of failing miserably just because the radius is 0.
Diffstat (limited to 'src')
-rw-r--r--src/lib/evas/filters/evas_filter.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/lib/evas/filters/evas_filter.c b/src/lib/evas/filters/evas_filter.c
index 16cc920..0c6c40f 100644
--- a/src/lib/evas/filters/evas_filter.c
+++ b/src/lib/evas/filters/evas_filter.c
@@ -914,7 +914,11 @@ evas_filter_command_blur_add(Evas_Filter_Context *ctx, void *drawctx,
914 914
915 if (dx < 0) dx = 0; 915 if (dx < 0) dx = 0;
916 if (dy < 0) dy = 0; 916 if (dy < 0) dy = 0;
917 if (!dx && !dy) goto fail; 917 if (!dx && !dy)
918 {
919 DBG("Changing 0px blur into simple blend");
920 return evas_filter_command_blend_add(ctx, drawctx, inbuf, outbuf, ox, oy, EVAS_FILTER_FILL_MODE_NONE);
921 }
918 922
919 in = _filter_buffer_get(ctx, inbuf); 923 in = _filter_buffer_get(ctx, inbuf);
920 if (!in) 924 if (!in)
@@ -1213,6 +1217,12 @@ evas_filter_command_grow_add(Evas_Filter_Context *ctx, void *draw_context,
1213 1217
1214 EINA_SAFETY_ON_NULL_RETURN_VAL(ctx, -1); 1218 EINA_SAFETY_ON_NULL_RETURN_VAL(ctx, -1);
1215 1219
1220 if (!radius)
1221 {
1222 DBG("Changing 0px grow into simple blend");
1223 return evas_filter_command_blend_add(ctx, draw_context, inbuf, outbuf, 0, 0, EVAS_FILTER_FILL_MODE_NONE);
1224 }
1225
1216 in = _filter_buffer_get(ctx, inbuf); 1226 in = _filter_buffer_get(ctx, inbuf);
1217 EINA_SAFETY_ON_NULL_RETURN_VAL(in, -1); 1227 EINA_SAFETY_ON_NULL_RETURN_VAL(in, -1);
1218 1228