jpeg pushed a commit to branch master. http://git.enlightenment.org/core/efl.git/commit/?id=ccaf12e1b66b2b491fc9bd434f646528bff06526
commit ccaf12e1b66b2b491fc9bd434f646528bff06526 Author: Jean-Philippe Andre <[email protected]> Date: Mon Jun 20 14:11:32 2016 +0900 evas: Use efl_gfx APIs where appropriate This is a better fix than the previous patch, as it keeps the legacy API check. The point of that check is: if the object has been created with legacy API (evas_object_image_[filled_]add, then legacy APIs are allowed, otherwise they are disallowed. This means only EO APIs should be used on an eo_add() image object. --- src/lib/evas/canvas/evas_image_legacy.c | 2 +- src/lib/evas/canvas/evas_object_image.c | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/lib/evas/canvas/evas_image_legacy.c b/src/lib/evas/canvas/evas_image_legacy.c index 64efbf2..08c5b90 100644 --- a/src/lib/evas/canvas/evas_image_legacy.c +++ b/src/lib/evas/canvas/evas_image_legacy.c @@ -4,7 +4,7 @@ #include "evas_image.eo.h" #define EVAS_IMAGE_API(_o, ...) do { \ - if (EINA_UNLIKELY(!eo_isa(_o, EFL_CANVAS_IMAGE_INTERNAL_CLASS))) { \ + if (EINA_UNLIKELY(!eo_isa(_o, EVAS_IMAGE_CLASS))) { \ EINA_SAFETY_ERROR("object is not an image!"); \ return __VA_ARGS__; \ } } while (0) diff --git a/src/lib/evas/canvas/evas_object_image.c b/src/lib/evas/canvas/evas_object_image.c index d179581..03aa933 100644 --- a/src/lib/evas/canvas/evas_object_image.c +++ b/src/lib/evas/canvas/evas_object_image.c @@ -564,8 +564,8 @@ _efl_canvas_image_internal_efl_gfx_fill_fill_auto_set(Eo *eo_obj, Evas_Image_Dat { Evas_Coord w, h; - evas_object_geometry_get(eo_obj, NULL, NULL, &w, &h); - evas_object_image_fill_set(eo_obj, 0, 0, w, h); + efl_gfx_geometry_get(eo_obj, NULL, NULL, &w, &h); + efl_gfx_fill_set(eo_obj, 0, 0, w, h); evas_object_event_callback_add(eo_obj, EVAS_CALLBACK_RESIZE, evas_object_image_filled_resize_listener, @@ -777,7 +777,7 @@ _efl_canvas_image_internal_efl_gfx_buffer_alpha_set(Eo *eo_obj, Evas_Image_Data } o->written = EINA_TRUE; } - evas_object_image_data_update_add(eo_obj, 0, 0, o->cur->image.w, o->cur->image.h); + efl_gfx_buffer_update_add(eo_obj, 0, 0, o->cur->image.w, o->cur->image.h); EVAS_OBJECT_WRITE_IMAGE_FREE_FILE_AND_KEY(o); } @@ -3152,10 +3152,10 @@ evas_object_image_filled_resize_listener(void *data EINA_UNUSED, Evas *e EINA_UN { Evas_Coord w, h; - evas_object_geometry_get(obj, NULL, NULL, &w, &h); + efl_gfx_geometry_get(obj, NULL, NULL, &w, &h); if (w < 1) w = 1; if (h < 1) h = 1; - evas_object_image_fill_set(obj, 0, 0, w, h); + efl_gfx_fill_set(obj, 0, 0, w, h); } Eina_Bool --
