Merge "Remove deprecated and unused ActionButton" into devel/master
authorAdeel Kazmi <adeel.kazmi@samsung.com>
Fri, 21 Aug 2020 10:54:36 +0000 (10:54 +0000)
committerGerrit Code Review <gerrit@review>
Fri, 21 Aug 2020 10:54:36 +0000 (10:54 +0000)
17 files changed:
README.md
build/tizen/CMakeLists.txt
dali/devel-api/adaptor-framework/accessibility-action-handler.h
dali/devel-api/adaptor-framework/accessibility-adaptor.cpp
dali/devel-api/adaptor-framework/accessibility-adaptor.h
dali/devel-api/adaptor-framework/window-devel.cpp
dali/integration-api/adaptor-framework/adaptor.h
dali/internal/accessibility/common/accessibility-adaptor-impl.cpp
dali/internal/accessibility/common/accessibility-adaptor-impl.h
dali/internal/adaptor/common/adaptor-impl.cpp
dali/internal/adaptor/common/adaptor-impl.h
dali/internal/adaptor/common/adaptor.cpp
dali/internal/window-system/common/window-render-surface.cpp
dali/internal/window-system/common/window-render-surface.h
dali/public-api/adaptor-framework/window.cpp
dali/public-api/dali-adaptor-version.cpp
packaging/dali-adaptor.spec

index b43261f..e3bed27 100644 (file)
--- a/README.md
+++ b/README.md
@@ -23,6 +23,7 @@
  - Ubuntu 16.04 or later
  - Environment created using dali_env script in dali-core repository
  - GCC version 9
+ - Cmake version 3.8.2 or later
 
 DALi requires a compiler supporting C++17 features.
 
index b1f48de..3ece9fd 100644 (file)
@@ -1,8 +1,8 @@
-CMAKE_MINIMUM_REQUIRED(VERSION 3.1)
+CMAKE_MINIMUM_REQUIRED(VERSION 3.8.2)
 CMAKE_POLICY(SET CMP0012 NEW) # Prevent dereferencing of OFF/ON as variables
 
 SET(CMAKE_C_STANDARD 99)
-SET(CMAKE_CXX_STANDARD 14)
+SET(CMAKE_CXX_STANDARD 17)
 PROJECT(${name} CXX)
 SET(PKG_NAME ${name})
 
index 8bc2ac8..4a9e233 100644 (file)
@@ -198,13 +198,6 @@ public:
    */
   virtual bool AccessibilityActionStartStop() = 0;
 
-  /**
-   * Perform the accessibility action to mouse move (by one finger tap & hold and move).
-   * @param touch touch data
-   * @return whether the accessibility action is performed or not.
-   */
-  virtual bool AccessibilityActionTouch(const Dali::TouchEvent& touch) = 0;
-
 }; // class AccessibilityActionHandler
 
 } // namespace Dali
index f635aba..f487c03 100644 (file)
@@ -107,11 +107,6 @@ bool AccessibilityAdaptor::HandleActionScrollEvent(const TouchPoint& point, unsi
   return Internal::Adaptor::AccessibilityAdaptor::GetImplementation(*this).HandleActionScrollEvent(point, timeStamp);
 }
 
