summaryrefslogtreecommitdiff
path: root/services/MoreMenuUI
diff options
context:
space:
mode:
authorm.kawonczyk <m.kawonczyk@samsung.com>2016-07-05 14:00:11 +0200
committerHye Kyoung Hwang <cookie@samsung.com>2016-07-05 18:02:05 -0700
commitbb7229478dcde6878f4ec9c1e2a6a7257b235714 (patch)
tree56af37333b74a47525a529226ea38c80f0885701 /services/MoreMenuUI
parenta9a63a7ea8f3857364bf8bf8f606d96997c2b70a (diff)
downloadbrowser-bb7229478dcde6878f4ec9c1e2a6a7257b235714.tar.gz
browser-bb7229478dcde6878f4ec9c1e2a6a7257b235714.tar.bz2
browser-bb7229478dcde6878f4ec9c1e2a6a7257b235714.zip
1st launching time decrease. Add lazy loading.
[Issue] http://suprem.sec.samsung.net/jira/browse/TWF-1624 [Problem] Browser startup time is too long. [Solution] Move UI creation to when it is needed. Use own visibility function to support lazy loading. Move methods not needed on initialization - such as webview preinitialization and dummy button to after browser is created and functional. [Verify] dlogutil -v time browser and check time between BROWSER IS SAYING HELLO and void app_resume(void*) Change-Id: I77d3b82931077ffad80122763bbb01139754c29f
Diffstat (limited to 'services/MoreMenuUI')
-rwxr-xr-xservices/MoreMenuUI/MoreMenuUI.cpp6
-rwxr-xr-xservices/MoreMenuUI/MoreMenuUI.h2
2 files changed, 7 insertions, 1 deletions
diff --git a/services/MoreMenuUI/MoreMenuUI.cpp b/services/MoreMenuUI/MoreMenuUI.cpp
index af47e137..d58ea1dc 100755
--- a/services/MoreMenuUI/MoreMenuUI.cpp
+++ b/services/MoreMenuUI/MoreMenuUI.cpp
@@ -56,6 +56,7 @@ MoreMenuUI::MoreMenuUI()
, m_shouldShowFindOnPage(false)
, m_blockThumbnails(false)
#endif
+ , m_isVisible(false)
{
BROWSER_LOGD("[%s:%d] ", __PRETTY_FUNCTION__, __LINE__);
m_edjFilePath = EDJE_DIR;
@@ -101,7 +102,8 @@ void MoreMenuUI::updateBookmarkButton()
void MoreMenuUI::showUI()
{
BROWSER_LOGD("[%s:%d] ", __PRETTY_FUNCTION__, __LINE__);
- M_ASSERT(m_mm_layout);
+ if (!m_mm_layout)
+ createMoreMenuLayout();
createGengrid(); // recreate gengrid because icons could have changed
addItems();
#if !PROFILE_MOBILE
@@ -113,6 +115,7 @@ void MoreMenuUI::showUI()
#if PROFILE_MOBILE
resetContent();
#endif
+ m_isVisible = true;
}
void MoreMenuUI::hideUI()
@@ -132,6 +135,7 @@ void MoreMenuUI::hideUI()
setFocus(EINA_FALSE);
m_focusManager.stopFocusManager();
#endif
+ m_isVisible = false;
}
diff --git a/services/MoreMenuUI/MoreMenuUI.h b/services/MoreMenuUI/MoreMenuUI.h
index 9458b790..2433d1f2 100755
--- a/services/MoreMenuUI/MoreMenuUI.h
+++ b/services/MoreMenuUI/MoreMenuUI.h
@@ -83,6 +83,7 @@ public:
Evas_Object* getContent();
void showUI();
void hideUI();
+ bool isVisible() { return m_isVisible; }
void setDesktopMode(bool desktopMode) {m_desktopMode = desktopMode;}
@@ -168,6 +169,7 @@ private:
const unsigned int GENGRID_ITEM_WIDTH = 364;
const unsigned int GENGRID_ITEM_HEIGHT = 320;
#endif
+ bool m_isVisible;
};
}