aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJean-Philippe Andre <jp.andre@samsung.com>2014-02-18 17:01:54 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2014-02-20 13:27:42 +0900
commitddf267e50695770801ef2d627dd590db8c91759e (patch)
treebae6c48726dcb27663df0bf6aba3269a2a9ac08f /src
parentEvas filters: Mark parser functions as EAPI for tests (diff)
downloadefl-ddf267e50695770801ef2d627dd590db8c91759e.tar.gz
Evas filters: Fix padding in blur filter
The wrong value was used for the command's padding. Also, remove mention of "motion" blur which is not implemented.
Diffstat (limited to 'src')
-rw-r--r--src/lib/evas/filters/evas_filter_parser.c52
1 files changed, 19 insertions, 33 deletions
diff --git a/src/lib/evas/filters/evas_filter_parser.c b/src/lib/evas/filters/evas_filter_parser.c
index 01ff619b95..3dfc423946 100644
--- a/src/lib/evas/filters/evas_filter_parser.c
+++ b/src/lib/evas/filters/evas_filter_parser.c
@@ -1017,14 +1017,13 @@ _blur_padding_update(Evas_Filter_Program *pgm, Evas_Filter_Instruction *instr,
{
Eina_Bool yset;
int rx, ry, ox, oy, l, r, t, b;
- const char *typestr, *inbuf, *outbuf;
+ const char *inbuf, *outbuf;
Buffer *in, *out;
rx = _instruction_param_geti(instr, "rx", NULL);
ry = _instruction_param_geti(instr, "ry", &yset);
ox = _instruction_param_geti(instr, "ox", NULL);
oy = _instruction_param_geti(instr, "oy", NULL);
- typestr = _instruction_param_gets(instr, "type", NULL);
inbuf = _instruction_param_gets(instr, "src", NULL);
outbuf = _instruction_param_gets(instr, "dst", NULL);
@@ -1033,37 +1032,24 @@ _blur_padding_update(Evas_Filter_Program *pgm, Evas_Filter_Instruction *instr,
EINA_SAFETY_ON_NULL_RETURN(in);
EINA_SAFETY_ON_NULL_RETURN(out);
- if (typestr && !strcasecmp(typestr, "motion"))
- {
- CRI("Motion blur not implemented yet!");
- /*
- instr->pad.l = (rx < 0) ? (-rx) : 0;
- instr->pad.r = (rx > 0) ? (rx) : 0;
- instr->pad.t = (ry < 0) ? (-ry) : 0;
- instr->pad.b = (ry > 0) ? (ry) : 0;
- */
- }
- else
- {
- if (!yset) ry = rx;
- if (rx < 0) rx = 0;
- if (ry < 0) ry = 0;
-
- l = rx + in->pad.l - ox;
- r = rx + in->pad.r + ox;
- t = ry + in->pad.t - oy;
- b = ry + in->pad.b + oy;
-
- if (out->pad.l < l) out->pad.l = l;
- if (out->pad.r < r) out->pad.r = r;
- if (out->pad.t < t) out->pad.t = t;
- if (out->pad.b < b) out->pad.b = b;
-
- if (padl) *padl = rx - ox;
- if (padr) *padr = rx + ox;
- if (padt) *padt = ry - oy;
- if (padb) *padb = ry + oy;
- }
+ if (!yset) ry = rx;
+ if (rx < 0) rx = 0;
+ if (ry < 0) ry = 0;
+
+ l = rx + in->pad.l - ox;
+ r = rx + in->pad.r + ox;
+ t = ry + in->pad.t - oy;
+ b = ry + in->pad.b + oy;
+
+ if (out->pad.l < l) out->pad.l = l;
+ if (out->pad.r < r) out->pad.r = r;
+ if (out->pad.t < t) out->pad.t = t;
+ if (out->pad.b < b) out->pad.b = b;
+
+ if (padl) *padl = l;
+ if (padr) *padr = r;
+ if (padt) *padt = t;
+ if (padb) *padb = b;
}
/**