-bool AccessibilityAdaptor::HandleActionTouchEvent(const TouchPoint& point, unsigned long timeStamp)
-{
-  return Internal::Adaptor::AccessibilityAdaptor::GetImplementation(*this).HandleActionTouchEvent(point, timeStamp);
-}
-
 bool AccessibilityAdaptor::HandleActionBackEvent()
 {
   return Internal::Adaptor::AccessibilityAdaptor::GetImplementation(*this).HandleActionBackEvent();
index 14b856b..9be2483 100755 (executable)
@@ -188,16 +188,6 @@ public:
   bool HandleActionScrollEvent(const TouchPoint& point, unsigned long timeStamp);
 
   /**
-   * @brief Handle the accessibility action to move for the current focused actor
-   * (by 1 finger tap & hold and move).
-   *
-   * @param[in]  point      The touch point information.
-   * @param[in]  timeStamp  The time the touch occurred.
-   * @return Whether the action is performed successfully or not.
-   */
-  bool HandleActionTouchEvent(const TouchPoint& point, unsigned long timeStamp);
-
-  /**
    * @brief Handle the accessibility action to navigate back (by two fingers circle draw).
    * @return Whether the action is performed successfully or not.
    */
index c3c8c18..0a65690 100644 (file)
@@ -55,7 +55,7 @@ Window New(Any surface, PositionSize windowPosition, const std::string& name, co
     if (isAdaptorAvailable)
     {
       Dali::Adaptor& adaptor = Internal::Adaptor::Adaptor::Get();
-      Internal::Adaptor::Adaptor::GetImplementation(adaptor).AddWindow(sceneHolder, name, className, isTransparent);
+      Internal::Adaptor::Adaptor::GetImplementation(adaptor).AddWindow(sceneHolder);
     }
     newWindow = Window(window);
   }
index 94c5f81..834f25c 100644 (file)
@@ -254,14 +254,8 @@ public:
    * @brief Adds a new Window instance to the Adaptor
    *
    * @param[in]  childWindow The child window instance
-   * @param[in]  childWindowName The child window title/name
-   * @param[in]  childWindowClassName The class name that the child window belongs to
-   * @param[in]  childWindowMode The mode of the child window
-   */
-  bool AddWindow( Dali::Integration::SceneHolder childWindow,
-                  const std::string& childWindowName,
-                  const std::string& childWindowClassName,
-                  bool childWindowMode );
+   */
+  bool AddWindow( Dali::Integration::SceneHolder childWindow );
 
   /**
    * @brief Removes a previously added @p callback.
index 3f877f1..5700fce 100644 (file)
@@ -270,19 +270,6 @@ bool AccessibilityAdaptor::HandleActionScrollEvent(const TouchPoint& point, uint
   return ret;
 }
 
-bool AccessibilityAdaptor::HandleActionTouchEvent(const TouchPoint& point, uint32_t timeStamp)
-{
-  bool ret = false;
-
-  Dali::TouchEvent touch = Integration::NewTouchEvent( timeStamp, point );
-
-  if( mActionHandler )
-  {
-    ret = mActionHandler->AccessibilityActionTouch( touch );
-  }
-  return ret;
-}
-
 bool AccessibilityAdaptor::HandleActionBackEvent()
 {
   bool ret = false;
index d59f69f..2e1511e 100644 (file)
@@ -144,11 +144,6 @@ public:
   bool HandleActionScrollEvent(const TouchPoint& point, uint32_t timeStamp);
 
   /**
-   * @copydoc Dali::AccessibilityAdaptor::HandleActionTouchEvent()
-   */
-  bool HandleActionTouchEvent(const TouchPoint& point, uint32_t timeStamp);
-
-  /**
    * @copydoc Dali::AccessibilityAdaptor::HandleActionBackEvent()
    */
   bool HandleActionBackEvent();
index 56d11fb..c496606 100644 (file)
@@ -648,7 +648,7 @@ void Adaptor::SetPreRenderCallback( CallbackBase* callback )
   mThreadController->SetPreRenderCallback( callback );
 }
 
