Revert "[Tizen] Fix i586 build error" 50/137150/1
authorJinho, Lee <jeano.lee@samsung.com>
Tue, 4 Jul 2017 05:50:30 +0000 (14:50 +0900)
committerJinho, Lee <jeano.lee@samsung.com>
Tue, 4 Jul 2017 05:50:41 +0000 (14:50 +0900)
This reverts commit 552497490ac4489be4daf678d9f1e7c150b4f8c1.

Change-Id: I13d6e74db1bce83a69ae784b7d23d458fb14daf0

adaptors/ecore/wayland/window-render-surface-ecore-wl.cpp
adaptors/ecore/wayland/window-render-surface.h

index 40858ed0355e239e84fb2ccc19789bb1d3dd4698..17c5515e4c01b8dff4396146c644e88ba82c3a6d 100644 (file)
@@ -19,7 +19,6 @@
 #include <window-render-surface.h>
 
 // EXTERNAL INCLUDES
-#include <dlfcn.h>
 #include <dali/integration-api/gl-abstraction.h>
 #include <dali/integration-api/debug.h>
 #include <dali/integration-api/gl-defines.h>
@@ -45,7 +44,6 @@ namespace
 {
 
 const int MINIMUM_DIMENSION_CHANGE( 1 ); ///< Minimum change for window to be considered to have moved
-const char* WAYLAND_EGL_SO( "libwayland-egl.so" );
 
 } // unnamed namespace
 
@@ -54,9 +52,6 @@ WindowRenderSurface::WindowRenderSurface( Dali::PositionSize positionSize,
                                           const std::string& name,
                                           bool isTransparent)
 : EcoreWlRenderSurface( positionSize, surface, name, isTransparent ),
-  mEglWinGetCapabilitiesPtr( NULL ),
-  mEglWinSetRotationPtr( NULL ),
-  mLibHandle( NULL ),
   mWlWindow( NULL ),
   mEglWindow( NULL ),
   mThreadSynchronization( NULL ),
@@ -85,11 +80,6 @@ WindowRenderSurface::~WindowRenderSurface()
   {
     delete mRotationTrigger;
   }
-
-  if( mLibHandle != NULL )
-  {
-    dlclose( mLibHandle );
-  }
 }
 
 Ecore_Wl_Window* WindowRenderSurface::GetDrawable()
@@ -169,10 +159,7 @@ void WindowRenderSurface::RequestRotation( Dali::Window::WindowOrientation orien
 
   ecore_wl_window_rotation_set( mWlWindow, angle );
 
-  if( mEglWinSetRotationPtr )
-  {
-    mEglWinSetRotationPtr( mEglWindow, rotation );
-  }
+  wl_egl_window_set_rotation( mEglWindow, rotation );
 }
 
 void WindowRenderSurface::InitializeEgl( EglInterface& eglIf )
@@ -207,40 +194,11 @@ void WindowRenderSurface::CreateEglSurface( EglInterface& eglIf )
   eglImpl.CreateSurfaceWindow( windowType, mColorDepth );
 
   // Check capability
-  if( !mLibHandle )
+  wl_egl_window_capability capability = static_cast< wl_egl_window_capability >( wl_egl_window_get_capabilities( mEglWindow ) );
+  if( capability == WL_EGL_WINDOW_CAPABILITY_ROTATION_SUPPORTED )
   {
-    mLibHandle = dlopen( WAYLAND_EGL_SO, RTLD_LAZY );
-
-    char* error = dlerror();
-    if( mLibHandle == NULL || error != NULL )
-    {
-      DALI_LOG_INFO( gRenderSurfaceLogFilter, Debug::Verbose, "WindowRenderSurface::CreateEglSurface: dlopen error: %s\n", error );
-      return;
-    }
-
-    mEglWinGetCapabilitiesPtr = reinterpret_cast< EglWinGetCapabilitiesFunction >( dlsym( mLibHandle, "wl_egl_window_get_capabilities" ) );
-    if( !mEglWinGetCapabilitiesPtr )
-    {
-      DALI_LOG_INFO( gRenderSurfaceLogFilter, Debug::Verbose, "WindowRenderSurface::CreateEglSurface: Can't load wl_egl_window_get_capabilities\n" );
-      return;
-    }
-
-    mEglWinSetRotationPtr = reinterpret_cast< EglWinSetRotationFunction >( dlsym( mLibHandle, "wl_egl_window_set_rotation" ) );
-    if( !mEglWinSetRotationPtr )
-    {
-      DALI_LOG_INFO( gRenderSurfaceLogFilter, Debug::Verbose, "WindowRenderSurface::CreateEglSurface: Can't load wl_egl_window_set_rotation\n" );
-      return;
-    }
-  }
-
-  if( mEglWinGetCapabilitiesPtr )
-  {
-    wl_egl_window_capability capability = static_cast< wl_egl_window_capability >( mEglWinGetCapabilitiesPtr( mEglWindow ) );
-    if( capability == WL_EGL_WINDOW_CAPABILITY_ROTATION_SUPPORTED )
-    {
-      DALI_LOG_INFO( gRenderSurfaceLogFilter, Debug::Verbose, "WindowRenderSurface::CreateEglSurface: capability = %d\n", capability );
-      mRotationSupported = true;
-    }
+    DALI_LOG_INFO( gRenderSurfaceLogFilter, Debug::Verbose, "WindowRenderSurface::CreateEglSurface: capability = %d\n", capability );
+    mRotationSupported = true;
   }
 }
 
index 19d7c7a7f83695a062f4cc709ae91ed73477e1c6..40a0d2a00c9a0c0dfdbe30cee2755d76b783c90d 100644 (file)
@@ -170,14 +170,7 @@ private:
 
 private: // Data
 
-  typedef int (*EglWinGetCapabilitiesFunction)( wl_egl_window* eglWindow );
-  typedef int (*EglWinSetRotationFunction)( wl_egl_window* eglWindow, int rotation );
-
-  EglWinGetCapabilitiesFunction  mEglWinGetCapabilitiesPtr;
-  EglWinSetRotationFunction      mEglWinSetRotationPtr;
-
-  void*                           mLibHandle; ///< Handle for the loaded library
-  Ecore_Wl_Window*                mWlWindow;  ///< Wayland-Window
+  Ecore_Wl_Window*                mWlWindow; ///< Wayland-Window
   wl_egl_window*                  mEglWindow;
   ThreadSynchronizationInterface* mThreadSynchronization;
   TriggerEventInterface*          mRotationTrigger;