- 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.
-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})
*/
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
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();
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.
*/
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);
}
* @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.
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;
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();
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() );
/**
* 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
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 )
mColorDepth( isTransparent ? COLOR_DEPTH_32 : COLOR_DEPTH_24 ),
mOutputTransformedSignal(),
mFrameCallbackInfoContainer(),
+ mMutex(),
mRotationAngle( 0 ),
mScreenRotationAngle( 0 ),
mOwnSurface( false ),
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
{
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
{
// 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();
void WindowRenderSurface::ProcessFrameCallback()
{
+ Dali::Mutex::ScopedLock lock( mMutex );
+
for( auto&& iter : mFrameCallbackInfoContainer )
{
if( !iter->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 );
}
}
// 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>
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)
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);
}
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
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