hermet pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=92455d42a063229338247a3b21ba0c4a06d43bfe

commit 92455d42a063229338247a3b21ba0c4a06d43bfe
Author: Yeongjong Lee <yj34....@samsung.com>
Date:   Thu May 28 16:17:58 2020 +0900

    efl_ui_bg: disable preloading of the internal image
    
    Summary:
    preloading is elm_image feature. it is better to disable preloading for 
elm_bg
    becuase there is no way to disable preloading of internal image in elm_bg.
    If API user want to use preloaded image, elm_image is recommended instead of
    elm_bg.
    
    Test Plan: elm_bg_file_set with big image.
    
    Reviewers: Hermet
    
    Reviewed By: Hermet
    
    Subscribers: cedric, #reviewers, #committers
    
    Tags: #efl
    
    Differential Revision: https://phab.enlightenment.org/D11898
---
 src/lib/elementary/efl_ui_bg.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/lib/elementary/efl_ui_bg.c b/src/lib/elementary/efl_ui_bg.c
index 51b12158db..56ccdbd72f 100644
--- a/src/lib/elementary/efl_ui_bg.c
+++ b/src/lib/elementary/efl_ui_bg.c
@@ -187,7 +187,11 @@ elm_bg_load_size_set(Evas_Object *obj, int w, int h)
 EAPI Eina_Bool
 elm_bg_file_set(Eo *obj, const char *file, const char *group)
 {
-   return efl_file_simple_load((Eo *) obj, file, group);
+   EFL_UI_BG_DATA_GET_OR_RETURN_VAL(obj, sd, EINA_FALSE);
+   Eina_Bool ret = efl_file_simple_load((Eo *) obj, file, group);
+   if (ret) elm_image_preload_disabled_set(sd->img, EINA_TRUE);
+
+   return ret;
 }
 
 EOLIAN static Eina_Error

-- 


Reply via email to