From 543f52c882dd0c604de660eab086fba3ae517b37 Mon Sep 17 00:00:00 2001 From: "Jinho, Lee" Date: Tue, 4 Jul 2017 14:50:30 +0900 Subject: [PATCH] Revert "[Tizen] Fix i586 build error" This reverts commit 552497490ac4489be4daf678d9f1e7c150b4f8c1. Change-Id: I13d6e74db1bce83a69ae784b7d23d458fb14daf0 --- .../wayland/window-render-surface-ecore-wl.cpp | 52 +++------------------- adaptors/ecore/wayland/window-render-surface.h | 9 +--- 2 files changed, 6 insertions(+), 55 deletions(-) diff --git a/adaptors/ecore/wayland/window-render-surface-ecore-wl.cpp b/adaptors/ecore/wayland/window-render-surface-ecore-wl.cpp index 40858ed..17c5515 100644 --- a/adaptors/ecore/wayland/window-render-surface-ecore-wl.cpp +++ b/adaptors/ecore/wayland/window-render-surface-ecore-wl.cpp @@ -19,7 +19,6 @@ #include // EXTERNAL INCLUDES -#include #include #include #include @@ -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; } } diff --git a/adaptors/ecore/wayland/window-render-surface.h b/adaptors/ecore/wayland/window-render-surface.h index 19d7c7a..40a0d2a 100644 --- a/adaptors/ecore/wayland/window-render-surface.h +++ b/adaptors/ecore/wayland/window-render-surface.h @@ -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; -- 2.7.4