Add API for improving launching performance of 3rd party applications 13/166913/2
authorjiin.moon <jiin.moon@samsung.com>
Fri, 12 Jan 2018 11:30:18 +0000 (20:30 +0900)
committerGerrit Code Review <gerrit@review.ap-northeast-2.compute.internal>
Sat, 13 Jan 2018 11:19:10 +0000 (11:19 +0000)
from commit 5725823a79187b3c548ab120cd69b016cf5b6cd3

Change-Id: I7cc6648bf26dab07fb3993e592bab7a49931bfe5

src/lib/elementary/efl_ui_bg_widget.c
src/lib/elementary/efl_ui_win.c
src/lib/elementary/elm_conform.c

index d3b3fba..d350d24 100644 (file)
@@ -29,6 +29,25 @@ EAPI Evas_Object *
 elm_bg_add(Evas_Object *parent)
 {
    EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL);
+// TIZEN_ONLY(20160218): Improve launching performance.
+   if (_precreated_bg_obj)
+     {
+        Evas_Object *par_obj = elm_widget_parent_get(_precreated_bg_obj);
+
+        if (par_obj == parent)
+          {
+             Evas_Object *above_obj = evas_object_above_get(_precreated_bg_obj);
+             if (above_obj)
+               evas_object_raise(_precreated_bg_obj);
+
+             Evas_Object *tmp = _precreated_bg_obj;
+             _precreated_bg_obj = NULL;
+             INF("Return precreated obj(%p).", tmp);
+             return tmp;
+          }
+      }
+//
+
    return elm_legacy_add(MY_CLASS, parent);
 }
 
index 8973880..6971e86 100644 (file)
@@ -9186,6 +9186,25 @@ elm_win_add(Evas_Object *parent, const char *name, Efl_Ui_Win_Type type)
       case ELM_WIN_SOCKET_IMAGE: klass = EFL_UI_WIN_SOCKET_CLASS; break;
       default: break;
      }
+// TIZEN_ONLY(20160218): Improve launching performance.
+   if (_precreated_win_obj)
+     {
+        ELM_WIN_DATA_GET(_precreated_win_obj, sd);
+
+        if (sd)
+          {
+             if ((sd->type == type) && (sd->parent == parent))
+               {
+                  Evas_Object *tmp = _precreated_win_obj;
+                  TRAP(sd, name_class_set, name, _elm_appname);
+                  _precreated_win_obj = NULL;
+                  INF("Return precreated obj(%p).", tmp);
+
+                  return tmp;
+               }
+          }
+     }
+//
 
    Evas_Object *obj = elm_legacy_add(klass, parent,
                          efl_ui_win_name_set(efl_added, name),
index 2ee187f..be2ab96 100644 (file)
@@ -1137,6 +1137,24 @@ EAPI Evas_Object *
 elm_conformant_add(Evas_Object *parent)
 {
    EINA_SAFETY_ON_NULL_RETURN_VAL(parent, NULL);
+// TIZEN_ONLY(20160218): Improve launching performance.
+   if (_precreated_conform_obj)
+     {
+        Evas_Object *par_obj = elm_widget_parent_get(_precreated_conform_obj);
+
+        if (par_obj == parent)
+          {
+             Evas_Object *above_obj = evas_object_above_get(_precreated_conform_obj);
+             if (above_obj)
+               evas_object_raise(_precreated_conform_obj);
+
+             Evas_Object *tmp = _precreated_conform_obj;
+             _precreated_conform_obj = NULL;
+             INF("Return precreated obj(%p).", tmp);
+             return tmp;
+          }
+     }
+//
    return elm_legacy_add(MY_CLASS, parent);
 }