Use GL ES 2 on desktop.
authorViatcheslav Ostapenko <sl.ostapenko@samsung.com>
Wed, 8 Oct 2014 16:37:40 +0000 (12:37 -0400)
committerYoungsoo Choi <kenshin.choi@samsung.com>
Tue, 10 Jul 2018 06:57:09 +0000 (06:57 +0000)
Switch desktop build to use OpenGL ES 2.
This will make it use common rendering path with phone and a lot of graphics
features would be easier to develop.

Requires install additional ubuntu package and rebuild of dependencies.

To make it work do:

sudo apt-get install libgles2-mesa-dev
rm -rf out.x64/Dependencies/jhbuild.stamp out.x64/Dependencies/Root
./build/build_desktop.sh --debug

Bug: http://107.108.218.239/bugzilla/show_bug.cgi?id=5599

Change-Id: I10b67a7c8f11f6800cffd8ed1454ecc6561fb45a
Signed-off-by: Viatcheslav Ostapenko <sl.ostapenko@samsung.com>
tizen_src/build/jhbuild/jhbuild.modules
tizen_src/impl/browser/renderer_host/render_widget_host_view_efl.cc
tizen_src/impl/command_line_efl.cc
tizen_src/impl/gl/gl_current_context_efl.cc

index 9fde2db11b6ca633a228db152c43146a3e2a23c1..895fabea204e1f69d9943de2bed0ebe9a1f27429 100755 (executable)
@@ -55,7 +55,7 @@
   </autotools>
 
   <autotools id="evas" autogen-sh="configure"
-             autogenargs="--enable-gl-xlib --disable-wayland-shm --disable-wayland-egl">
+             autogenargs="--enable-gl-xlib --enable-fb --enable-gl-flavor-gles --enable-gles-variety-sgx --disable-wayland-shm --disable-wayland-egl">
     <branch module="releases/evas-1.7.5.tar.bz2" version="1.7.5"
             repo="download.enlightenment.org"
             hash="sha256:70b350a970b2086787622845896f3e54de278fe698b8069796fd752e70427374"
index 891fa376f8eb53d815de6f4b74531488251bbea6..74905a12095490da7eb3ba88387177798498f7ce 100644 (file)
@@ -148,9 +148,7 @@ static const char* vertexShaderSourceSimple =
   "}                            \n";
 
 static const char* fragmentShaderSourceSimple =
-#if defined(OS_TIZEN)
   "precision mediump float;                            \n"
-#endif
   "varying vec2 v_texCoord;                            \n"
   "uniform sampler2D s_texture;                        \n"
   "void main() {                                       \n"
index 09abaa428373e2bcc67bf01b2d591f625f77e0e5..bffa49d2949d7d89443846845618ff89d9260fba 100644 (file)
@@ -43,13 +43,13 @@ content::MainFunctionParams CommandLineEfl::GetDefaultPortParams() {
   p_command_line->AppendSwitch(switches::kUseMobileUserAgent);
   p_command_line->AppendSwitch(switches::kEnableViewportMeta);
 
+  p_command_line->AppendSwitchASCII(switches::kUseGL, gfx::kGLImplementationEGLName);
+  p_command_line->AppendSwitch(switches::kDisableDelegatedRenderer);
+
 #if defined(OS_TIZEN)
-  // Threaded compositing breaks touch events. Seems to be a linux specific issue
-  // (see: http://code.google.com/p/chromium/issues/detail?id=271791)
   p_command_line->AppendSwitch(switches::kEnableOverscrollNotifications);
   p_command_line->AppendSwitch(switches::kTouchEvents);
   p_command_line->AppendSwitch(switches::kEnablePinch);
-  p_command_line->AppendSwitchASCII(switches::kUseGL, gfx::kGLImplementationEGLName);
 #if !defined(EWK_BRINGUP)
   p_command_line->AppendSwitch(switches::kEnableGestureTapHighlight);
 #endif
@@ -59,29 +59,20 @@ content::MainFunctionParams CommandLineEfl::GetDefaultPortParams() {
   // FIXME(Kapil) Will be removed after permission handling implementation.
   p_command_line->AppendSwitch(switches::kDisableWebSecurity);
 #else
-  p_command_line->AppendSwitchASCII(switches::kUseGL, gfx::kGLImplementationDesktopName);
-  p_command_line->AppendSwitch(switches::kDisableDelegatedRenderer);
+  p_command_line->AppendSwitch(switches::kIgnoreGpuBlacklist);
 #endif
-  //if we use software path we dont need to have next switches
-#if defined(OS_TIZEN)
-#if !defined(EWK_BRINGUP)
-  if (!p_command_line->HasSwitch(switches::kUseSWRenderingPath))
-#endif
-#endif
-  {
+
 #warning "[M37] Investigae removed command line switches, are they still needed, do they have a replacement?"
-    //p_command_line->AppendSwitch(switches::kForceCompositingMode);
   // [M37] Note: The commit "Temporarily disable zero copy as it causes browser crash during regression"
   // is to deprecate kEnableMapImage option.
   // But it was already deprecated during fixing M37 build as no command line option with such name (see above comment)
   // TODO: remove this commit if it turn out the option is unnecessary
   //Disabling temporarily, as it causes browser crash ID:335 in regression
-    //p_command_line->AppendSwitch(cc::switches::kEnableMapImage);
-    p_command_line->AppendSwitch(switches::kEnableThreadedCompositing);
-    p_command_line->AppendSwitch(switches::kIgnoreGpuBlacklist);
+  //p_command_line->AppendSwitch(cc::switches::kEnableMapImage);
 
-    p_command_line->AppendSwitch(switches::kDisableDelegatedRenderer);
-  }
+  // Threaded compositing breaks touch events. Seems to be a linux specific issue
+  // (see: http://code.google.com/p/chromium/issues/detail?id=271791)
+  //p_command_line->AppendSwitch(switches::kEnableThreadedCompositing);
 
 #warning "[M37] Investigae removed command line switches, are they still needed, do they have a replacement?"
   //p_command_line->AppendSwitch(switches::kAllowWebUICompositing);
index c96417cfa0cce07038563af377beb2371eb16f20..7b6b227c215dafa7f6ab75da34bfa177d4477a91 100644 (file)
@@ -10,7 +10,6 @@ extern void* GLGetCurentContext() {
   // later correct initialization.
   // Chromium gl system is not initialized yet and evas gl doesn't
   // expose "GetCurrentContext" or "GetNativeContextHandle" API.
-#if defined(OS_TIZEN)
   base::NativeLibrary library =
       LoadLibraryAndPrintError("libEGL.so.1");
   typedef EGLContext (*eglGetCurrentContextProc)(void);
@@ -18,15 +17,7 @@ extern void* GLGetCurentContext() {
   eglGetCurrentContextProc proc = reinterpret_cast<eglGetCurrentContextProc>(
       base::GetFunctionPointerFromNativeLibrary(
           library, "eglGetCurrentContext"));
-#else
-  base::NativeLibrary library =
-      LoadLibraryAndPrintError("libGL.so.1");
-  typedef GLXContext (*glXGetCurrentContextProc)(void);
 
-  glXGetCurrentContextProc proc = reinterpret_cast<glXGetCurrentContextProc>(
-      base::GetFunctionPointerFromNativeLibrary(
-          library, "glXGetCurrentContext"));
-#endif // defined(OS_TIZEN)
   void* handle = proc();
   base::UnloadNativeLibrary(library);
   return handle;