From d4e713a18c07f9f5b819d863373402a2b96ca522 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Andre Date: Mon, 21 Mar 2016 15:38:19 +0900 Subject: [PATCH] Evas.Image: Move stride.get away from Evas.Image stride does not apply to all image objects, eg. proxies or 3d scenes. it will be implemented by the classes that support stride and pixel data access --- src/lib/evas/canvas/evas_image.eo | 1 - src/lib/evas/canvas/evas_image_legacy.c | 3 ++- src/lib/evas/canvas/evas_object_image.c | 6 ------ 3 files changed, 2 insertions(+), 8 deletions(-) diff --git a/src/lib/evas/canvas/evas_image.eo b/src/lib/evas/canvas/evas_image.eo index 5fe400a..b4f4f3c 100644 --- a/src/lib/evas/canvas/evas_image.eo +++ b/src/lib/evas/canvas/evas_image.eo @@ -67,7 +67,6 @@ class Evas.Image (Evas.Object, Evas.Filter, Efl.Gfx.Buffer.alpha.get; Efl.Gfx.Buffer.alpha.set; Efl.Gfx.Buffer.buffer_update_add; - Efl.Gfx.Buffer.stride.get; Efl.Gfx.Buffer.colorspace.get; Efl.Gfx.Buffer.buffer_get; Efl.Gfx.Buffer.buffer_set; diff --git a/src/lib/evas/canvas/evas_image_legacy.c b/src/lib/evas/canvas/evas_image_legacy.c index 01c9353..80d9a0f 100644 --- a/src/lib/evas/canvas/evas_image_legacy.c +++ b/src/lib/evas/canvas/evas_image_legacy.c @@ -157,7 +157,8 @@ EAPI int evas_object_image_stride_get(const Evas_Object *obj) { EVAS_IMAGE_API(obj, 0); - return efl_gfx_buffer_stride_get(obj); + Evas_Image_Data *o = eo_data_scope_get(eo_obj, EVAS_IMAGE_CLASS); + return o->cur->image.stride; } EAPI void diff --git a/src/lib/evas/canvas/evas_object_image.c b/src/lib/evas/canvas/evas_object_image.c index 7e05c53..959d08e 100644 --- a/src/lib/evas/canvas/evas_object_image.c +++ b/src/lib/evas/canvas/evas_object_image.c @@ -622,12 +622,6 @@ _evas_image_efl_gfx_view_view_size_get(Eo *eo_obj, Evas_Image_Data *o, int *w, i if (h) *h = uvh; } -EOLIAN static int -_evas_image_efl_gfx_buffer_stride_get(Eo *eo_obj EINA_UNUSED, Evas_Image_Data *o) -{ - return o->cur->image.stride; -} - EOLIAN static void _evas_image_efl_gfx_buffer_buffer_update_add(Eo *eo_obj, Evas_Image_Data *o, int x, int y, int w, int h) { -- 2.7.4