Merge "Updates for NativeImageInterface" into devel/master
authorAdeel Kazmi <adeel.kazmi@samsung.com>
Fri, 24 Jul 2020 11:58:47 +0000 (11:58 +0000)
committerGerrit Code Review <gerrit@review>
Fri, 24 Jul 2020 11:58:47 +0000 (11:58 +0000)
29 files changed:
dali/devel-api/adaptor-framework/video-player-plugin.h
dali/devel-api/adaptor-framework/video-player.cpp
dali/devel-api/adaptor-framework/video-player.h
dali/devel-api/adaptor-framework/video-sync-mode.h [new file with mode: 0644]
dali/devel-api/adaptor-framework/window-devel.h
dali/devel-api/file.list
dali/integration-api/adaptor-framework/native-render-surface-factory.h
dali/integration-api/adaptor-framework/render-surface-interface.h
dali/internal/adaptor/common/adaptor-impl.cpp
dali/internal/imaging/common/webp-loading.cpp
dali/internal/video/common/video-player-impl.cpp
dali/internal/video/common/video-player-impl.h
dali/internal/window-system/android/render-surface-factory-android.cpp
dali/internal/window-system/android/render-surface-factory-android.h
dali/internal/window-system/common/native-render-surface-factory.cpp
dali/internal/window-system/common/render-surface-factory.h
dali/internal/window-system/tizen-wayland/ecore-wl/render-surface-factory-ecore-wl.cpp
dali/internal/window-system/tizen-wayland/ecore-wl/render-surface-factory-ecore-wl.h
dali/internal/window-system/tizen-wayland/ecore-wl2/render-surface-factory-ecore-wl2.cpp
dali/internal/window-system/tizen-wayland/ecore-wl2/render-surface-factory-ecore-wl2.h
dali/internal/window-system/tizen-wayland/ecore-wl2/window-base-ecore-wl2.cpp
dali/internal/window-system/tizen-wayland/native-render-surface-ecore-wl.cpp
dali/internal/window-system/tizen-wayland/native-render-surface-ecore-wl.h
dali/internal/window-system/ubuntu-x11/render-surface-factory-ecore-x.cpp
dali/internal/window-system/ubuntu-x11/render-surface-factory-ecore-x.h
dali/internal/window-system/windows/render-surface-factory-win.cpp
dali/internal/window-system/windows/render-surface-factory-win.h
dali/public-api/dali-adaptor-version.cpp
packaging/dali-adaptor.spec

index 73d175e..9cfc799 100755 (executable)
@@ -21,6 +21,7 @@
 // EXTERNAL INCLUDES
 #include <dali/public-api/signals/dali-signal.h>
 #include <dali/public-api/math/rect.h>
+#include <dali/public-api/actors/actor.h>
 
 namespace Dali
 {
@@ -273,6 +274,18 @@ public:
    */
   virtual Any GetMediaPlayer() = 0;
 
+  /**
+   * @brief calls synchronization function in window system
+   * This function is called, the synchronization is started between UI(transparent hole) and video player.
+   */
+  virtual void StartSynchronization() = 0;
+
+  /**
+   * @brief calls desynchronization function in window system
+   * This function is called, the synchronization is finished between UI(transparent hole) and video player.
+   */
+  virtual void FinishSynchronization() = 0;
+
 };
 
 } // namespace Dali;
index 870571b..ecbd537 100755 (executable)
@@ -46,7 +46,20 @@ VideoPlayer VideoPlayer::New()
 
   if( player )
   {
-    player->Initialize();
+    Dali::Actor actor;
+    player->Initialize( actor, VideoSyncMode::DISABLED );
+  }
+
+  return VideoPlayer( player.Get() );
+}
+
+VideoPlayer VideoPlayer::New( Dali::Actor actor, VideoSyncMode syncMode )
+{
+  Internal::Adaptor::VideoPlayerPtr player = Internal::Adaptor::VideoPlayer::New();
+
+  if( player )
+  {
+    player->Initialize( actor, syncMode );
   }
 
   return VideoPlayer( player.Get() );
@@ -201,5 +214,15 @@ Any VideoPlayer::GetMediaPlayer()
   return GetImplementation( *this ).GetMediaPlayer();
 }
 
