path: root/src/lib/evas/include
diff options
authorHermet Park <>2018-09-03 15:19:02 +0900
committerHermet Park <>2018-09-03 17:12:55 +0900
commit423d8a22961436299df0feca17b03544678b8c0f (patch)
tree6a0155fa02da114802d671cd96fd43c427b0a555 /src/lib/evas/include
parent4e0b2c2fff72706d302363a604428e5b5342caf9 (diff)
evas image: fix a bug in image preloading.
Summary: Current preloading is too buggy since it's on thread-based. This is a fundamental improvement to fix a bug. The critical issue here is, When preloading img object suddenly cancel its preloading, the object possibly cannot render image next then because renderer doesn't have any idea when async cancelling is finished. Renderer just tries to render regardless of image loading status, and this could occur no-texture(in gl case) image object. So, here improvement is, adding a notification for async cancelled so that putting img objects to redraw images properly after their preloading is cancelled. The best scenario to reproduce this bug is this one. Evas_Object *img2 = evas_object_image_filled_add(evas); evas_object_image_file_set(img2, "test.jpg", NULL); evas_object_image_preload(img2, EINA_FALSE); evas_object_resize(img2, 200, 200); evas_object_show(img2); Evas_Object *img = evas_object_image_filled_add(evas); evas_object_image_file_set(img, "test.jpg", NULL); evas_object_image_preload(img, EINA_FALSE); evas_object_move(img, 200, 200); evas_object_resize(img, 200, 200); evas_object_show(img); evas_object_image_preload(img2, EINA_TRUE); If you run this on gl backend, occasionally happens rendering fail. Yet there other bugs on preloading feature.... @fix Reviewers: #committers, raster Subscribers: cedric, #reviewers, #committers, zmike Tags: #efl Differential Revision:
Diffstat (limited to 'src/lib/evas/include')
2 files changed, 3 insertions, 4 deletions
diff --git a/src/lib/evas/include/evas_common_private.h b/src/lib/evas/include/evas_common_private.h
index ef85db5a6a..e51e60d4f9 100644
--- a/src/lib/evas/include/evas_common_private.h
+++ b/src/lib/evas/include/evas_common_private.h
@@ -556,7 +556,8 @@ struct _Evas_Cache_Target
556 void *data; 556 void *data;
557 void (*preloaded_cb) (void *data); //Call when preloading done. 557 void (*preloaded_cb) (void *data); //Call when preloading done.
558 void *preloaded_data; 558 void *preloaded_data;
559 Eina_Bool delete_me; 559 Eina_Bool delete_me : 1;
560 Eina_Bool preload_cancel : 1;
560}; 561};
561 562
562struct _Image_Timestamp 563struct _Image_Timestamp
diff --git a/src/lib/evas/include/evas_private.h b/src/lib/evas/include/evas_private.h
index 9b5a7a2119..76bb46cfa2 100644
--- a/src/lib/evas/include/evas_private.h
+++ b/src/lib/evas/include/evas_private.h
@@ -1346,7 +1346,7 @@ struct _Evas_Func
1346 void *(*image_data_put) (void *engine, void *image, DATA32 *image_data); 1346 void *(*image_data_put) (void *engine, void *image, DATA32 *image_data);
1347 Eina_Bool (*image_data_direct_get) (void *engine, void *image, int plane, Eina_Slice *slice, Evas_Colorspace *cspace, Eina_Bool load); 1347 Eina_Bool (*image_data_direct_get) (void *engine, void *image, int plane, Eina_Slice *slice, Evas_Colorspace *cspace, Eina_Bool load);
1348 void (*image_data_preload_request) (void *engine, void *image, const Eo *target); 1348 void (*image_data_preload_request) (void *engine, void *image, const Eo *target);
1349 void (*image_data_preload_cancel) (void *engine, void *image, const Eo *target); 1349 void (*image_data_preload_cancel) (void *engine, void *image, const Eo *target, Eina_Bool force);
1350 void *(*image_alpha_set) (void *engine, void *image, int has_alpha); 1350 void *(*image_alpha_set) (void *engine, void *image, int has_alpha);
1351 int (*image_alpha_get) (void *engine, void *image); 1351 int (*image_alpha_get) (void *engine, void *image);
1352 void *(*image_orient_set) (void *engine, void *image, Evas_Image_Orient orient); 1352 void *(*image_orient_set) (void *engine, void *image, Evas_Image_Orient orient);
@@ -1598,8 +1598,6 @@ const Evas_Smart_Cb_Description *evas_smart_cb_description_find(const Evas_Smart
1598 1598
1599Evas_Object *_evas_object_image_source_get(Evas_Object *obj); 1599Evas_Object *_evas_object_image_source_get(Evas_Object *obj);
1600Eina_Bool _evas_object_image_preloading_get(const Evas_Object *obj); 1600Eina_Bool _evas_object_image_preloading_get(const Evas_Object *obj);
1601void _evas_object_image_preloading_set(Evas_Object *obj, Eina_Bool preloading);
1602void _evas_object_image_preloading_check(Evas_Object *obj);
1603Evas_Object *_evas_object_image_video_parent_get(Evas_Object *obj); 1601Evas_Object *_evas_object_image_video_parent_get(Evas_Object *obj);
1604void _evas_object_image_video_overlay_show(Evas_Object *obj); 1602void _evas_object_image_video_overlay_show(Evas_Object *obj);
1605void _evas_object_image_video_overlay_hide(Evas_Object *obj); 1603void _evas_object_image_video_overlay_hide(Evas_Object *obj);