Evas.Image: Move stride.get away from Evas.Image
authorJean-Philippe Andre <jp.andre@samsung.com>
Mon, 21 Mar 2016 06:38:19 +0000 (15:38 +0900)
committerJean-Philippe Andre <jp.andre@samsung.com>
Mon, 28 Mar 2016 07:40:01 +0000 (16:40 +0900)
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
src/lib/evas/canvas/evas_image_legacy.c
src/lib/evas/canvas/evas_object_image.c

index 5fe400a..b4f4f3c 100644 (file)
@@ -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;
index 01c9353..80d9a0f 100644 (file)
@@ -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
index 7e05c53..959d08e 100644 (file)
@@ -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)
 {