This is an automated email from the git hooks/post-receive script.
git pushed a commit to branch fix/gl-filter-buffers
in repository efl.
View the commit online.
commit 15c4acbf5f7570ca150d13d8d6c5b74e591907ec
Author: Cedric BAIL <[email protected]>
AuthorDate: Sat Nov 28 14:09:41 2026 -0600
evas/filters: keep software fills inside the buffer
On an RGBA buffer the software fill added its top margin twice: it
started that many rows too low and wrote past the end of the buffer
when the margin reached the second half. Margins wider than the buffer
gave a negative size, used as a length.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
---
.../evas/engines/software_generic/filters/evas_filter_fill.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/src/modules/evas/engines/software_generic/filters/evas_filter_fill.c b/src/modules/evas/engines/software_generic/filters/evas_filter_fill.c
index 6460b861e1..7ac742b787 100644
--- a/src/modules/evas/engines/software_generic/filters/evas_filter_fill.c
+++ b/src/modules/evas/engines/software_generic/filters/evas_filter_fill.c
@@ -27,10 +27,13 @@ _fill_cpu(Evas_Filter_Command *cmd)
{
x = MAX(0, cmd->draw.clip.l);
y = MAX(0, cmd->draw.clip.t);
- w = CLAMP(0, fb->w - x - cmd->draw.clip.r, fb->w - x);
- h = CLAMP(0, fb->h - y - cmd->draw.clip.b, fb->h - y);
+ w = fb->w - x - MAX(0, cmd->draw.clip.r);
+ h = fb->h - y - MAX(0, cmd->draw.clip.b);
}
+ /* margins may leave nothing of the buffer */
+ if ((w <= 0) || (h <= 0)) return EINA_TRUE;
+
map = _buffer_map_all(fb->buffer, &len, E_WRITE, fb->alpha_only ? E_ALPHA : E_ARGB, &stride);
if (!map) return EINA_FALSE;
@@ -47,7 +50,7 @@ _fill_cpu(Evas_Filter_Command *cmd)
{
for (k = 0; k < h; k++)
{
- uint32_t *dst = ((uint32_t *) (ptr + (y + k) * stride)) + x;
+ uint32_t *dst = ((uint32_t *) (ptr + k * stride)) + x;
draw_memset32(dst, color, w);
}
}
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.