-bool Adaptor::AddWindow( Dali::Integration::SceneHolder childWindow, const std::string& childWindowName, const std::string& childWindowClassName, bool childWindowMode )
+bool Adaptor::AddWindow( Dali::Integration::SceneHolder childWindow )
 {
   Internal::Adaptor::SceneHolder& windowImpl = Dali::GetImplementation( childWindow );
   windowImpl.SetAdaptor( Get() );
index 1d65f27..29d8620 100644 (file)
@@ -249,14 +249,8 @@ public: // AdaptorInternalServices implementation
   /**
    * Adds a new Window instance to the Adaptor
    * @param[in]  childWindow The child window instance
-   * @param[in]  childWindowName The child window title/name
-   * @param[in]  childWindowClassName The class name that the child window belongs to
-   * @param[in]  childWindowMode The mode of the child window
-   */
-  virtual bool AddWindow( Dali::Integration::SceneHolder childWindow,
-                          const std::string& childWindowName,
-                          const std::string& childWindowClassName,
-                          bool childWindowMode );
+   */
+  virtual bool AddWindow( Dali::Integration::SceneHolder childWindow );
 
   /**
    * Removes an existing Window instance from the Adaptor
index cbb3d19..add3245 100644 (file)
@@ -112,10 +112,10 @@ bool Adaptor::AddIdle( CallbackBase* callback, bool hasReturnValue )
   return mImpl->AddIdle( callback, hasReturnValue, false );
 }
 
-bool Adaptor::AddWindow( Dali::Integration::SceneHolder childWindow, const std::string& childWindowName, const std::string& childWindowClassName, bool childWindowMode )
+bool Adaptor::AddWindow( Dali::Integration::SceneHolder childWindow )
 {
   DALI_ASSERT_ALWAYS( IsAvailable() && "Adaptor not instantiated" );
-  return mImpl->AddWindow( childWindow, childWindowName, childWindowClassName, childWindowMode );
+  return mImpl->AddWindow( childWindow );
 }
 
 void Adaptor::RemoveIdle( CallbackBase* callback )
index 509c174..7326047 100644 (file)
@@ -67,6 +67,7 @@ WindowRenderSurface::WindowRenderSurface( Dali::PositionSize positionSize, Any s
   mColorDepth( isTransparent ? COLOR_DEPTH_32 : COLOR_DEPTH_24 ),
   mOutputTransformedSignal(),
   mFrameCallbackInfoContainer(),
+  mMutex(),
   mRotationAngle( 0 ),
   mScreenRotationAngle( 0 ),
   mOwnSurface( false ),
@@ -361,22 +362,21 @@ bool WindowRenderSurface::PreRender( bool resizingSurface, const std::vector<Rec
   Dali::Integration::Scene scene = mScene.GetHandle();
   if( scene )
   {
+    bool needFrameRenderedTrigger = false;
+
     scene.GetFrameRenderedCallback( callbacks );
     if( !callbacks.empty() )
     {
       int frameRenderedSync = mWindowBase->CreateFrameRenderedSyncFence();
       if( frameRenderedSync != -1 )
       {
+        Dali::Mutex::ScopedLock lock( mMutex );
+
         DALI_LOG_INFO( gWindowRenderSurfaceLogFilter, Debug::Verbose, "WindowRenderSurface::PreRender: CreateFrameRenderedSyncFence [%d]\n", frameRenderedSync );
 
         mFrameCallbackInfoContainer.push_back( std::unique_ptr< FrameCallbackInfo >( new FrameCallbackInfo( callbacks, frameRenderedSync ) ) );
 
-        if( !mFrameRenderedTrigger )
-        {
-          mFrameRenderedTrigger = std::unique_ptr< TriggerEventInterface >( TriggerEventFactory::CreateTriggerEvent( MakeCallback( this, &WindowRenderSurface::ProcessFrameCallback ),
-                                                                                                                     TriggerEventInterface::KEEP_ALIVE_AFTER_TRIGGER ) );
-        }
-        mFrameRenderedTrigger->Trigger();
+        needFrameRenderedTrigger = true;
       }
       else
       {
@@ -393,16 +393,13 @@ bool WindowRenderSurface::PreRender( bool resizingSurface, const std::vector<Rec
       int framePresentedSync = mWindowBase->CreateFramePresentedSyncFence();
       if( framePresentedSync != -1 )
       {
+        Dali::Mutex::ScopedLock lock( mMutex );
+
         DALI_LOG_INFO( gWindowRenderSurfaceLogFilter, Debug::Verbose, "WindowRenderSurface::PreRender: CreateFramePresentedSyncFence [%d]\n", framePresentedSync );
 
         mFrameCallbackInfoContainer.push_back( std::unique_ptr< FrameCallbackInfo >( new FrameCallbackInfo( callbacks, framePresentedSync ) ) );
 
-        if( !mFrameRenderedTrigger )
-        {
-          mFrameRenderedTrigger = std::unique_ptr< TriggerEventInterface >( TriggerEventFactory::CreateTriggerEvent( MakeCallback( this, &WindowRenderSurface::ProcessFrameCallback ),
-                                                                                                                     TriggerEventInterface::KEEP_ALIVE_AFTER_TRIGGER ) );
-        }
-        mFrameRenderedTrigger->Trigger();
+        needFrameRenderedTrigger = true;
       }
       else
       {
@@ -412,6 +409,16 @@ bool WindowRenderSurface::PreRender( bool resizingSurface, const std::vector<Rec
       // Clear callbacks
       callbacks.clear();
     }
+
+    if( needFrameRenderedTrigger )
+    {
+      if( !mFrameRenderedTrigger )
+      {
+        mFrameRenderedTrigger = std::unique_ptr< TriggerEventInterface >( TriggerEventFactory::CreateTriggerEvent( MakeCallback( this, &WindowRenderSurface::ProcessFrameCallback ),
+                                                                                                                   TriggerEventInterface::KEEP_ALIVE_AFTER_TRIGGER ) );
+      }
+      mFrameRenderedTrigger->Trigger();
+    }
   }
 
   MakeContextCurrent();
@@ -588,6 +595,8 @@ void WindowRenderSurface::ProcessRotationRequest()
 
 void WindowRenderSurface::ProcessFrameCallback()
 {
+  Dali::Mutex::ScopedLock lock( mMutex );
+
   for( auto&& iter : mFrameCallbackInfoContainer )
   {
     if( !iter->fileDescriptorMonitor )
@@ -611,19 +620,29 @@ void WindowRenderSurface::OnFileDescriptorEventDispatched( FileDescriptorMonitor
 
   DALI_LOG_INFO( gWindowRenderSurfaceLogFilter, Debug::Verbose, "WindowRenderSurface::OnFileDescriptorEventDispatched: Frame rendered [%d]\n", fileDescriptor );
 
-  auto frameCallbackInfo = std::find_if( mFrameCallbackInfoContainer.begin(), mFrameCallbackInfoContainer.end(),
-                                    [fileDescriptor]( std::unique_ptr< FrameCallbackInfo >& callbackInfo )
-                                    {
-                                      return callbackInfo->fileDescriptor == fileDescriptor;
-                                    } );
-  if( frameCallbackInfo != mFrameCallbackInfoContainer.end() )
+  std::unique_ptr< FrameCallbackInfo > callbackInfo;
+  {
+    Dali::Mutex::ScopedLock lock( mMutex );
+    auto frameCallbackInfo = std::find_if( mFrameCallbackInfoContainer.begin(), mFrameCallbackInfoContainer.end(),
+                                      [fileDescriptor]( std::unique_ptr< FrameCallbackInfo >& callbackInfo )
+                                      {
+                                        return callbackInfo->fileDescriptor == fileDescriptor;
+                                      } );
+    if( frameCallbackInfo != mFrameCallbackInfoContainer.end() )
+    {
+      callbackInfo = std::move( *frameCallbackInfo );
+
+      mFrameCallbackInfoContainer.erase( frameCallbackInfo );
+    }
+  }
+
+  // Call the connected callback
+  if( callbackInfo )
   {
-    // Call the connected callback
-    for( auto&& iter : ( *frameCallbackInfo )->callbacks )
+    for( auto&& iter : ( callbackInfo )->callbacks )
     {
       CallbackBase::Execute( *( iter.first ), iter.second );
     }
-    mFrameCallbackInfoContainer.erase( frameCallbackInfo );
   }
 }
 
index 6f982e4..6b72a55 100644 (file)
@@ -21,6 +21,7 @@
 // EXTERNAL INCLUDES
 #include <dali/public-api/signals/connection-tracker.h>
 #include <dali/public-api/signals/dali-signal.h>
+#include <dali/devel-api/threading/mutex.h>
 #include <dali/integration-api/scene.h>
 #include <unistd.h>
 
@@ -284,6 +285,7 @@ private: // Data
   ColorDepth                      mColorDepth;         ///< Color depth of surface (32 bit or 24 bit)
   OutputSignalType                mOutputTransformedSignal;
   FrameCallbackInfoContainer      mFrameCallbackInfoContainer;
+  Dali::Mutex                     mMutex;
   int                             mRotationAngle;
   int                             mScreenRotationAngle;
   bool                            mOwnSurface;         ///< Whether we own the surface (responsible for deleting it)
index 8a15192..000f350 100644 (file)
@@ -56,7 +56,7 @@ Window Window::New(PositionSize posSize, const std::string& name, const std::str
     if (isAdaptorAvailable)
     {
       Dali::Adaptor& adaptor = Internal::Adaptor::Adaptor::Get();
-      Internal::Adaptor::Adaptor::GetImplementation(adaptor).AddWindow(sceneHolder, name, className, isTransparent);
+      Internal::Adaptor::Adaptor::GetImplementation(adaptor).AddWindow(sceneHolder);
     }
     newWindow = Window(window);
   }
index f5001f3..263b4c6 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 = 25;
+const unsigned int ADAPTOR_MICRO_VERSION = 26;
 const char * const ADAPTOR_BUILD_DATE    = __DATE__ " " __TIME__;
 
 #ifdef DEBUG_ENABLED
index 68a4f56..0813d0c 100644 (file)
@@ -17,7 +17,7 @@
 
 Name:       dali2-adaptor
 Summary:    The DALi Tizen Adaptor
-Version:    1.9.25
+Version:    1.9.26
 Release:    1
 Group:      System/Libraries
 License:    Apache-2.0 and BSD-3-Clause and MIT