summaryrefslogtreecommitdiff
path: root/src/modules/evas/engines/software_generic/filters
diff options
context:
space:
mode:
authorJean-Philippe Andre <jp.andre@samsung.com>2017-03-28 14:44:17 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2017-04-14 11:26:44 +0900
commit06a7beec529d741d9060878ce1fb740cf57804ad (patch)
treec9341cca068989aea95ceda33c80c057cccddf25 /src/modules/evas/engines/software_generic/filters
parent408115cef6e2460bbf165f19ca6ef09eb1ec5532 (diff)
evas filters: Switch to uniforms in GL blur
This was a poor attempt at improving the performance but obviously the root cause isn't fixed (too many texel fetches). Uniform should (theoretically) work better than an attribute the for loop. Just a guess here. This also makes GL blur use a float value as radius, allowing future extension to non-integer blur radii, as well as using linear scaling as a fast blur approximation.
Diffstat (limited to 'src/modules/evas/engines/software_generic/filters')
-rw-r--r--src/modules/evas/engines/software_generic/filters/evas_filter_blur.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/modules/evas/engines/software_generic/filters/evas_filter_blur.c b/src/modules/evas/engines/software_generic/filters/evas_filter_blur.c
index e0822126a6..0ac1cb775c 100644
--- a/src/modules/evas/engines/software_generic/filters/evas_filter_blur.c
+++ b/src/modules/evas/engines/software_generic/filters/evas_filter_blur.c
@@ -231,7 +231,7 @@ _box_blur_apply(Evas_Filter_Command *cmd, Eina_Bool vert, Eina_Bool rgba)
231 int radius, regions, w, h; 231 int radius, regions, w, h;
232 void *src, *dst; 232 void *src, *dst;
233 233
234 radius = abs(vert ? cmd->blur.dy : cmd->blur.dx); 234 radius = abs(vert ? (int) cmd->blur.dy : (int) cmd->blur.dx);
235 src = _buffer_map_all(cmd->input->buffer, &src_len, E_READ, rgba ? E_ARGB : E_ALPHA, &src_stride); 235 src = _buffer_map_all(cmd->input->buffer, &src_len, E_READ, rgba ? E_ARGB : E_ALPHA, &src_stride);
236 dst = _buffer_map_all(cmd->output->buffer, &dst_len, E_WRITE, rgba ? E_ARGB : E_ALPHA, &dst_stride); 236 dst = _buffer_map_all(cmd->output->buffer, &dst_len, E_WRITE, rgba ? E_ARGB : E_ALPHA, &dst_stride);
237 if (!src || !dst) goto unmap; 237 if (!src || !dst) goto unmap;
@@ -386,7 +386,7 @@ _gaussian_blur_apply(Evas_Filter_Command *cmd, Eina_Bool vert, Eina_Bool rgba)
386 void *src, *dst; 386 void *src, *dst;
387 int *weights; 387 int *weights;
388 388
389 radius = abs(vert ? cmd->blur.dy : cmd->blur.dx); 389 radius = abs(vert ? (int) cmd->blur.dy : (int) cmd->blur.dx);
390 src = _buffer_map_all(cmd->input->buffer, &src_len, E_READ, rgba ? E_ARGB : E_ALPHA, &src_stride); 390 src = _buffer_map_all(cmd->input->buffer, &src_len, E_READ, rgba ? E_ARGB : E_ALPHA, &src_stride);
391 dst = _buffer_map_all(cmd->output->buffer, &dst_len, E_WRITE, rgba ? E_ARGB : E_ALPHA, &dst_stride); 391 dst = _buffer_map_all(cmd->output->buffer, &dst_len, E_WRITE, rgba ? E_ARGB : E_ALPHA, &dst_stride);
392 w = cmd->input->w; 392 w = cmd->input->w;