+void VideoPlayer::StartSynchronization()
+{
+  GetImplementation( *this ).StartSynchronization();
+}
+
+void VideoPlayer::FinishSynchronization()
+{
+  GetImplementation( *this ).FinishSynchronization();
+}
+
 } // namespace Dali;
 
index 6db7304..a019131 100755 (executable)
@@ -20,6 +20,7 @@
 
 // EXTERNAL INCLUDES
 #include <dali/public-api/object/base-handle.h>
+#include <dali/devel-api/adaptor-framework/video-sync-mode.h>
 
 //INTERNAL INCLUDES
 #include <dali/devel-api/adaptor-framework/video-player-plugin.h>
@@ -66,6 +67,17 @@ public:
    */
   static VideoPlayer New();
 
+  /**
+   * @brief Creates a new instance of a VideoPlayer.
+   *
+   * If you want the video player works with Ui synchronous when video player is resized/moved,
+   * put the video view actor and the enabled syncMode.
+   *
+   * @param[in] actor video view's actor instance
+   * @param[in] syncMode The synchronization mode between the UI (transparent hole) and VideoPlayer.
+   */
+  static VideoPlayer New( Dali::Actor actor, VideoSyncMode syncMode );
+
  /**
    * @brief Copy constructor.
    *
@@ -278,6 +290,18 @@ public:
    */
   Any GetMediaPlayer();
 
