Set memory saving mode for webkit
authorJihoon Chung <jihoon.chung@samsung.com>
Mon, 7 Jan 2013 00:02:52 +0000 (09:02 +0900)
committerGerrit Code Review <gerrit2@kim11>
Mon, 14 Jan 2013 00:36:02 +0000 (09:36 +0900)
[Issue#] N/A
[Problem] N/A
[Cause] N/A
[Solution] Set memory saving mode for webkit.
In case of setting is enabled, tiled backing store
will use smaller memory.
[SCMRequest] N/A

Change-Id: If7e30e901203b340302c35193cccac1f3f65732d

src/view/webkit/view_logic.cpp

index faf8ca8..dc234ae 100644 (file)
@@ -35,6 +35,7 @@
 #include <vconf.h>
 #include <widget_model.h>
 #include <dpl/wrt-dao-ro/widget_dao_read_only.h>
+#include <dpl/wrt-dao-ro/vconf_config.h>
 #include <dpl/utils/wrt_global_settings.h>
 
 #include <common/application_data.h>
@@ -497,6 +498,17 @@ void ViewLogic::initializeEwkContext(Ewk_Context* newEwkContext)
         didStartDownloadCallback,
         this);
 
+    // memory saving mode
+    int result;
+    vconf_get_int(
+        WrtDB::VconfConfig::GetVconfKeyMemorySavingMode(
+            m_model->TizenId).c_str(),
+        &result);
+    ewk_context_memory_saving_mode_set(
+        newEwkContext,
+        static_cast<WrtDB::SettingsType>(result) ==
+            WrtDB::SETTINGS_TYPE_ON ? EINA_TRUE : EINA_FALSE);
+
     // set to member value
     m_ewkContext = newEwkContext;
 }