[Ozone Wayland] Get wayland display
authorChandan Padhi <c.padhi@samsung.com>
Tue, 26 May 2015 16:27:08 +0000 (21:57 +0530)
committerYoungsoo Choi <kenshin.choi@samsung.com>
Tue, 10 Jul 2018 06:57:09 +0000 (06:57 +0000)
Bug: http://web.sec.samsung.net/bugzilla/show_bug.cgi?id=12492
Reviewed by: Antonio Gomes, DaeHyun Ko, Eun Namgung, Hyunhak Kim, SeungSeop Park

Change-Id: Ifa3bd1d35a8ba107acf1bc5b94b8c9cc7e1445a1
Signed-off-by: Chandan Padhi <c.padhi@samsung.com>
tizen_src/chromium_impl/ui/ozone/ozone_efl.gyp
tizen_src/chromium_impl/ui/ozone/surface_factory_efl.cc

index 47d2786..b3fdf83 100644 (file)
     {
       'target_name': 'ozone_efl',
       'type': 'static_library',
-      'dependencies': [
-        '<(DEPTH)/tizen_src/build/system.gyp:ecore-x',
+      'conditions': [
+        ['use_wayland==0', {
+          'dependencies': [
+            '<(DEPTH)/tizen_src/build/system.gyp:ecore-x',
+          ],
+        },
+        {
+          'dependencies': [
+            '<(DEPTH)/tizen_src/build/system.gyp:ecore-wayland',
+          ],
+        }],
       ],
       'sources': [
         'media_ozone_platform_efl.cc',
index 2ea364d..99382f0 100644 (file)
@@ -4,9 +4,9 @@
 
 #include "ui/ozone/surface_factory_efl.h"
 
-#if !defined(WAYLAND_BRINGUP)
-#include <Ecore_X.h>
-#else
+#include "ecore_x_wayland_wrapper.h"
+
+#if defined(USE_WAYLAND)
 #include <wayland-egl.h>
 #endif
 #include <EGL/egl.h>
@@ -73,10 +73,11 @@ bool SurfaceFactoryEfl::LoadEGLGLES2Bindings(
 }
 
 intptr_t SurfaceFactoryEfl::GetNativeDisplay() {
-#if !defined(WAYLAND_BRINGUP)
+#if defined(USE_WAYLAND)
+  return reinterpret_cast<intptr_t>(ecore_wl_display_get());
+#else
   return reinterpret_cast<intptr_t>(ecore_x_display_get());
 #endif
-  return 0;
 }
 
 const int32* SurfaceFactoryEfl::GetEGLSurfaceProperties(