This is an automated email from the git hooks/post-receive script.
git pushed a commit to branch perf/map-span-simd
in repository efl.
View the commit online.
commit fcd5d33b0ae753eea127eff35051c40badd1f5b1
Author: Cedric BAIL <[email protected]>
AuthorDate: Sat Nov 28 21:50:57 2026 -0600
evas/map: draw prepared spans without a clip
When the draw context has neither a clip nor cutouts,
evas_common_map_rgba_prepare() keeps one set of spans and no rectangles,
and evas_common_map_rgba_do() then read the rectangles through a NULL
pointer.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
---
src/lib/evas/common/evas_map_image.c | 4 ++--
src/tests/evas/evas_test_map_prepare.c | 8 +++++---
2 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/src/lib/evas/common/evas_map_image.c b/src/lib/evas/common/evas_map_image.c
index 63b10ad391..ec8affb277 100644
--- a/src/lib/evas/common/evas_map_image.c
+++ b/src/lib/evas/common/evas_map_image.c
@@ -1176,8 +1176,8 @@ evas_common_map_rgba_do(const Eina_Rectangle *clip,
spans = m->engine_data;
rects = spans->rects;
- if (rects->active == 0 &&
- spans->count == 1)
+ /* without a clip or cutouts, prepare keeps no rectangles */
+ if ((!rects) || ((rects->active == 0) && (spans->count == 1)))
{
evas_common_draw_context_set_clip(dc, clip->x, clip->y, clip->w, clip->h);
#ifdef BUILD_MMX
diff --git a/src/tests/evas/evas_test_map_prepare.c b/src/tests/evas/evas_test_map_prepare.c
index be00a6b09f..787a5fa961 100644
--- a/src/tests/evas/evas_test_map_prepare.c
+++ b/src/tests/evas/evas_test_map_prepare.c
@@ -23,14 +23,16 @@ typedef struct
int src_w, src_h;
int u, v; /* bottom right source corner, may be outside */
int dst_w, dst_h;
+ Eina_Bool clip;
} Test_Case;
static const Test_Case cases[] =
{
/* a v between the width and the height is inside a tall image */
- { "top half of a tall image", 8, 32, 8, 16, 8, 16 },
+ { "top half of a tall image", 8, 32, 8, 16, 8, 16, EINA_TRUE },
/* and one between the height and the width is outside a wide one */
- { "v past the bottom of a wide image", 32, 8, 16, 12, 16, 8 },
+ { "v past the bottom of a wide image", 32, 8, 16, 12, 16, 8, EINA_TRUE },
+ { "no clip on the draw context", 16, 16, 16, 16, 16, 16, EINA_FALSE },
};
/* different for every source pixel */
@@ -76,7 +78,7 @@ _run(const Test_Case *tc)
for (x = 0; x < tc->src_w; x++)
src->image.data[(y * tc->src_w) + x] = _src_pixel(x, y);
- evas_common_draw_context_set_clip(dc, 0, 0, DST, DST);
+ if (tc->clip) evas_common_draw_context_set_clip(dc, 0, 0, DST, DST);
m->count = 4;
for (i = 0; i < 4; i++)
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.