elm_config: Support opengl on wayland for "opengl_x11" engine. 48/68448/3
authorJaehyun Cho <jae_hyun.cho@samsung.com>
Wed, 4 May 2016 09:10:14 +0000 (18:10 +0900)
committerJaehyun Cho <jae_hyun.cho@samsung.com>
Wed, 11 May 2016 04:07:41 +0000 (13:07 +0900)
If elm_config_preferred_engine_set("opengl_x11") is called, then set
accel preference internally to use opengl engine on wayland.

Change-Id: Ib9bc887401c1be6ecf46d623836d5d1c9496f1d6

src/lib/elm_config.c

index 58849e8d5bc940e3ea25dd6df0e3995d2b313d04..c57aaf20ca350c855bb56a7e4a667ba6d6635fa8 100644 (file)
@@ -3497,6 +3497,20 @@ elm_config_preferred_engine_set(const char *engine)
        eina_stringshare_replace(&(_elm_preferred_engine), ELM_WAYLAND_EGL);
      else
        eina_stringshare_replace(&(_elm_preferred_engine), engine);
+
+     //TIZEN ONLY (20160504): "opengl_x11" is not supported on wayland.
+     if (ENGINE_COMPARE(ELM_OPENGL_X11))
+       {
+          ERR("\"opengl_x11\" engine is not supported on wayland. "
+              "Please call elm_config_accel_preference_set(\"opengl\"); "
+              "instead of elm_config_preferred_engine_set(\"opengl_x11\"); "
+              "to use opengl engine.");
+
+          /* Set accel preference internally if the given preferred engine name
+             is "opengl_x11" on Tizen to remove backend dependencies. */
+          elm_config_accel_preference_set("opengl");
+       }
+     //
 #undef ENGINE_COMPARE
    }
    else