+  /**
+   * @brief calls synchronization function in window system
+   * This function is called, the synchronization is started between UI(transparent hole) and video player.
+   */
+  void StartSynchronization();
+
+  /**
+   * @brief calls desynchronization function in window system
+   * This function is called, the synchronization is ended between UI(transparent hole) and video player.
+   */
+  void FinishSynchronization();
+
 private: // Not intended for application developers
 
   /**
diff --git a/dali/devel-api/adaptor-framework/video-sync-mode.h b/dali/devel-api/adaptor-framework/video-sync-mode.h
new file mode 100644 (file)
index 0000000..dd4ce6f
--- /dev/null
@@ -0,0 +1,34 @@
+#ifndef DALI_VIDEO_SYNC_MODE
+#define DALI_VIDEO_SYNC_MODE
+
+/*
+ * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+namespace Dali
+{
+  /**
+   * @brief Enumeration for the synchronization is ended between UI(transparent hole) and video player.
+   */
+  enum class VideoSyncMode
+  {
+    DISABLED = 0,
+    ENABLED
+  };
+
+} // Dali
+#endif // DALI_VIDEO_SYNC_MODE
+
index 8b19720..2f83702 100644 (file)
@@ -27,9 +27,9 @@
 
 namespace Dali
 {
-class KeyEvent;
+struct KeyEvent;
 class TouchData;
-class WheelEvent;
+struct WheelEvent;
 class RenderTaskList;
 
 namespace DevelWindow
index 789939d..91c5cee 100755 (executable)
@@ -85,6 +85,7 @@ SET( devel_api_adaptor_framework_header_files
   ${adaptor_devel_api_dir}/adaptor-framework/thread-settings.h
   ${adaptor_devel_api_dir}/adaptor-framework/window-devel.h
   ${adaptor_devel_api_dir}/adaptor-framework/component-application.h
+  ${adaptor_devel_api_dir}/adaptor-framework/video-sync-mode.h
 )
 
 
index 17990e4..0345a5f 100755 (executable)
@@ -2,7 +2,7 @@
 #define DALI_INTEGRATION_NATIVE_RENDER_SURFACE_FACTORY_H
 
 /*
- * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2020 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -33,10 +33,12 @@ class NativeRenderSurface;
  * Factory function for native surface
  * A native surface is created.
  *
- * @param [in] positionSize the position and size of the surface to create
+ * @param [in] surfaceSize the size of the surface to create
+ * @param [in] surface the native surface handle of your platform.
+ * If you don't pass this, a native surface will be created.
  * @param [in] isTransparent Whether the surface has an alpha channel
  */
-NativeRenderSurface* CreateNativeSurface( PositionSize positionSize,
+NativeRenderSurface* CreateNativeSurface( SurfaceSize surfaceSize, Any surface,
                                           bool isTransparent );
 
 } // namespace Dali
index 172fee0..2c7f6b7 100644 (file)
@@ -26,6 +26,7 @@
 #include <dali/public-api/object/any.h>
 #include <dali/public-api/object/weak-handle.h>
 #include <dali/integration-api/scene.h>
+#include <dali/public-api/math/uint-16-pair.h>
 
 namespace Dali
 {
@@ -45,7 +46,8 @@ class GraphicsInterface;
 /**
  * @brief The position and size of the render surface.
  */
-typedef Dali::Rect<int> PositionSize;
+using PositionSize =  Dali::Rect<int>;
+using SurfaceSize = Uint16Pair;
 
 /**
  * @brief Interface for a render surface onto which Dali draws.
index 12008ab..b43c376 100644 (file)
@@ -389,7 +389,6 @@ void Adaptor::Start()
   else
   {
     unsigned int maxTextureSize = mConfigurationManager->GetMaxTextureSize();
-    setenv( DALI_ENV_MAX_TEXTURE_SIZE, std::to_string( maxTextureSize ).c_str(), 1 );
     Dali::TizenPlatform::ImageLoader::SetMaxTextureSize( maxTextureSize );
   }
 
index db9a48f..cc4246a 100644 (file)
@@ -65,8 +65,7 @@ struct WebPLoading::Impl
 {
 public:
   Impl( const std::string& url, bool isLocalResource )
-  : mUrl( url ),
-    mLoadingFrame( 0 )
+  : mUrl( url )
   {
 #ifdef DALI_WEBP_ENABLED
     if( ReadWebPInformation( isLocalResource ) )
@@ -180,12 +179,12 @@ public:
 
   std::string mUrl;
   std::vector<uint32_t> mTimeStamp;
-  uint32_t mLoadingFrame;
+  uint32_t mLoadingFrame{0};
 
 #ifdef DALI_WEBP_ENABLED
-  WebPData mWebPData;
-  WebPAnimDecoder* mWebPAnimDecoder;
-  WebPAnimInfo mWebPAnimInfo;
+  WebPData mWebPData{0};
+  WebPAnimDecoder* mWebPAnimDecoder{nullptr};
+  WebPAnimInfo mWebPAnimInfo{0};
 #endif
 };
 
index 64ed46a..7fd5bd8 100755 (executable)
@@ -77,7 +77,7 @@ VideoPlayer::~VideoPlayer()
   }
 }
 
-void VideoPlayer::Initialize()
+void VideoPlayer::Initialize( Dali::Actor actor, VideoSyncMode syncMode )
 {
   char* error = NULL;
 
@@ -99,7 +99,7 @@ void VideoPlayer::Initialize()
     return;
   }
 
-  mPlugin = mCreateVideoPlayerPtr();
+  mPlugin = mCreateVideoPlayerPtr( actor, syncMode );
 
   if( mPlugin == NULL )
   {
@@ -343,6 +343,22 @@ Any VideoPlayer::GetMediaPlayer()
   return NULL;
 }
 
+void VideoPlayer::StartSynchronization()
+{
+  if( mPlugin != NULL )
+  {
+    mPlugin->StartSynchronization();
+  }
+}
+
+void VideoPlayer::FinishSynchronization()
+{
+  if( mPlugin != NULL )
+  {
+    mPlugin->FinishSynchronization();
+  }
+}
+
 } // namespace Adaptor;
 } // namespace Internal;
 } // namespace Dali;
index 71a493e..cac7744 100755 (executable)
@@ -20,6 +20,7 @@
 
 // EXTERNAL INCLUDES
 #include <dali/public-api/object/base-object.h>
+#include <dali/devel-api/adaptor-framework/video-sync-mode.h>
 
 // INTERNAL INCLUDES
 #include <dali/devel-api/adaptor-framework/video-player.h>
@@ -147,7 +148,7 @@ public:
   /**
    * @brief Initializes member data.
    */
-  void Initialize();
+  void Initialize( Dali::Actor actor, VideoSyncMode syncMode );
 
   /**
    * @brief Dali::VideoPlayer::Forward()
@@ -189,6 +190,16 @@ public:
    */
   Any GetMediaPlayer();
 
+  /**
+   * @brief Dali::VideoPlayer::StartSynchronization()
+   */
+  void StartSynchronization();
+
+  /**
+   * @copydoc Dali::VideoPlayer::FinishSynchronization()
+   */
+  void FinishSynchronization();
+
 private:
 
   /**
@@ -214,7 +225,7 @@ private:
   Dali::VideoPlayerPlugin* mPlugin; ///< Videoplayer plugin handle
   void* mHandle; ///< Handle for the loaded library
 
-  typedef Dali::VideoPlayerPlugin* (*CreateVideoPlayerFunction)();
+  typedef Dali::VideoPlayerPlugin* (*CreateVideoPlayerFunction)( Dali::Actor actor, Dali::VideoSyncMode syncMode );
   typedef void (*DestroyVideoPlayerFunction)( Dali::VideoPlayerPlugin* plugin );
 
   CreateVideoPlayerFunction mCreateVideoPlayerPtr;
index 27b3725..6dc3f79 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2018 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2020 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -44,7 +44,7 @@ std::unique_ptr< PixmapRenderSurface > RenderSurfaceFactoryAndroid::CreatePixmap
   return std::unique_ptr< PixmapRenderSurface >( nullptr );
 }
 
-std::unique_ptr< NativeRenderSurface > RenderSurfaceFactoryAndroid::CreateNativeRenderSurface( Dali::PositionSize positionSize, bool isTransparent )
+std::unique_ptr< NativeRenderSurface > RenderSurfaceFactoryAndroid::CreateNativeRenderSurface( SurfaceSize surfaceSize, Any surface, bool isTransparent )
 {
   return std::unique_ptr< NativeRenderSurface >( nullptr );
 }
index fb820de..4ade01e 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_INTERNAL_WINDOWSYSTEM_ANDROID_RENDER_SURFACE_FACTORY_ANDROID_H
 
 /*
- * Copyright (c) 2018 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2020 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -34,7 +34,7 @@ public:
 
   std::unique_ptr< PixmapRenderSurface > CreatePixmapRenderSurface( Dali::PositionSize positionSize, Any surface, bool isTransparent = false ) override;
 
-  std::unique_ptr< NativeRenderSurface > CreateNativeRenderSurface( Dali::PositionSize positionSize, bool isTransparent = false ) override;
+  std::unique_ptr< NativeRenderSurface > CreateNativeRenderSurface( SurfaceSize surfaceSize, Any surface, bool isTransparent = false ) override;
 };
 
 } // namespace Adaptor
index 3b07c24..9263c40 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2020 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
 namespace Dali
 {
 
-DALI_ADAPTOR_API NativeRenderSurface* CreateNativeSurface( PositionSize positionSize, bool isTransparent )
+DALI_ADAPTOR_API NativeRenderSurface* CreateNativeSurface( SurfaceSize surfaceSize, Any surface, bool isTransparent )
 {
   auto renderSurfaceFactory = Dali::Internal::Adaptor::GetRenderSurfaceFactory();
-  auto nativeRenderSurface =  renderSurfaceFactory->CreateNativeRenderSurface( positionSize, isTransparent );
+  auto nativeRenderSurface =  renderSurfaceFactory->CreateNativeRenderSurface( surfaceSize, surface, isTransparent );
   return nativeRenderSurface.release();
 }
 
index 408ae14..a5d8d72 100644 (file)
@@ -49,7 +49,7 @@ public:
 
   virtual std::unique_ptr< PixmapRenderSurface > CreatePixmapRenderSurface( Dali::PositionSize positionSize, Any surface, bool isTransparent = false ) = 0;
 
-  virtual std::unique_ptr< NativeRenderSurface > CreateNativeRenderSurface( Dali::PositionSize positionSize, bool isTransparent = false ) = 0;
+  virtual std::unique_ptr< NativeRenderSurface > CreateNativeRenderSurface( SurfaceSize surfaceSize, Any surface, bool isTransparent = false ) = 0;
 };
 
 extern std::unique_ptr< RenderSurfaceFactory > GetRenderSurfaceFactory();
index ef2f93b..bd23041 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2018 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2020 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -44,9 +44,9 @@ std::unique_ptr< PixmapRenderSurface > RenderSurfaceFactoryEcoreWl::CreatePixmap
   return std::unique_ptr< PixmapRenderSurface >( nullptr );
 }
 
-std::unique_ptr< NativeRenderSurface > RenderSurfaceFactoryEcoreWl::CreateNativeRenderSurface( Dali::PositionSize positionSize, bool isTransparent )
+std::unique_ptr< NativeRenderSurface > RenderSurfaceFactoryEcoreWl::CreateNativeRenderSurface( SurfaceSize surfaceSize, Any surface, bool isTransparent )
 {
-  return Utils::MakeUnique< NativeRenderSurfaceEcoreWl >( positionSize, isTransparent );
+  return Utils::MakeUnique< NativeRenderSurfaceEcoreWl >( surfaceSize, surface, isTransparent );
 }
 
 // this should be created from somewhere
index 8db3813..a20bc74 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_INTERNAL_WINDOWSYSTEM_TIZENWAYLAND_RENDER_SURFACE_FACTORY_ECORE_WL_H
 
 /*
- * Copyright (c) 2018 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2020 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -34,7 +34,7 @@ public:
 
   std::unique_ptr< PixmapRenderSurface > CreatePixmapRenderSurface( Dali::PositionSize positionSize, Any surface, bool isTransparent = false ) override;
 
-  std::unique_ptr< NativeRenderSurface > CreateNativeRenderSurface( Dali::PositionSize positionSize, bool isTransparent = false ) override;
+  std::unique_ptr< NativeRenderSurface > CreateNativeRenderSurface( SurfaceSize surfaceSize, Any surface, bool isTransparent = false ) override;
 };
 
 } // namespace Adaptor
index e0069a7..1b1f816 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2018 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2020 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -44,9 +44,9 @@ std::unique_ptr< PixmapRenderSurface > RenderSurfaceFactoryEcoreWl2::CreatePixma
   return std::unique_ptr< PixmapRenderSurface >( nullptr );
 }
 
-std::unique_ptr< NativeRenderSurface > RenderSurfaceFactoryEcoreWl2::CreateNativeRenderSurface( Dali::PositionSize positionSize, bool isTransparent )
+std::unique_ptr< NativeRenderSurface > RenderSurfaceFactoryEcoreWl2::CreateNativeRenderSurface( SurfaceSize surfaceSize, Any surface, bool isTransparent )
 {
-  return Utils::MakeUnique< NativeRenderSurfaceEcoreWl >( positionSize, isTransparent );
+  return Utils::MakeUnique< NativeRenderSurfaceEcoreWl >( surfaceSize, surface, isTransparent );
 }
 
 // this should be created from somewhere
index fbb4eff..eca7f5d 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_INTERNAL_WINDOWSYSTEM_TIZENWAYLAND_RENDER_SURFACE_FACTORY_ECORE_WL2_H
 
 /*
- * Copyright (c) 2018 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2020 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -34,7 +34,7 @@ public:
 
   std::unique_ptr< PixmapRenderSurface > CreatePixmapRenderSurface( Dali::PositionSize positionSize, Any surface, bool isTransparent = false ) override;
 
-  std::unique_ptr< NativeRenderSurface > CreateNativeRenderSurface( Dali::PositionSize positionSize, bool isTransparent = false ) override;
+  std::unique_ptr< NativeRenderSurface > CreateNativeRenderSurface( SurfaceSize surfaceSize, Any surface, bool isTransparent = false ) override;
 };
 
 } // namespace Adaptor
index 754fa5a..db4fa50 100755 (executable)
@@ -2345,6 +2345,8 @@ void WindowBaseEcoreWl2::CreateWindow( PositionSize positionSize )
     DALI_ASSERT_ALWAYS( 0 && "Failed to get display" );
   }
 
+  ecore_wl2_display_sync( display );
+
   mEcoreWindow = ecore_wl2_window_new( display, NULL, positionSize.x, positionSize.y, positionSize.width, positionSize.height );
 
   if ( mEcoreWindow == 0 )
index 48069c7..7ade18f 100644 (file)
@@ -53,8 +53,8 @@ Debug::Filter* gNativeSurfaceLogFilter = Debug::Filter::New(Debug::Verbose, fals
 
 } // unnamed namespace
 
-NativeRenderSurfaceEcoreWl::NativeRenderSurfaceEcoreWl( Dali::PositionSize positionSize, bool isTransparent )
-: mPosition( positionSize ),
+NativeRenderSurfaceEcoreWl::NativeRenderSurfaceEcoreWl( SurfaceSize surfaceSize, Any surface, bool isTransparent )
+: mSurfaceSize( surfaceSize ),
   mRenderNotification( NULL ),
   mGraphics( NULL ),
   mEGL( nullptr ),
@@ -70,8 +70,16 @@ NativeRenderSurfaceEcoreWl::NativeRenderSurfaceEcoreWl( Dali::PositionSize posit
 {
   Dali::Internal::Adaptor::WindowSystem::Initialize();
 
-  CreateNativeRenderable();
-  setenv( "EGL_PLATFORM", "tbm", 1 );
+  if( surface.Empty() )
+  {
+    CreateNativeRenderable();
+  }
+  else
+  {
+    // check we have a valid type
+    DALI_ASSERT_ALWAYS( ( surface.GetType() == typeid (tbm_surface_queue_h) ) && "Surface type is invalid" );
+    mTbmQueue = AnyCast< tbm_surface_queue_h >( surface );
+  }
 }
 
 NativeRenderSurfaceEcoreWl::~NativeRenderSurfaceEcoreWl()
@@ -120,7 +128,7 @@ void NativeRenderSurfaceEcoreWl::WaitUntilSurfaceReplaced()
 
 PositionSize NativeRenderSurfaceEcoreWl::GetPositionSize() const
 {
-  return mPosition;
+  return PositionSize( 0, 0, static_cast<int>( mSurfaceSize.GetWidth() ), static_cast<int>( mSurfaceSize.GetHeight() ) );
 }
 
 void NativeRenderSurfaceEcoreWl::GetDpi( unsigned int& dpiHorizontal, unsigned int& dpiVertical )
@@ -145,7 +153,6 @@ void NativeRenderSurfaceEcoreWl::GetDpi( unsigned int& dpiHorizontal, unsigned i
 void NativeRenderSurfaceEcoreWl::InitializeGraphics()
 {
   DALI_LOG_TRACE_METHOD( gNativeSurfaceLogFilter );
-  unsetenv( "EGL_PLATFORM" );
 
   mGraphics = &mAdaptor->GetGraphicsInterface();
   auto eglGraphics = static_cast<Internal::Adaptor::EglGraphics *>(mGraphics);
@@ -209,7 +216,8 @@ void NativeRenderSurfaceEcoreWl::MoveResize( Dali::PositionSize positionSize )
     DALI_LOG_ERROR( "Failed to resize tbm_surface_queue" );
   }
 
-  mPosition = positionSize;
+  mSurfaceSize.SetWidth( static_cast<uint16_t>( positionSize.width ) );
+  mSurfaceSize.SetHeight( static_cast<uint16_t>( positionSize.height ) );
 }
 
 void NativeRenderSurfaceEcoreWl::StartRender()
@@ -326,10 +334,13 @@ void NativeRenderSurfaceEcoreWl::ReleaseLock()
 
 void NativeRenderSurfaceEcoreWl::CreateNativeRenderable()
 {
+  int width = static_cast<int>( mSurfaceSize.GetWidth() );
+  int height = static_cast<int>( mSurfaceSize.GetHeight() );
+
   // check we're creating one with a valid size
-  DALI_ASSERT_ALWAYS( mPosition.width > 0 && mPosition.height > 0 && "tbm_surface size is invalid" );
+  DALI_ASSERT_ALWAYS( width > 0 && height > 0 && "tbm_surface size is invalid" );
 
-  mTbmQueue = tbm_surface_queue_create( 3, mPosition.width, mPosition.height, mTbmFormat, TBM_BO_DEFAULT );
+  mTbmQueue = tbm_surface_queue_create( 3, width, height, mTbmFormat, TBM_BO_DEFAULT );
 
   if( mTbmQueue )
   {
index bfca63c..ea9c6d7 100644 (file)
@@ -44,10 +44,11 @@ public:
 
   /**
     * Uses an Wayland surface to render to.
-    * @param [in] positionSize the position and size of the surface
+    * @param [in] surfaceSize the size of the surface
+    * @param [in] surface the native surface handle
     * @param [in] isTransparent if it is true, surface has 32 bit color depth, otherwise, 24 bit
     */
-  NativeRenderSurfaceEcoreWl( Dali::PositionSize positionSize, bool isTransparent = false );
+  NativeRenderSurfaceEcoreWl( SurfaceSize surfaceSize, Any surface, bool isTransparent = false );
 
   /**
    * @brief Destructor
@@ -172,7 +173,7 @@ private:
 
 private: // Data
 
-  PositionSize                           mPosition;
+  SurfaceSize                            mSurfaceSize;
   TriggerEventInterface*                 mRenderNotification;
   Internal::Adaptor::GraphicsInterface*  mGraphics;                  ///< The graphics interface
   EglInterface*                          mEGL;
index b8b1f7e..c5ba610 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2020 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -44,7 +44,7 @@ std::unique_ptr< PixmapRenderSurface > RenderSurfaceFactoryEcoreX::CreatePixmapR
   return Utils::MakeUnique< PixmapRenderSurfaceEcoreX >( positionSize, surface, isTransparent );
 }
 
-std::unique_ptr< NativeRenderSurface > RenderSurfaceFactoryEcoreX::CreateNativeRenderSurface( Dali::PositionSize positionSize, bool isTransparent )
+std::unique_ptr< NativeRenderSurface > RenderSurfaceFactoryEcoreX::CreateNativeRenderSurface( SurfaceSize surfaceSize, Any surface, bool isTransparent )
 {
   return std::unique_ptr< NativeRenderSurface >( nullptr );
 }
index 47086a6..6fd5981 100644 (file)
@@ -2,7 +2,7 @@
 #define DALI_INTERNAL_WINDOWSYSTEM_ECOREX_RENDER_SURFACE_FACTORY_ECORE_X_H
 
 /*
- * Copyright (c) 2018 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2020 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -34,7 +34,7 @@ public:
 
   std::unique_ptr< PixmapRenderSurface > CreatePixmapRenderSurface( Dali::PositionSize positionSize, Any surface, bool isTransparent = false ) override;
 
-  std::unique_ptr< NativeRenderSurface > CreateNativeRenderSurface( Dali::PositionSize positionSize, bool isTransparent = false ) override;
+  std::unique_ptr< NativeRenderSurface > CreateNativeRenderSurface( SurfaceSize surfaceSize, Any surface, bool isTransparent = false ) override;
 };
 
 } // namespace Adaptor
index efb6714..1864367 100755 (executable)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2020 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -45,7 +45,7 @@ std::unique_ptr< PixmapRenderSurface > RenderSurfaceFactoryWin::CreatePixmapRend
   return nullptr;
 }
 
-std::unique_ptr< NativeRenderSurface > RenderSurfaceFactoryWin::CreateNativeRenderSurface( Dali::PositionSize positionSize, bool isTransparent )
+std::unique_ptr< NativeRenderSurface > RenderSurfaceFactoryWin::CreateNativeRenderSurface( SurfaceSize surfaceSize, Any surface, bool isTransparent )
 {
   return std::unique_ptr< NativeRenderSurface >( nullptr );
 }
index fd05c74..a4e6626 100755 (executable)
@@ -2,7 +2,7 @@
 #define DALI_INTERNAL_WINDOWSYSTEM_WIN_RENDER_SURFACE_FACTORY_WIN_H
 
 /*
- * Copyright (c) 2018 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2020 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -34,7 +34,7 @@ public:
 
   std::unique_ptr< PixmapRenderSurface > CreatePixmapRenderSurface( Dali::PositionSize positionSize, Any surface, bool isTransparent = false ) override;
 
-  std::unique_ptr< NativeRenderSurface > CreateNativeRenderSurface( Dali::PositionSize positionSize, bool isTransparent = false ) override;
+  std::unique_ptr< NativeRenderSurface > CreateNativeRenderSurface(SurfaceSize surfaceSize, Any surface, bool isTransparent = false) override;
 };
 
 } // namespace Adaptor
index 0a8cd11..b0fb3aa 100644 (file)
@@ -28,7 +28,7 @@ namespace Dali
 
 const unsigned int ADAPTOR_MAJOR_VERSION = 1;
 const unsigned int ADAPTOR_MINOR_VERSION = 9;
-const unsigned int ADAPTOR_MICRO_VERSION = 21;
+const unsigned int ADAPTOR_MICRO_VERSION = 22;
 const char * const ADAPTOR_BUILD_DATE    = __DATE__ " " __TIME__;
 
 #ifdef DEBUG_ENABLED
index 886a037..da1e28e 100644 (file)
@@ -17,7 +17,7 @@
 
 Name:       dali2-adaptor
 Summary:    The DALi Tizen Adaptor
-Version:    1.9.21
+Version:    1.9.22
 Release:    1
 Group:      System/Libraries
 License:    Apache-2.0 and BSD-3-Clause and MIT