This is an automated email from the git hooks/post-receive script.
git pushed a commit to reference refs/pull/285/head
in repository efl.
View the commit online.
commit e58a7c3e649d53011e0f1abbf29eb83dddcea1f6
Author: Cedric BAIL <[email protected]>
AuthorDate: Sat Nov 28 13:34:48 2026 -0600
evas/gl: draw an offset blur where it was asked
The GL blur filter cut the destination rectangle to the buffer and the
source to match, then drew to the uncut destination. With an offset,
as of a drop shadow, the cut source was stretched over it: an offset
of (8, 6) put a 3px blur at about (11, 7.5). Radii large enough to be
downscaled applied the offset when scaling back and were right.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
---
.../evas/engines/gl_generic/filters/gl_filter_blur.c | 5 ++++-
src/tests/evas/evas_test_filters.c | 16 ++++++++++++++++
2 files changed, 20 insertions(+), 1 deletion(-)
diff --git a/src/modules/evas/engines/gl_generic/filters/gl_filter_blur.c b/src/modules/evas/engines/gl_generic/filters/gl_filter_blur.c
index 758dea321f..1c052deb7c 100644
--- a/src/modules/evas/engines/gl_generic/filters/gl_filter_blur.c
+++ b/src/modules/evas/engines/gl_generic/filters/gl_filter_blur.c
@@ -261,7 +261,10 @@ _gl_filter_blur(Render_Engine_GL_Generic *re, Evas_Filter_Command *cmd)
ssw = ((double)sw * (double)(nw)) / (double)(dw);
ssh = ((double)sh * (double)(nh)) / (double)(dh);
- evas_gl_common_filter_blur_push(gc, image->tex, ssx, ssy, ssw, ssh, dx, dy, dw, dh,
+ if ((nw <= 0) || (nh <= 0)) continue;
+
+ /* the source was cut to what lands in the destination: draw there */
+ evas_gl_common_filter_blur_push(gc, image->tex, ssx, ssy, ssw, ssh, nx, ny, nw, nh,
weights, offsets, count, radius, horiz,
cmd->draw.alphaonly ||
cmd->output->alpha_only);
diff --git a/src/tests/evas/evas_test_filters.c b/src/tests/evas/evas_test_filters.c
index 490565f70f..2b0599b5da 100644
--- a/src/tests/evas/evas_test_filters.c
+++ b/src/tests/evas/evas_test_filters.c
@@ -1073,6 +1073,21 @@ EFL_START_TEST(evas_filter_gl_color_glyphs)
}
EFL_END_TEST
+/* A blur with an offset, as of a drop shadow, lands where software puts it */
+EFL_START_TEST(evas_filter_gl_blur_offset)
+{
+ static const Gl_Case cases[] = {
+ { "blur { 2, ox = 20, oy = 12, color = 'black' }", NULL },
+ { "blur { rx = 3, ry = 0, ox = -20, color = 'black' }", NULL },
+ { "blur { rx = 0, ry = 3, oy = -12, color = 'black' }", NULL },
+ { "blur { 3, ox = 20, oy = 12, color = '#0008' }", NULL },
+ { "blur { 12, ox = 20, oy = 12, color = 'black' }", NULL },
+ };
+
+ _gl_cases_check(cases, EINA_C_ARRAY_LENGTH(cases));
+}
+EFL_END_TEST
+
void evas_test_filters(TCase *tc)
{
tcase_add_test(tc, evas_filter_parser);
@@ -1090,5 +1105,6 @@ void evas_test_filters(TCase *tc)
tcase_add_test(tc, evas_filter_gl_inverse_color);
tcase_add_test(tc, evas_filter_gl_alpha_writes);
tcase_add_test(tc, evas_filter_gl_blur_width);
+ tcase_add_test(tc, evas_filter_gl_blur_offset);
}
}
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.