This is an automated email from the git hooks/post-receive script.
git pushed a commit to branch master
in repository efl.
View the commit online.
commit 06274d1382d633ae43df16e5bcad03fb5942fcaf
Author: Cedric BAIL <[email protected]>
AuthorDate: Sat Nov 28 15:03:53 2026 -0600
evas/filters: honor padding_set on unscaled images
A filled image drawn at its size gives its own pixels to the filter,
which left no room for the padding a program forces: padding_set did
nothing there, while it applied to a scaled image. Such an image is now
rendered inside the padding.
The padding a blur asks for keeps not applying to them, so that they
look as before.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
---
src/lib/evas/canvas/evas_object_image.c | 5 ++++-
src/lib/evas/filters/evas_filter.c | 6 ++++++
src/lib/evas/filters/evas_filter_parser.c | 1 +
src/lib/evas/filters/evas_filter_private.h | 1 +
src/lib/evas/include/evas_filter.h | 1 +
5 files changed, 13 insertions(+), 1 deletion(-)
diff --git a/src/lib/evas/canvas/evas_object_image.c b/src/lib/evas/canvas/evas_object_image.c
index 7502cfa2b2..ccb047c681 100644
--- a/src/lib/evas/canvas/evas_object_image.c
+++ b/src/lib/evas/canvas/evas_object_image.c
@@ -2274,7 +2274,10 @@ _efl_canvas_image_internal_efl_canvas_filter_internal_filter_input_render(
H = obj->cur->geometry.h;
// FIXME: In GL we could use the image even if scaled
- if (!(ENFN->image_native_get && ENFN->image_native_get(engine, o->engine_data)) &&
+ // Its own pixels can not be the input of a program which forces a padding
+ // around them. The padding a blur asks for leaves them whole, as before.
+ if (!((l || r || t || b) && evas_filter_context_padding_forced(filter)) &&
+ !(ENFN->image_native_get && ENFN->image_native_get(engine, o->engine_data)) &&
!_image_has_border(obj, o) && _image_is_filled(obj, o) && !_image_is_scaled(obj, o) &&
!_image_state_has_crop(o->cur))
{
diff --git a/src/lib/evas/filters/evas_filter.c b/src/lib/evas/filters/evas_filter.c
index 20cada3df5..5dc1a82376 100644
--- a/src/lib/evas/filters/evas_filter.c
+++ b/src/lib/evas/filters/evas_filter.c
@@ -568,6 +568,12 @@ _filter_buffer_get(Evas_Filter_Context *ctx, int bufid)
return NULL;
}
+Eina_Bool
+evas_filter_context_padding_forced(const Evas_Filter_Context *ctx)
+{
+ return ctx->pad.set;
+}
+
/* A program which never reads its input gets no buffer for it */
Eina_Bool
evas_filter_context_input_used(Evas_Filter_Context *ctx)
diff --git a/src/lib/evas/filters/evas_filter_parser.c b/src/lib/evas/filters/evas_filter_parser.c
index 6fd05f7652..5da1e5a676 100644
--- a/src/lib/evas/filters/evas_filter_parser.c
+++ b/src/lib/evas/filters/evas_filter_parser.c
@@ -3655,6 +3655,7 @@ evas_filter_context_program_use(void *engine, void *output,
// Compute and save padding info
evas_filter_program_padding_get(pgm, &ctx->pad.final, &ctx->pad.calculated);
+ ctx->pad.set = pgm->padding_set;
dc = ENFN->context_new(engine);
ENFN->context_color_set(engine, dc, 255, 255, 255, 255);
diff --git a/src/lib/evas/filters/evas_filter_private.h b/src/lib/evas/filters/evas_filter_private.h
index 9b3b3c9a49..dc6837bb71 100644
--- a/src/lib/evas/filters/evas_filter_private.h
+++ b/src/lib/evas/filters/evas_filter_private.h
@@ -132,6 +132,7 @@ struct _Evas_Filter_Context
struct {
// Padding in the current input/output buffers
Evas_Filter_Padding calculated, final;
+ Eina_Bool set; // the program forces the final one
} pad;
struct {
diff --git a/src/lib/evas/include/evas_filter.h b/src/lib/evas/include/evas_filter.h
index 7d4a360ed9..e2847854dd 100644
--- a/src/lib/evas/include/evas_filter.h
+++ b/src/lib/evas/include/evas_filter.h
@@ -130,6 +130,7 @@ Evas_Filter_Context *evas_filter_context_new(Evas_Public_Data *evas, Eina_Bo
void *evas_filter_context_data_get(Evas_Filter_Context *ctx);
Eina_Bool evas_filter_context_async_get(Evas_Filter_Context *ctx);
Eina_Bool evas_filter_context_input_used(Evas_Filter_Context *ctx);
+Eina_Bool evas_filter_context_padding_forced(const Evas_Filter_Context *ctx);
void evas_filter_context_size_get(Evas_Filter_Context *ctx, int *w, int *H);
int evas_filter_context_ref(Evas_Filter_Context *ctx);
void evas_filter_context_unref(Evas_Filter_Context *ctx);
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.