return EINA_TRUE;
}
+static Eina_Bool
+_map_source_image_is_valid(Evas_Object *eo_obj, Evas_Object *src_img, int w, int h)
+{
+ Evas_Object_Protected_Data *obj;
+ Evas_Object_Protected_Data *src;
+
+ if (w == 0 || h == 0) return EINA_FALSE;
+
+ obj = efl_data_scope_get(eo_obj, EFL_CANVAS_OBJECT_CLASS);
+ src = efl_data_scope_get(src_img, EFL_CANVAS_OBJECT_CLASS);
+
+ if (obj->cur->geometry.w != src->cur->geometry.w ||
+ obj->cur->geometry.h != src->cur->geometry.h ) return EINA_FALSE;
+
+ return EINA_TRUE;
+}
+
static void
_map_direct_render(Evas_Public_Data *evas, void *ctx, Evas_Object *src_img,
int w, int h, Evas_Object_Protected_Data *obj,
{
evas_object_image_size_get(direct_render_src_img,
&src_img_w, &src_img_h);
- if (src_img_w == 0 || src_img_h == 0)
+ if (!_map_source_image_is_valid(eo_obj, direct_render_src_img,
+ src_img_w, src_img_h))
{
direct_render_src_img = NULL;
}