summaryrefslogtreecommitdiff
path: root/src/lib/evas/canvas
diff options
context:
space:
mode:
authorAmitesh Singh <amitesh.sh@samsung.com>2017-09-25 20:20:19 +0900
committerAmitesh Singh <amitesh.sh@samsung.com>2017-09-25 20:20:19 +0900
commitf1dd5afeaf925568ea3acc4a620418230d794cf9 (patch)
tree27988150918f1a34f470468697ead1726744a24b /src/lib/evas/canvas
parent2dac4a4efe1957b49b8c132c4f4d9704c751b52a (diff)
downloadefl-devs/ami/img_load_status.tar.gz
Diffstat (limited to 'src/lib/evas/canvas')
-rw-r--r--src/lib/evas/canvas/efl_canvas_image.c13
-rw-r--r--src/lib/evas/canvas/efl_canvas_image.eo1
-rw-r--r--src/lib/evas/canvas/evas_image_private.h2
3 files changed, 15 insertions, 1 deletions
diff --git a/src/lib/evas/canvas/efl_canvas_image.c b/src/lib/evas/canvas/efl_canvas_image.c
index 1694d47ae5..4c6c8ac1fe 100644
--- a/src/lib/evas/canvas/efl_canvas_image.c
+++ b/src/lib/evas/canvas/efl_canvas_image.c
@@ -174,7 +174,8 @@ _evas_image_load_async_start(Eo *eo_obj)
{
Evas_Object_Protected_Data *obj = efl_data_scope_get(eo_obj, EFL_CANVAS_OBJECT_CLASS);
Evas_Image_Data *o = efl_data_scope_get(eo_obj, EFL_CANVAS_IMAGE_INTERNAL_CLASS);
-
+
+ o->load_state = EFL_IMAGE_LOAD_STATE_PENDING;
evas_object_async_block(obj);
_image_preload_internal(eo_obj, o, EINA_FALSE);
}
@@ -193,6 +194,7 @@ _evas_image_load_async_cancel(Eo *eo_obj)
evas_object_async_block(obj);
_image_preload_internal(eo_obj, o, EINA_TRUE);
+ o->load_state = EFL_IMAGE_LOAD_STATE_CANCELLED;
}
EOLIAN static void
@@ -762,6 +764,15 @@ _efl_canvas_image_efl_gfx_buffer_buffer_copy_set(Eo *eo_obj, void *_pd EINA_UNUS
return _image_pixels_set(obj, o, slice, size.w, size.h, stride, cspace, plane, EINA_TRUE);
}
+EOLIAN Efl_Image_Load_State
+_efl_canvas_image_efl_image_load_load_state_get(Eo *eo_obj, void *pd EINA_UNUSED)
+{
+ //Evas_Object_Protected_Data *obj = efl_data_scope_get(eo_obj, EFL_CANVAS_OBJECT_CLASS);
+ Evas_Image_Data *o = efl_data_scope_get(eo_obj, EFL_CANVAS_IMAGE_INTERNAL_CLASS);
+
+ return o->load_state;
+}
+
EOLIAN static Eina_Slice
_efl_canvas_image_efl_gfx_buffer_buffer_managed_get(Eo *eo_obj, void *_pd EINA_UNUSED EINA_UNUSED,
int plane)
diff --git a/src/lib/evas/canvas/efl_canvas_image.eo b/src/lib/evas/canvas/efl_canvas_image.eo
index dc23c8abc5..759612b8ed 100644
--- a/src/lib/evas/canvas/efl_canvas_image.eo
+++ b/src/lib/evas/canvas/efl_canvas_image.eo
@@ -34,5 +34,6 @@ class Efl.Canvas.Image (Efl.Canvas.Image.Internal, Efl.Gfx.Buffer,
Efl.Image.Load.load_skip_header { get; set; }
Efl.Image.Load.load_region { get; set; }
Efl.Image.Load.load_region_support { get; }
+ Efl.Image.Load.load_state { get; }
}
}
diff --git a/src/lib/evas/canvas/evas_image_private.h b/src/lib/evas/canvas/evas_image_private.h
index b4299eb920..3f65e143af 100644
--- a/src/lib/evas/canvas/evas_image_private.h
+++ b/src/lib/evas/canvas/evas_image_private.h
@@ -124,6 +124,8 @@ struct _Evas_Image_Data
struct {
short w, h;
} file_size;
+
+ Efl_Image_Load_State load_state;
Eina_Bool changed : 1;
Eina_Bool dirty_pixels : 1;