From: Yeongjong Lee Date: Thu, 28 May 2020 07:17:58 +0000 (+0900) Subject: efl_ui_bg: disable preloading of the internal image X-Git-Tag: accepted/tizen/unified/20200604.164556~55 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e361ecdbf84f5c9ff0d861a9b2d5ca9ec5adce00;p=platform%2Fupstream%2Fefl.git 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 --- diff --git a/src/lib/elementary/efl_ui_bg.c b/src/lib/elementary/efl_ui_bg.c index 050769b..225cb85 100644 --- a/src/lib/elementary/efl_ui_bg.c +++ b/src/lib/elementary/efl_ui_bg.c @@ -189,7 +189,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