From: Chandan Padhi Date: Fri, 16 Oct 2020 11:13:33 +0000 (+0530) Subject: [M85 Migration][Rendering] Force gpu acceleration X-Git-Tag: submit/tizen/20230227.160252~252 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6bf1d33f9ec77b47b0b9b76805ff231c8619d0d3;hp=1b7ed769999b7bbf5c39e9d8b5328d28ca85fb76;p=platform%2Fframework%2Fweb%2Fchromium-efl.git [M85 Migration][Rendering] Force gpu acceleration Chromium-efl port does not support s/w mode. So we need to set h/w mode before creating elm_window. To do this, make constructor function which is called at library loading time and set "ELM_ACCEL=hw" here. If not, native app which does not call elm_config_accel_preference_set() function will fail to execute. Reference: https://review.tizen.org/gerrit/220875/ Change-Id: I0f7bb1b53b95dcd5390ca1b4c8b578ac67a6afbf Signed-off-by: Chandan Padhi (cherry picked from commit af5cbc2f38633fbe818fd6421e2fbe5525076970) --- diff --git a/tizen_src/ewk/efl_integration/public/ewk_main.cc b/tizen_src/ewk/efl_integration/public/ewk_main.cc index e20617b..bb61717 100644 --- a/tizen_src/ewk/efl_integration/public/ewk_main.cc +++ b/tizen_src/ewk/efl_integration/public/ewk_main.cc @@ -45,6 +45,7 @@ static int _ewkInitCount = 0; //private function declaration here static void _ewk_init_web_engine(void); static void _ewk_shutdown_web_engine(void); +static void _ewk_force_acceleration() __attribute__((constructor)); extern std::string g_homeDirectory; @@ -224,3 +225,13 @@ void _ewk_shutdown_web_engine(void) EwkGlobalData::Delete(); } +void _ewk_force_acceleration() +{ + // Chromium-efl port does not support s/w mode. So we need to set h/w mode + // before creating elm_window. To do this, make constructor function which is + // called at library loading time and set "ELM_ACCEL=hw" here. If not, native + // app which does not call elm_config_accel_preference_set() function will + // fail to execute. + setenv("ELM_ACCEL", "hw", 1); +} +