From 6ef6f5a3873d51c7d0488e14657aecaa00c736f3 Mon Sep 17 00:00:00 2001 From: JongHeon Choi Date: Tue, 5 Jul 2016 07:32:18 +0900 Subject: [PATCH] Memory optimization of web app --- runtime/browser/native_window.cc | 7 +++--- runtime/browser/runtime_process.cc | 1 + runtime/resources/xwalk_tizen.edc | 50 -------------------------------------- 3 files changed, 5 insertions(+), 53 deletions(-) diff --git a/runtime/browser/native_window.cc b/runtime/browser/native_window.cc index 442b5e9..85091b7 100755 --- a/runtime/browser/native_window.cc +++ b/runtime/browser/native_window.cc @@ -90,9 +90,10 @@ void NativeWindow::Initialize() { evas_object_show(top_layout); // focus - Evas_Object* focus = elm_button_add(top_layout); - elm_theme_extension_add(NULL, kEdjePath); - elm_object_style_set(focus, "wrt"); + Evas_Object* focus = elm_bg_add(top_layout); + evas_object_size_hint_align_set(focus, EVAS_HINT_FILL, EVAS_HINT_FILL); + evas_object_size_hint_weight_set(focus, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); + elm_object_focus_allow_set(focus, EINA_TRUE); elm_object_part_content_set(top_layout, "elm.swallow.content", focus); EVAS_SIZE_EXPAND_FILL(focus); elm_access_object_unregister(focus); diff --git a/runtime/browser/runtime_process.cc b/runtime/browser/runtime_process.cc index bd1e201..fd63a6c 100755 --- a/runtime/browser/runtime_process.cc +++ b/runtime/browser/runtime_process.cc @@ -139,6 +139,7 @@ int real_main(int argc, char* argv[]) { int main(int argc, char* argv[]) { if (strcmp(argv[0], "/usr/bin/wrt-loader") == 0) { elm_init(argc, argv); + elm_config_cache_flush_enabled_set(EINA_TRUE); auto preload = [argv](void) { g_prelaunch = true; ewk_init(); diff --git a/runtime/resources/xwalk_tizen.edc b/runtime/resources/xwalk_tizen.edc index 0ad09ec..cc3c65c 100755 --- a/runtime/resources/xwalk_tizen.edc +++ b/runtime/resources/xwalk_tizen.edc @@ -94,56 +94,6 @@ collections { }//end of programs }//end of group - group { name: "elm/button/base/wrt"; - #define BUTTON_HEIGHT 78.0 - parts { - part { name: "bg"; - type: RECT; - scale: 1; - description { state: "default" 0.0; - color: 0 0 0 0; - min: 0 BUTTON_HEIGHT; - } - } - part { name: "elm.text"; - type: TEXTBLOCK; - mouse_events: 0; - scale: 1; - description { state: "default" 0.0; - text { - min: 0 1; - style: "button_general_text_normal"; - } - } - description { state: "disabled" 0.0; - inherit: "default" 0.0; - text.style: "button_general_text_dim"; - } - description { state: "pressed" 0.0; - inherit: "default" 0.0; - text.style: "button_general_text_press"; - } - } - part { name: "elm.swallow.content"; - clip_to: "elm.swallow.content.clip"; - type: SWALLOW; - scale: 1; - description { state: "default" 0.0; } - } - part { name: "elm.swallow.content.clip"; - type: RECT; - scale: 1; - description { state: "default" 0.0; - color_class: "F022L1i"; - } - description { state: "disabled" 0.0; - inherit: "default" 0.0; - color_class: "F022L1iD"; - } - } - }//end of part - }//end of group - group { name: "PopupTextEntrySet"; parts{ -- 2.7.4