From: David Steele Date: Fri, 22 Feb 2019 14:32:47 +0000 (+0000) Subject: [dali_1.4.8] Merge branch 'devel/master' X-Git-Tag: dali_1.9.31~3^2~80 X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-core.git;a=commitdiff_plain;h=36374effd5b157ea8e8101ccc461ef9488bc057d;hp=b87b780d2eca72f62a5a6a2af80fb4f1909072da [dali_1.4.8] Merge branch 'devel/master' Change-Id: I957c37f131e0e22506ea813053b9cde022224bc9 --- diff --git a/automated-tests/src/dali/utc-Dali-HoverProcessing.cpp b/automated-tests/src/dali/utc-Dali-HoverProcessing.cpp index 800dea9..df73182 100644 --- a/automated-tests/src/dali/utc-Dali-HoverProcessing.cpp +++ b/automated-tests/src/dali/utc-Dali-HoverProcessing.cpp @@ -20,7 +20,6 @@ #include #include #include -#include #include #include @@ -1167,47 +1166,6 @@ int UtcDaliHoverActorUnStaged(void) END_TEST; } -int UtcDaliHoverSystemOverlayActor(void) -{ - TestApplication application; - Dali::Integration::Core& core( application.GetCore() ); - Dali::Integration::SystemOverlay& systemOverlay( core.GetSystemOverlay() ); - - Dali::RenderTaskList overlayRenderTaskList = Integration::RenderTaskList::New(); - Dali::Actor overlayRootActor = systemOverlay.GetDefaultRootActor(); - Dali::CameraActor overlayCameraActor = systemOverlay.GetDefaultCameraActor(); - Integration::RenderTaskList::CreateTask( overlayRenderTaskList, overlayRootActor, overlayCameraActor ); - systemOverlay.SetOverlayRenderTasks( overlayRenderTaskList ); - - // Create an actor and add it to the system overlay. - Actor systemActor = Actor::New(); - systemActor.SetSize(100.0f, 100.0f); - systemActor.SetAnchorPoint(AnchorPoint::TOP_LEFT); - systemOverlay.Add( systemActor ); - - // Create an actor and add it to the stage as per normal, same position and size as systemActor - Actor actor = Actor::New(); - actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); - Stage::GetCurrent().Add(actor); - - // Connect to the hover signals. - SignalData data; - HoverEventFunctor functor( data ); - systemActor.HoveredSignal().Connect( &application, functor ); - actor.HoveredSignal().Connect( &application, functor ); - - // Render and notify - application.SendNotification(); - application.Render(); - - // Emit a started signal, the system overlay is drawn last so is at the top, should hit the systemActor. - application.ProcessEvent( GenerateSingleHover( TouchPoint::Started, Vector2( 10.0f, 10.0f ) ) ); - DALI_TEST_EQUALS( true, data.functorCalled, TEST_LOCATION ); - DALI_TEST_CHECK( systemActor == data.hoveredActor ); - END_TEST; -} - int UtcDaliHoverLeaveActorReadded(void) { TestApplication application; diff --git a/automated-tests/src/dali/utc-Dali-LongPressGestureDetector.cpp b/automated-tests/src/dali/utc-Dali-LongPressGestureDetector.cpp index 908cb9b..d151a17 100644 --- a/automated-tests/src/dali/utc-Dali-LongPressGestureDetector.cpp +++ b/automated-tests/src/dali/utc-Dali-LongPressGestureDetector.cpp @@ -21,7 +21,6 @@ #include #include #include -#include #include #include #include @@ -1265,160 +1264,6 @@ int UtcDaliLongPressGestureActorStagedAndDestroyed(void) END_TEST; } -int UtcDaliLongPressGestureSystemOverlay(void) -{ - TestApplication application; - Dali::Integration::Core& core = application.GetCore(); - Dali::Integration::SystemOverlay& systemOverlay( core.GetSystemOverlay() ); - - Dali::RenderTaskList overlayRenderTaskList = Integration::RenderTaskList::New(); - Dali::Actor overlayRootActor = systemOverlay.GetDefaultRootActor(); - Dali::CameraActor overlayCameraActor = systemOverlay.GetDefaultCameraActor(); - Integration::RenderTaskList::CreateTask( overlayRenderTaskList, overlayRootActor, overlayCameraActor ); - systemOverlay.SetOverlayRenderTasks( overlayRenderTaskList ); - - Actor actor = Actor::New(); - actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); - systemOverlay.Add(actor); - - // Render and notify - application.SendNotification(); - application.Render(); - - SignalData data; - GestureReceivedFunctor functor(data); - - LongPressGestureDetector detector = LongPressGestureDetector::New(); - detector.Attach(actor); - detector.DetectedSignal().Connect(&application, functor); - - // Do a long press inside actor's area - Vector2 screenCoords( 50.0f, 50.0f ); - application.ProcessEvent( GenerateLongPress( Gesture::Possible, 1u, screenCoords ) ); - application.ProcessEvent( GenerateLongPress( Gesture::Started, 1u, screenCoords ) ); - DALI_TEST_EQUALS( true, data.functorCalled, TEST_LOCATION ); - END_TEST; -} - -int UtcDaliLongPressGestureBehindTouchableSystemOverlay(void) -{ - TestApplication application; - Dali::Integration::Core& core = application.GetCore(); - Dali::Integration::SystemOverlay& systemOverlay( core.GetSystemOverlay() ); - - Dali::RenderTaskList overlayRenderTaskList = Integration::RenderTaskList::New(); - Dali::Actor overlayRootActor = systemOverlay.GetDefaultRootActor(); - Dali::CameraActor overlayCameraActor = systemOverlay.GetDefaultCameraActor(); - Integration::RenderTaskList::CreateTask( overlayRenderTaskList, overlayRootActor, overlayCameraActor ); - systemOverlay.SetOverlayRenderTasks( overlayRenderTaskList ); - - // SystemOverlay actor - Actor systemOverlayActor = Actor::New(); - systemOverlayActor.SetSize(100.0f, 100.0f); - systemOverlayActor.SetAnchorPoint(AnchorPoint::TOP_LEFT); - systemOverlay.Add(systemOverlayActor); - - // Stage actor - Actor stageActor = Actor::New(); - stageActor.SetSize(100.0f, 100.0f); - stageActor.SetAnchorPoint(AnchorPoint::TOP_LEFT); - Stage::GetCurrent().Add(stageActor); - - // Render and notify - application.SendNotification(); - application.Render(); - - // Set system-overlay actor to touchable - TouchEventData touchData; - TouchEventDataFunctor touchFunctor( touchData ); - systemOverlayActor.TouchedSignal().Connect(&application, touchFunctor); - - // Set stage actor to receive the gesture - SignalData data; - GestureReceivedFunctor functor(data); - - LongPressGestureDetector detector = LongPressGestureDetector::New(); - detector.Attach(stageActor); - detector.DetectedSignal().Connect(&application, functor); - - // Start long press within the two actors' area - Vector2 screenCoords( 50.0f, 50.0f ); - application.ProcessEvent( GenerateLongPress( Gesture::Possible, 1u, screenCoords ) ); - application.ProcessEvent( GenerateLongPress( Gesture::Started, 1u, screenCoords ) ); - DALI_TEST_EQUALS( true, data.functorCalled, TEST_LOCATION ); - DALI_TEST_EQUALS( false, touchData.functorCalled, TEST_LOCATION ); - - data.Reset(); - touchData.Reset(); - - // Do touch in the same area - application.ProcessEvent( touchFunctor.GenerateSingleTouch( PointState::DOWN, screenCoords ) ); - DALI_TEST_EQUALS( false, data.functorCalled, TEST_LOCATION ); - DALI_TEST_EQUALS( true, touchData.functorCalled, TEST_LOCATION ); - - END_TEST; -} - -int UtcDaliLongPressGestureTouchBehindGesturedSystemOverlay(void) -{ - TestApplication application; - Dali::Integration::Core& core = application.GetCore(); - Dali::Integration::SystemOverlay& systemOverlay( core.GetSystemOverlay() ); - - Dali::RenderTaskList overlayRenderTaskList = Integration::RenderTaskList::New(); - Dali::Actor overlayRootActor = systemOverlay.GetDefaultRootActor(); - Dali::CameraActor overlayCameraActor = systemOverlay.GetDefaultCameraActor(); - Integration::RenderTaskList::CreateTask( overlayRenderTaskList, overlayRootActor, overlayCameraActor ); - systemOverlay.SetOverlayRenderTasks( overlayRenderTaskList ); - - // SystemOverlay actor - Actor systemOverlayActor = Actor::New(); - systemOverlayActor.SetSize(100.0f, 100.0f); - systemOverlayActor.SetAnchorPoint(AnchorPoint::TOP_LEFT); - systemOverlay.Add(systemOverlayActor); - - // Stage actor - Actor stageActor = Actor::New(); - stageActor.SetSize(100.0f, 100.0f); - stageActor.SetAnchorPoint(AnchorPoint::TOP_LEFT); - Stage::GetCurrent().Add(stageActor); - - // Render and notify - application.SendNotification(); - application.Render(); - - // Set stage actor to touchable - TouchEventData touchData; - TouchEventDataFunctor touchFunctor( touchData ); - stageActor.TouchedSignal().Connect(&application, touchFunctor); - - // Set system-overlay actor to have the gesture - SignalData data; - GestureReceivedFunctor functor(data); - - LongPressGestureDetector detector = LongPressGestureDetector::New(); - detector.Attach(systemOverlayActor); - detector.DetectedSignal().Connect(&application, functor); - - // Start long press within the two actors' area - Vector2 screenCoords( 50.0f, 50.0f ); - application.ProcessEvent( GenerateLongPress( Gesture::Possible, 1u, screenCoords ) ); - application.ProcessEvent( GenerateLongPress( Gesture::Started, 1u, screenCoords ) ); - DALI_TEST_EQUALS( true, data.functorCalled, TEST_LOCATION ); - DALI_TEST_EQUALS( false, touchData.functorCalled, TEST_LOCATION ); - - data.Reset(); - touchData.Reset(); - - // Do touch in the same area - application.ProcessEvent( touchFunctor.GenerateSingleTouch( PointState::DOWN, screenCoords ) ); - DALI_TEST_EQUALS( false, data.functorCalled, TEST_LOCATION ); - DALI_TEST_EQUALS( true, touchData.functorCalled, TEST_LOCATION ); - - END_TEST; -} - int UtcDaliLongPressGestureLayerConsumesTouch(void) { TestApplication application; diff --git a/automated-tests/src/dali/utc-Dali-PanGestureDetector.cpp b/automated-tests/src/dali/utc-Dali-PanGestureDetector.cpp index 51a8532..0cbc64d 100644 --- a/automated-tests/src/dali/utc-Dali-PanGestureDetector.cpp +++ b/automated-tests/src/dali/utc-Dali-PanGestureDetector.cpp @@ -22,7 +22,6 @@ #include #include #include -#include #include #include #include @@ -1604,168 +1603,6 @@ int UtcDaliPanGestureActorStagedAndDestroyed(void) END_TEST; } -int UtcDaliPanGestureSystemOverlay(void) -{ - TestApplication application; - Dali::Integration::Core& core = application.GetCore(); - Dali::Integration::SystemOverlay& systemOverlay( core.GetSystemOverlay() ); - - Dali::RenderTaskList overlayRenderTaskList = Integration::RenderTaskList::New(); - Dali::Actor overlayRootActor = systemOverlay.GetDefaultRootActor(); - Dali::CameraActor overlayCameraActor = systemOverlay.GetDefaultCameraActor(); - Integration::RenderTaskList::CreateTask( overlayRenderTaskList, overlayRootActor, overlayCameraActor ); - systemOverlay.SetOverlayRenderTasks( overlayRenderTaskList ); - - Actor actor = Actor::New(); - actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); - systemOverlay.Add(actor); - - // Render and notify - application.SendNotification(); - application.Render(); - - SignalData data; - GestureReceivedFunctor functor(data); - - PanGestureDetector detector = PanGestureDetector::New(); - detector.Attach(actor); - detector.DetectedSignal().Connect(&application, functor); - - Vector2 screenCoordsStart( 10.0f, 20.0f ); - Vector2 screenCoordsEnd( 20.0f, 20.0f ); - - // Start pan within the actor's area - application.ProcessEvent( GeneratePan( Gesture::Possible, screenCoordsStart, screenCoordsEnd, 10 ) ); - application.ProcessEvent( GeneratePan( Gesture::Started, screenCoordsStart, screenCoordsEnd, 10 ) ); - DALI_TEST_EQUALS( true, data.functorCalled, TEST_LOCATION ); - END_TEST; -} - -int UtcDaliPanGestureBehindTouchableSystemOverlay(void) -{ - TestApplication application; - Dali::Integration::Core& core = application.GetCore(); - Dali::Integration::SystemOverlay& systemOverlay( core.GetSystemOverlay() ); - - Dali::RenderTaskList overlayRenderTaskList = Integration::RenderTaskList::New(); - Dali::Actor overlayRootActor = systemOverlay.GetDefaultRootActor(); - Dali::CameraActor overlayCameraActor = systemOverlay.GetDefaultCameraActor(); - Integration::RenderTaskList::CreateTask( overlayRenderTaskList, overlayRootActor, overlayCameraActor ); - systemOverlay.SetOverlayRenderTasks( overlayRenderTaskList ); - - // SystemOverlay actor - Actor systemOverlayActor = Actor::New(); - systemOverlayActor.SetSize(100.0f, 100.0f); - systemOverlayActor.SetAnchorPoint(AnchorPoint::TOP_LEFT); - systemOverlay.Add(systemOverlayActor); - - // Stage actor - Actor stageActor = Actor::New(); - stageActor.SetSize(100.0f, 100.0f); - stageActor.SetAnchorPoint(AnchorPoint::TOP_LEFT); - Stage::GetCurrent().Add(stageActor); - - // Render and notify - application.SendNotification(); - application.Render(); - - // Set system-overlay actor to touchable - TouchEventData touchData; - TouchEventDataFunctor touchFunctor( touchData ); - systemOverlayActor.TouchedSignal().Connect(&application, touchFunctor); - - // Set stage actor to receive the gesture - SignalData data; - GestureReceivedFunctor functor(data); - - PanGestureDetector detector = PanGestureDetector::New(); - detector.Attach(stageActor); - detector.DetectedSignal().Connect(&application, functor); - - Vector2 screenCoordsStart( 10.0f, 20.0f ); - Vector2 screenCoordsEnd( 20.0f, 20.0f ); - - // Start pan within the two actors' area - application.ProcessEvent( GeneratePan( Gesture::Possible, screenCoordsStart, screenCoordsEnd, 10 ) ); - application.ProcessEvent( GeneratePan( Gesture::Started, screenCoordsStart, screenCoordsEnd, 10 ) ); - application.ProcessEvent( GeneratePan( Gesture::Finished, screenCoordsStart, screenCoordsEnd, 10 ) ); - DALI_TEST_EQUALS( true, data.functorCalled, TEST_LOCATION ); - DALI_TEST_EQUALS( false, touchData.functorCalled, TEST_LOCATION ); - - data.Reset(); - touchData.Reset(); - - // Do touch in the same area - application.ProcessEvent( touchFunctor.GenerateSingleTouch( PointState::DOWN, screenCoordsStart ) ); - DALI_TEST_EQUALS( false, data.functorCalled, TEST_LOCATION ); - DALI_TEST_EQUALS( true, touchData.functorCalled, TEST_LOCATION ); - - END_TEST; -} - -int UtcDaliPanGestureTouchBehindGesturedSystemOverlay(void) -{ - TestApplication application; - Dali::Integration::Core& core = application.GetCore(); - Dali::Integration::SystemOverlay& systemOverlay( core.GetSystemOverlay() ); - - Dali::RenderTaskList overlayRenderTaskList = Integration::RenderTaskList::New(); - Dali::Actor overlayRootActor = systemOverlay.GetDefaultRootActor(); - Dali::CameraActor overlayCameraActor = systemOverlay.GetDefaultCameraActor(); - Integration::RenderTaskList::CreateTask( overlayRenderTaskList, overlayRootActor, overlayCameraActor ); - systemOverlay.SetOverlayRenderTasks( overlayRenderTaskList ); - - // SystemOverlay actor - Actor systemOverlayActor = Actor::New(); - systemOverlayActor.SetSize(100.0f, 100.0f); - systemOverlayActor.SetAnchorPoint(AnchorPoint::TOP_LEFT); - systemOverlay.Add(systemOverlayActor); - - // Stage actor - Actor stageActor = Actor::New(); - stageActor.SetSize(100.0f, 100.0f); - stageActor.SetAnchorPoint(AnchorPoint::TOP_LEFT); - Stage::GetCurrent().Add(stageActor); - - // Render and notify - application.SendNotification(); - application.Render(); - - // Set stage actor to touchable - TouchEventData touchData; - TouchEventDataFunctor touchFunctor( touchData ); - stageActor.TouchedSignal().Connect(&application, touchFunctor); - - // Set system-overlay actor to have the gesture - SignalData data; - GestureReceivedFunctor functor(data); - - PanGestureDetector detector = PanGestureDetector::New(); - detector.Attach(systemOverlayActor); - detector.DetectedSignal().Connect(&application, functor); - - Vector2 screenCoordsStart( 10.0f, 20.0f ); - Vector2 screenCoordsEnd( 20.0f, 20.0f ); - - // Start pan within the two actors' area - application.ProcessEvent( GeneratePan( Gesture::Possible, screenCoordsStart, screenCoordsEnd, 10 ) ); - application.ProcessEvent( GeneratePan( Gesture::Started, screenCoordsStart, screenCoordsEnd, 10 ) ); - application.ProcessEvent( GeneratePan( Gesture::Finished, screenCoordsStart, screenCoordsEnd, 10 ) ); - DALI_TEST_EQUALS( true, data.functorCalled, TEST_LOCATION ); - DALI_TEST_EQUALS( false, touchData.functorCalled, TEST_LOCATION ); - - data.Reset(); - touchData.Reset(); - - // Do touch in the same area - application.ProcessEvent( touchFunctor.GenerateSingleTouch( PointState::DOWN, screenCoordsStart ) ); - DALI_TEST_EQUALS( false, data.functorCalled, TEST_LOCATION ); - DALI_TEST_EQUALS( true, touchData.functorCalled, TEST_LOCATION ); - - END_TEST; -} - int UtcDaliPanGestureAngleHandling(void) { TestApplication application; diff --git a/automated-tests/src/dali/utc-Dali-PinchGestureDetector.cpp b/automated-tests/src/dali/utc-Dali-PinchGestureDetector.cpp index 13ae5b5..f877a00 100644 --- a/automated-tests/src/dali/utc-Dali-PinchGestureDetector.cpp +++ b/automated-tests/src/dali/utc-Dali-PinchGestureDetector.cpp @@ -21,7 +21,6 @@ #include #include #include -#include #include #include #include @@ -1185,168 +1184,6 @@ int UtcDaliPinchGestureActorStagedAndDestroyed(void) END_TEST; } -int UtcDaliPinchGestureSystemOverlay(void) -{ - TestApplication application; - Dali::Integration::Core& core = application.GetCore(); - Dali::Integration::SystemOverlay& systemOverlay( core.GetSystemOverlay() ); - - Dali::RenderTaskList overlayRenderTaskList = Integration::RenderTaskList::New(); - Dali::Actor overlayRootActor = systemOverlay.GetDefaultRootActor(); - Dali::CameraActor overlayCameraActor = systemOverlay.GetDefaultCameraActor(); - Integration::RenderTaskList::CreateTask( overlayRenderTaskList, overlayRootActor, overlayCameraActor ); - systemOverlay.SetOverlayRenderTasks( overlayRenderTaskList ); - - Actor actor = Actor::New(); - actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); - systemOverlay.Add(actor); - - // Render and notify - application.SendNotification(); - application.Render(); - - SignalData data; - GestureReceivedFunctor functor(data); - - PinchGestureDetector detector = PinchGestureDetector::New(); - detector.Attach(actor); - detector.DetectedSignal().Connect(&application, functor); - - Vector2 screenCoords( 50.0f, 50.0f ); - float scale ( 10.0f ); - float speed ( 50.0f ); - - // Start pan within the actor's area - application.ProcessEvent( GeneratePinch( Gesture::Started, scale, speed, screenCoords ) ); - DALI_TEST_EQUALS( true, data.functorCalled, TEST_LOCATION ); - END_TEST; -} - -int UtcDaliPinchGestureBehindTouchableSystemOverlay(void) -{ - TestApplication application; - Dali::Integration::Core& core = application.GetCore(); - Dali::Integration::SystemOverlay& systemOverlay( core.GetSystemOverlay() ); - - Dali::RenderTaskList overlayRenderTaskList = Integration::RenderTaskList::New(); - Dali::Actor overlayRootActor = systemOverlay.GetDefaultRootActor(); - Dali::CameraActor overlayCameraActor = systemOverlay.GetDefaultCameraActor(); - Integration::RenderTaskList::CreateTask( overlayRenderTaskList, overlayRootActor, overlayCameraActor ); - systemOverlay.SetOverlayRenderTasks( overlayRenderTaskList ); - - // SystemOverlay actor - Actor systemOverlayActor = Actor::New(); - systemOverlayActor.SetSize(100.0f, 100.0f); - systemOverlayActor.SetAnchorPoint(AnchorPoint::TOP_LEFT); - systemOverlay.Add(systemOverlayActor); - - // Stage actor - Actor stageActor = Actor::New(); - stageActor.SetSize(100.0f, 100.0f); - stageActor.SetAnchorPoint(AnchorPoint::TOP_LEFT); - Stage::GetCurrent().Add(stageActor); - - // Render and notify - application.SendNotification(); - application.Render(); - - // Set system-overlay actor to touchable - TouchEventData touchData; - TouchEventDataFunctor touchFunctor( touchData ); - systemOverlayActor.TouchedSignal().Connect(&application, touchFunctor); - - // Set stage actor to receive the gesture - SignalData data; - GestureReceivedFunctor functor(data); - - PinchGestureDetector detector = PinchGestureDetector::New(); - detector.Attach(stageActor); - detector.DetectedSignal().Connect(&application, functor); - - Vector2 screenCoords( 50.0f, 50.0f ); - float scale ( 10.0f ); - float speed ( 50.0f ); - - // Start pinch within the two actors' area - application.ProcessEvent( GeneratePinch( Gesture::Started, scale, speed, screenCoords ) ); - application.ProcessEvent( GeneratePinch( Gesture::Finished, scale, speed, screenCoords ) ); - DALI_TEST_EQUALS( true, data.functorCalled, TEST_LOCATION ); - DALI_TEST_EQUALS( false, touchData.functorCalled, TEST_LOCATION ); - - data.Reset(); - touchData.Reset(); - - // Do touch in the same area - application.ProcessEvent( touchFunctor.GenerateSingleTouch( PointState::DOWN, screenCoords ) ); - DALI_TEST_EQUALS( false, data.functorCalled, TEST_LOCATION ); - DALI_TEST_EQUALS( true, touchData.functorCalled, TEST_LOCATION ); - - END_TEST; -} - -int UtcDaliPinchGestureTouchBehindGesturedSystemOverlay(void) -{ - TestApplication application; - Dali::Integration::Core& core = application.GetCore(); - Dali::Integration::SystemOverlay& systemOverlay( core.GetSystemOverlay() ); - - Dali::RenderTaskList overlayRenderTaskList = Integration::RenderTaskList::New(); - Dali::Actor overlayRootActor = systemOverlay.GetDefaultRootActor(); - Dali::CameraActor overlayCameraActor = systemOverlay.GetDefaultCameraActor(); - Integration::RenderTaskList::CreateTask( overlayRenderTaskList, overlayRootActor, overlayCameraActor ); - systemOverlay.SetOverlayRenderTasks( overlayRenderTaskList ); - - // SystemOverlay actor - Actor systemOverlayActor = Actor::New(); - systemOverlayActor.SetSize(100.0f, 100.0f); - systemOverlayActor.SetAnchorPoint(AnchorPoint::TOP_LEFT); - systemOverlay.Add(systemOverlayActor); - - // Stage actor - Actor stageActor = Actor::New(); - stageActor.SetSize(100.0f, 100.0f); - stageActor.SetAnchorPoint(AnchorPoint::TOP_LEFT); - Stage::GetCurrent().Add(stageActor); - - // Render and notify - application.SendNotification(); - application.Render(); - - // Set stage actor to touchable - TouchEventData touchData; - TouchEventDataFunctor touchFunctor( touchData ); - stageActor.TouchedSignal().Connect(&application, touchFunctor); - - // Set system-overlay actor to have the gesture - SignalData data; - GestureReceivedFunctor functor(data); - - PinchGestureDetector detector = PinchGestureDetector::New(); - detector.Attach(systemOverlayActor); - detector.DetectedSignal().Connect(&application, functor); - - Vector2 screenCoords( 50.0f, 50.0f ); - float scale ( 10.0f ); - float speed ( 50.0f ); - - // Start pinch within the two actors' area - application.ProcessEvent( GeneratePinch( Gesture::Started, scale, speed, screenCoords ) ); - application.ProcessEvent( GeneratePinch( Gesture::Finished, scale, speed, screenCoords ) ); - DALI_TEST_EQUALS( true, data.functorCalled, TEST_LOCATION ); - DALI_TEST_EQUALS( false, touchData.functorCalled, TEST_LOCATION ); - - data.Reset(); - touchData.Reset(); - - // Do touch in the same area - application.ProcessEvent( touchFunctor.GenerateSingleTouch( PointState::DOWN, screenCoords ) ); - DALI_TEST_EQUALS( false, data.functorCalled, TEST_LOCATION ); - DALI_TEST_EQUALS( true, touchData.functorCalled, TEST_LOCATION ); - - END_TEST; -} - int UtcDaliPinchGestureLayerConsumesTouch(void) { TestApplication application; diff --git a/automated-tests/src/dali/utc-Dali-Renderer.cpp b/automated-tests/src/dali/utc-Dali-Renderer.cpp index 744eb58..d1c81f6 100644 --- a/automated-tests/src/dali/utc-Dali-Renderer.cpp +++ b/automated-tests/src/dali/utc-Dali-Renderer.cpp @@ -21,7 +21,6 @@ #include #include -#include #include #include #include @@ -3006,17 +3005,5 @@ int UtcDaliRendererRenderingBehavior(void) DALI_TEST_CHECK( !( updateStatus & Integration::KeepUpdating::STAGE_KEEP_RENDERING ) ); - // For test coverage - Dali::Integration::Core& core( application.GetCore() ); - Dali::Integration::SystemOverlay& systemOverlay( core.GetSystemOverlay() ); - - Dali::RenderTaskList additionalRenderTaskList = Integration::RenderTaskList::New(); - Dali::Actor overlayRootActor = systemOverlay.GetDefaultRootActor(); - Dali::CameraActor overlayCameraActor = systemOverlay.GetDefaultCameraActor(); - - // Render and check the update status - application.SendNotification(); - application.Render(); - END_TEST; } diff --git a/automated-tests/src/dali/utc-Dali-TapGestureDetector.cpp b/automated-tests/src/dali/utc-Dali-TapGestureDetector.cpp index 25b8e89..03b6ecc 100644 --- a/automated-tests/src/dali/utc-Dali-TapGestureDetector.cpp +++ b/automated-tests/src/dali/utc-Dali-TapGestureDetector.cpp @@ -21,7 +21,6 @@ #include #include #include -#include #include #include #include @@ -1197,163 +1196,6 @@ int UtcDaliTapGestureActorRemovedWhilePossible(void) END_TEST; } -int UtcDaliTapGestureSystemOverlay(void) -{ - TestApplication application; - Dali::Integration::Core& core = application.GetCore(); - Dali::Integration::SystemOverlay& systemOverlay( core.GetSystemOverlay() ); - - Dali::RenderTaskList overlayRenderTaskList = Integration::RenderTaskList::New(); - Dali::Actor overlayRootActor = systemOverlay.GetDefaultRootActor(); - Dali::CameraActor overlayCameraActor = systemOverlay.GetDefaultCameraActor(); - Integration::RenderTaskList::CreateTask( overlayRenderTaskList, overlayRootActor, overlayCameraActor ); - systemOverlay.SetOverlayRenderTasks( overlayRenderTaskList ); - - Actor actor = Actor::New(); - actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); - systemOverlay.Add(actor); - - // Render and notify - application.SendNotification(); - application.Render(); - - SignalData data; - GestureReceivedFunctor functor(data); - - TapGestureDetector detector = TapGestureDetector::New(); - detector.Attach(actor); - detector.DetectedSignal().Connect(&application, functor); - - Vector2 screenCoords( 50.0f, 50.0f ); - - // Do a tap inside actor's area - application.ProcessEvent( GenerateTap( Gesture::Possible, 1u, 1u, screenCoords ) ); - application.ProcessEvent( GenerateTap( Gesture::Started, 1u, 1u, screenCoords ) ); - DALI_TEST_EQUALS( true, data.functorCalled, TEST_LOCATION ); - END_TEST; -} - -int UtcDaliTapGestureBehindTouchableSystemOverlay(void) -{ - TestApplication application; - Dali::Integration::Core& core = application.GetCore(); - Dali::Integration::SystemOverlay& systemOverlay( core.GetSystemOverlay() ); - - Dali::RenderTaskList overlayRenderTaskList = Integration::RenderTaskList::New(); - Dali::Actor overlayRootActor = systemOverlay.GetDefaultRootActor(); - Dali::CameraActor overlayCameraActor = systemOverlay.GetDefaultCameraActor(); - Integration::RenderTaskList::CreateTask( overlayRenderTaskList, overlayRootActor, overlayCameraActor ); - systemOverlay.SetOverlayRenderTasks( overlayRenderTaskList ); - - // SystemOverlay actor - Actor systemOverlayActor = Actor::New(); - systemOverlayActor.SetSize(100.0f, 100.0f); - systemOverlayActor.SetAnchorPoint(AnchorPoint::TOP_LEFT); - systemOverlay.Add(systemOverlayActor); - - // Stage actor - Actor stageActor = Actor::New(); - stageActor.SetSize(100.0f, 100.0f); - stageActor.SetAnchorPoint(AnchorPoint::TOP_LEFT); - Stage::GetCurrent().Add(stageActor); - - // Render and notify - application.SendNotification(); - application.Render(); - - // Set system-overlay actor to touchable - TouchEventData touchData; - TouchEventDataFunctor touchFunctor( touchData ); - systemOverlayActor.TouchedSignal().Connect(&application, touchFunctor); - - // Set stage actor to receive the gesture - SignalData data; - GestureReceivedFunctor functor(data); - - TapGestureDetector detector = TapGestureDetector::New(); - detector.Attach(stageActor); - detector.DetectedSignal().Connect(&application, functor); - - Vector2 screenCoords( 50.0f, 50.0f ); - - // Do a tap inside both actors' area - application.ProcessEvent( GenerateTap( Gesture::Possible, 1u, 1u, screenCoords ) ); - application.ProcessEvent( GenerateTap( Gesture::Started, 1u, 1u, screenCoords ) ); - DALI_TEST_EQUALS( true, data.functorCalled, TEST_LOCATION ); - DALI_TEST_EQUALS( false, touchData.functorCalled, TEST_LOCATION ); - - data.Reset(); - touchData.Reset(); - - // Do touch in the same area - application.ProcessEvent( touchFunctor.GenerateSingleTouch( PointState::DOWN, screenCoords ) ); - DALI_TEST_EQUALS( false, data.functorCalled, TEST_LOCATION ); - DALI_TEST_EQUALS( true, touchData.functorCalled, TEST_LOCATION ); - - END_TEST; -} - -int UtcDaliTapGestureTouchBehindGesturedSystemOverlay(void) -{ - TestApplication application; - Dali::Integration::Core& core = application.GetCore(); - Dali::Integration::SystemOverlay& systemOverlay( core.GetSystemOverlay() ); - - Dali::RenderTaskList overlayRenderTaskList = Integration::RenderTaskList::New(); - Dali::Actor overlayRootActor = systemOverlay.GetDefaultRootActor(); - Dali::CameraActor overlayCameraActor = systemOverlay.GetDefaultCameraActor(); - Integration::RenderTaskList::CreateTask( overlayRenderTaskList, overlayRootActor, overlayCameraActor ); - systemOverlay.SetOverlayRenderTasks( overlayRenderTaskList ); - - // SystemOverlay actor - Actor systemOverlayActor = Actor::New(); - systemOverlayActor.SetSize(100.0f, 100.0f); - systemOverlayActor.SetAnchorPoint(AnchorPoint::TOP_LEFT); - systemOverlay.Add(systemOverlayActor); - - // Stage actor - Actor stageActor = Actor::New(); - stageActor.SetSize(100.0f, 100.0f); - stageActor.SetAnchorPoint(AnchorPoint::TOP_LEFT); - Stage::GetCurrent().Add(stageActor); - - // Render and notify - application.SendNotification(); - application.Render(); - - // Set stage actor to touchable - TouchEventData touchData; - TouchEventDataFunctor touchFunctor( touchData ); - stageActor.TouchedSignal().Connect(&application, touchFunctor); - - // Set system-overlay actor to have the gesture - SignalData data; - GestureReceivedFunctor functor(data); - - TapGestureDetector detector = TapGestureDetector::New(); - detector.Attach(systemOverlayActor); - detector.DetectedSignal().Connect(&application, functor); - - Vector2 screenCoords( 50.0f, 50.0f ); - - // Do a tap inside both actors' area - application.ProcessEvent( GenerateTap( Gesture::Possible, 1u, 1u, screenCoords ) ); - application.ProcessEvent( GenerateTap( Gesture::Started, 1u, 1u, screenCoords ) ); - DALI_TEST_EQUALS( true, data.functorCalled, TEST_LOCATION ); - DALI_TEST_EQUALS( false, touchData.functorCalled, TEST_LOCATION ); - - data.Reset(); - touchData.Reset(); - - // Do touch in the same area - application.ProcessEvent( touchFunctor.GenerateSingleTouch( PointState::DOWN, screenCoords ) ); - DALI_TEST_EQUALS( false, data.functorCalled, TEST_LOCATION ); - DALI_TEST_EQUALS( true, touchData.functorCalled, TEST_LOCATION ); - - END_TEST; -} - int UtcDaliTapGestureLayerConsumesTouch(void) { TestApplication application; diff --git a/automated-tests/src/dali/utc-Dali-TouchDataProcessing.cpp b/automated-tests/src/dali/utc-Dali-TouchDataProcessing.cpp index 2d016be..812a992 100755 --- a/automated-tests/src/dali/utc-Dali-TouchDataProcessing.cpp +++ b/automated-tests/src/dali/utc-Dali-TouchDataProcessing.cpp @@ -20,7 +20,6 @@ #include #include #include -#include #include #include @@ -1400,47 +1399,6 @@ int UtcDaliTouchDataActorUnStaged(void) END_TEST; } -int UtcDaliTouchDataSystemOverlayActor(void) -{ - TestApplication application; - Dali::Integration::Core& core( application.GetCore() ); - Dali::Integration::SystemOverlay& systemOverlay( core.GetSystemOverlay() ); - - Dali::RenderTaskList overlayRenderTaskList = Integration::RenderTaskList::New(); - Dali::Actor overlayRootActor = systemOverlay.GetDefaultRootActor(); - Dali::CameraActor overlayCameraActor = systemOverlay.GetDefaultCameraActor(); - Integration::RenderTaskList::CreateTask( overlayRenderTaskList, overlayRootActor, overlayCameraActor ); - systemOverlay.SetOverlayRenderTasks( overlayRenderTaskList ); - - // Create an actor and add it to the system overlay. - Actor systemActor = Actor::New(); - systemActor.SetSize(100.0f, 100.0f); - systemActor.SetAnchorPoint(AnchorPoint::TOP_LEFT); - systemOverlay.Add( systemActor ); - - // Create an actor and add it to the stage as per normal, same position and size as systemActor - Actor actor = Actor::New(); - actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); - Stage::GetCurrent().Add(actor); - - // Connect to the touch signals. - SignalData data; - TouchDataFunctor functor( data ); - systemActor.TouchSignal().Connect( &application, functor ); - actor.TouchSignal().Connect( &application, functor ); - - // Render and notify - application.SendNotification(); - application.Render(); - - // Emit a down signal, the system overlay is drawn last so is at the top, should hit the systemActor. - application.ProcessEvent( GenerateSingleTouch( PointState::DOWN, Vector2( 10.0f, 10.0f ) ) ); - DALI_TEST_EQUALS( true, data.functorCalled, TEST_LOCATION ); - DALI_TEST_CHECK( systemActor == data.touchedActor ); - END_TEST; -} - int UtcDaliTouchDataLayerConsumesTouch(void) { TestApplication application; diff --git a/automated-tests/src/dali/utc-Dali-TouchProcessing.cpp b/automated-tests/src/dali/utc-Dali-TouchProcessing.cpp index 79a73f3..0221591 100644 --- a/automated-tests/src/dali/utc-Dali-TouchProcessing.cpp +++ b/automated-tests/src/dali/utc-Dali-TouchProcessing.cpp @@ -20,7 +20,6 @@ #include #include #include -#include #include #include @@ -1168,47 +1167,6 @@ int UtcDaliTouchActorUnStaged(void) END_TEST; } -int UtcDaliTouchSystemOverlayActor(void) -{ - TestApplication application; - Dali::Integration::Core& core( application.GetCore() ); - Dali::Integration::SystemOverlay& systemOverlay( core.GetSystemOverlay() ); - - Dali::RenderTaskList overlayRenderTaskList = Integration::RenderTaskList::New(); - Dali::Actor overlayRootActor = systemOverlay.GetDefaultRootActor(); - Dali::CameraActor overlayCameraActor = systemOverlay.GetDefaultCameraActor(); - Integration::RenderTaskList::CreateTask( overlayRenderTaskList, overlayRootActor, overlayCameraActor ); - systemOverlay.SetOverlayRenderTasks( overlayRenderTaskList ); - - // Create an actor and add it to the system overlay. - Actor systemActor = Actor::New(); - systemActor.SetSize(100.0f, 100.0f); - systemActor.SetAnchorPoint(AnchorPoint::TOP_LEFT); - systemOverlay.Add( systemActor ); - - // Create an actor and add it to the stage as per normal, same position and size as systemActor - Actor actor = Actor::New(); - actor.SetSize(100.0f, 100.0f); - actor.SetAnchorPoint(AnchorPoint::TOP_LEFT); - Stage::GetCurrent().Add(actor); - - // Connect to the touch signals. - SignalData data; - TouchEventFunctor functor( data ); - systemActor.TouchedSignal().Connect( &application, functor ); - actor.TouchedSignal().Connect( &application, functor ); - - // Render and notify - application.SendNotification(); - application.Render(); - - // Emit a down signal, the system overlay is drawn last so is at the top, should hit the systemActor. - application.ProcessEvent( GenerateSingleTouch( TouchPoint::Down, Vector2( 10.0f, 10.0f ) ) ); - DALI_TEST_EQUALS( true, data.functorCalled, TEST_LOCATION ); - DALI_TEST_CHECK( systemActor == data.touchedActor ); - END_TEST; -} - int UtcDaliTouchLayerConsumesTouch(void) { TestApplication application; diff --git a/build/scripts/dali_env b/build/scripts/dali_env index c573c24..86a1539 100755 --- a/build/scripts/dali_env +++ b/build/scripts/dali_env @@ -53,6 +53,7 @@ my @system_packages = ( "libssl-dev", "cifs-utils", "libgtest-dev", + "libcairo2-dev", ); # Some packages like require building from source diff --git a/dali/integration-api/CMakeLists.txt b/dali/integration-api/CMakeLists.txt index 09f72ff..76346b5 100644 --- a/dali/integration-api/CMakeLists.txt +++ b/dali/integration-api/CMakeLists.txt @@ -6,7 +6,6 @@ SET(SOURCES ${SOURCES} ${CMAKE_CURRENT_SOURCE_DIR}/debug.cpp ${CMAKE_CURRENT_SOURCE_DIR}/profiling.cpp ${CMAKE_CURRENT_SOURCE_DIR}/input-options.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/system-overlay.cpp ${CMAKE_CURRENT_SOURCE_DIR}/lockless-buffer.cpp ${CMAKE_CURRENT_SOURCE_DIR}/render-task-list-integ.cpp ${CMAKE_CURRENT_SOURCE_DIR}/events/event.cpp @@ -40,7 +39,6 @@ SET(INTEGRATION_API_HEADERS ${CMAKE_CURRENT_SOURCE_DIR}/gesture-manager.h ${CMAKE_CURRENT_SOURCE_DIR}/render-controller.h ${CMAKE_CURRENT_SOURCE_DIR}/platform-abstraction.h - ${CMAKE_CURRENT_SOURCE_DIR}/system-overlay.h ${CMAKE_CURRENT_SOURCE_DIR}/lockless-buffer.h ${CMAKE_CURRENT_SOURCE_DIR}/render-task-list-integ.h diff --git a/dali/integration-api/core.cpp b/dali/integration-api/core.cpp index d8a8530..de8714f 100644 --- a/dali/integration-api/core.cpp +++ b/dali/integration-api/core.cpp @@ -125,11 +125,6 @@ void Core::Render( RenderStatus& status, bool forceClear ) mImpl->Render( status, forceClear ); } -SystemOverlay& Core::GetSystemOverlay() -{ - return mImpl->GetSystemOverlay(); -} - void Core::RegisterProcessor( Processor& processor ) { mImpl->RegisterProcessor( processor ); diff --git a/dali/integration-api/core.h b/dali/integration-api/core.h index 87082ac..f7e11b7 100644 --- a/dali/integration-api/core.h +++ b/dali/integration-api/core.h @@ -44,7 +44,6 @@ class GlSyncAbstraction; class PlatformAbstraction; class Processor; class RenderController; -class SystemOverlay; struct Event; struct TouchData; @@ -376,14 +375,6 @@ public: */ void Render( RenderStatus& status, bool forceClear ); - // System-level overlay - - /** - * Use the SystemOverlay to draw content for system-level indicators, dialogs etc. - * @return The SystemOverlay. - */ - SystemOverlay& GetSystemOverlay(); - /** * @brief Register a processor * diff --git a/dali/integration-api/file.list b/dali/integration-api/file.list index 47d654e..e778e61 100644 --- a/dali/integration-api/file.list +++ b/dali/integration-api/file.list @@ -7,7 +7,6 @@ platform_abstraction_src_files = \ $(platform_abstraction_src_dir)/trace.cpp \ $(platform_abstraction_src_dir)/profiling.cpp \ $(platform_abstraction_src_dir)/input-options.cpp \ - $(platform_abstraction_src_dir)/system-overlay.cpp \ $(platform_abstraction_src_dir)/lockless-buffer.cpp \ $(platform_abstraction_src_dir)/render-task-list-integ.cpp \ $(platform_abstraction_src_dir)/events/event.cpp \ @@ -42,7 +41,6 @@ platform_abstraction_header_files = \ $(platform_abstraction_src_dir)/render-controller.h \ $(platform_abstraction_src_dir)/platform-abstraction.h \ $(platform_abstraction_src_dir)/processor-interface.h \ - $(platform_abstraction_src_dir)/system-overlay.h \ $(platform_abstraction_src_dir)/lockless-buffer.h \ $(platform_abstraction_src_dir)/render-task-list-integ.h diff --git a/dali/integration-api/system-overlay.cpp b/dali/integration-api/system-overlay.cpp deleted file mode 100644 index 6668762..0000000 --- a/dali/integration-api/system-overlay.cpp +++ /dev/null @@ -1,82 +0,0 @@ -/* - * Copyright (c) 2014 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. - * - */ - -// CLASS HEADER -#include - -// INTERNAL INCLUDES -#include -#include -#include -#include -#include -#include - -namespace Dali -{ - -namespace Integration -{ - -SystemOverlay::~SystemOverlay() -{ - delete mImpl; -} - -void SystemOverlay::Add( Actor actor ) -{ - mImpl->Add( GetImplementation(actor) ); -} - -void SystemOverlay::Remove( Actor actor ) -{ - mImpl->Remove( GetImplementation(actor) ); -} - -void SystemOverlay::SetOverlayRenderTasks(RenderTaskList& taskList) -{ - mImpl->SetOverlayRenderTasks( GetImplementation( taskList ) ); -} - -RenderTaskList SystemOverlay::GetOverlayRenderTasks() -{ - return RenderTaskList( &mImpl->GetOverlayRenderTasks() ); -} - -Actor SystemOverlay::GetDefaultRootActor() -{ - return Actor( &mImpl->GetDefaultRootActor() ); -} - -CameraActor SystemOverlay::GetDefaultCameraActor() -{ - return CameraActor( &mImpl->GetDefaultCameraActor() ); -} - -SystemOverlay::SystemOverlay( Internal::SystemOverlay* impl ) -: mImpl( impl ) -{ -} - -Internal::SystemOverlay* SystemOverlay::GetImpl() -{ - return mImpl; -} - -} // namespace Integration - -} // namespace Dali diff --git a/dali/integration-api/system-overlay.h b/dali/integration-api/system-overlay.h deleted file mode 100644 index f19cd6d..0000000 --- a/dali/integration-api/system-overlay.h +++ /dev/null @@ -1,124 +0,0 @@ -#ifndef __DALI_INTEGRATION_SYSTEM_OVERLAY_H__ -#define __DALI_INTEGRATION_SYSTEM_OVERLAY_H__ - -/* - * Copyright (c) 2018 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. - * - */ - -// INTERNAL INCLUDES -#include - -namespace Dali -{ - -class Actor; -class CameraActor; -class RenderTaskList; - -namespace Internal -{ -class SystemOverlay; -} - -namespace Integration -{ - -/** - * Use this interface to draw content for system-level indicators, dialogs etc. - * The SystemOverlay is accessible using Dali::Integration::Core::GetSystemOverlay(). - */ -class DALI_CORE_API SystemOverlay -{ -public: - - /** - * Non-virtual destructor. SystemOverlay is not intended as a base class. - */ - ~SystemOverlay(); - - /** - * Add an Actor to the SystemOverlay. - * @pre The actor handle is not empty. - * @param [in] actor A handle to the actor to add. - * @post The actor will be referenced. - */ - void Add( Actor actor ); - - /** - * Remove an Actor that was added to the SystemOverlay. - * @pre The actor handle is not empty. - * @param [in] actor A handle to the actor to remove. - * @post The actor will be unreferenced. - */ - void Remove( Actor actor ); - - /** - * Set the list of render-tasks for system-level overlays. - * This is a separate list, processed after the render-tasks provided by Stage::GetRenderTaskList(). - * @param[in] taskList The list of overlay render-tasks. - */ - void SetOverlayRenderTasks(RenderTaskList& taskList); - - /** - * Retrieve the list of render-tasks for system-level overlays. - * This is a separate list, processed after the render-tasks provided by Stage::GetRenderTaskList(). - * @return The list of overlay render-tasks. - */ - RenderTaskList GetOverlayRenderTasks(); - - /** - * Retrieve the default SystemOverlay root actor. - * @note This is different to the root actor provided by Dali::Stage. - */ - Actor GetDefaultRootActor(); - - /** - * Retrieve the default SystemOverlay camera actor. - * @note This is different to the default camera actor provided by Dali::Stage. - */ - CameraActor GetDefaultCameraActor(); - - /** - * Create the SystemOverlay entrance. - * This is not intended for adaptor implementors; see also Dali::Integration::Core::GetSystemOverlay(). - * @param[in] impl The SystemOverlay implementation. - */ - SystemOverlay( Internal::SystemOverlay* impl ); - - /** - * Retreive the internal implementation; this is not intended for adaptor implementors. - * @return The SystemOverlay implementation. - */ - Internal::SystemOverlay* GetImpl(); - -private: - - // Undefined copy-constructor. - SystemOverlay( const SystemOverlay& core ); - - // Undefined assignment operator. - SystemOverlay& operator=( const SystemOverlay& rhs ); - -private: - - Dali::Internal::SystemOverlay* mImpl; -}; - -} // namespace Integration - -} // namespace Dali - -#endif // __DALI_INTEGRATION_SYSTEM_OVERLAY_H__ diff --git a/dali/internal/CMakeLists.txt b/dali/internal/CMakeLists.txt index 6152ffa..38cfe06 100644 --- a/dali/internal/CMakeLists.txt +++ b/dali/internal/CMakeLists.txt @@ -37,7 +37,6 @@ SET(SOURCES ${SOURCES} ${CMAKE_CURRENT_SOURCE_DIR}/event/common/property-notification-manager.cpp ${CMAKE_CURRENT_SOURCE_DIR}/event/common/property-helper.cpp ${CMAKE_CURRENT_SOURCE_DIR}/event/common/stage-impl.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/event/common/system-overlay-impl.cpp ${CMAKE_CURRENT_SOURCE_DIR}/event/common/thread-local-storage.cpp ${CMAKE_CURRENT_SOURCE_DIR}/event/common/type-info-impl.cpp ${CMAKE_CURRENT_SOURCE_DIR}/event/common/type-registry-impl.cpp diff --git a/dali/internal/common/core-impl.cpp b/dali/internal/common/core-impl.cpp index d3d57f1..7d6f523 100644 --- a/dali/internal/common/core-impl.cpp +++ b/dali/internal/common/core-impl.cpp @@ -19,7 +19,6 @@ #include // INTERNAL INCLUDES -#include #include #include #include @@ -310,11 +309,6 @@ uint32_t Core::GetMaximumUpdateCount() const return MAXIMUM_UPDATE_COUNT; } -Integration::SystemOverlay& Core::GetSystemOverlay() -{ - return mStage->GetSystemOverlay(); -} - void Core::RegisterProcessor( Integration::Processor& processor ) { mProcessors.PushBack(&processor); diff --git a/dali/internal/common/core-impl.h b/dali/internal/common/core-impl.h index 30395e5..d4aa55f 100644 --- a/dali/internal/common/core-impl.h +++ b/dali/internal/common/core-impl.h @@ -39,7 +39,6 @@ class PlatformAbstraction; class GestureManager; class GlAbstraction; class GlSyncAbstraction; -class SystemOverlay; class UpdateStatus; class RenderStatus; struct Event; @@ -162,11 +161,6 @@ public: uint32_t GetMaximumUpdateCount() const; /** - * @copydoc Dali::Integration::Core::GetSystemOverlay() - */ - Integration::SystemOverlay& GetSystemOverlay(); - - /** * @copydoc Dali::Integration::Core::RegisterProcessor */ void RegisterProcessor( Dali::Integration::Processor& processor ); diff --git a/dali/internal/event/actors/layer-impl.cpp b/dali/internal/event/actors/layer-impl.cpp index 11f835a..033ee7b 100644 --- a/dali/internal/event/actors/layer-impl.cpp +++ b/dali/internal/event/actors/layer-impl.cpp @@ -323,7 +323,6 @@ void Layer::OnStageConnectionInternal() DALI_ASSERT_DEBUG( NULL == mLayerList ); // Find the ordered layer-list - // This is different for Layers added via Integration::GetSystemOverlay() for ( Actor* parent = mParent; parent != NULL; parent = parent->GetParent() ) { if( parent->IsLayer() ) diff --git a/dali/internal/event/actors/layer-list.h b/dali/internal/event/actors/layer-list.h index c934682..22a18b6 100644 --- a/dali/internal/event/actors/layer-list.h +++ b/dali/internal/event/actors/layer-list.h @@ -41,7 +41,6 @@ class Layer; * An ordered list of layers. * Layers are not owned by the LayerList; each layer is responsible for registering & unregistering. * This is used by the Stage, to keep track of layer depths. - * A separate LayerList is maintained for actors added via the SystemOverlay::Add(). */ class LayerList { diff --git a/dali/internal/event/common/stage-impl.cpp b/dali/internal/event/common/stage-impl.cpp index b7d6496..8294cf8 100644 --- a/dali/internal/event/common/stage-impl.cpp +++ b/dali/internal/event/common/stage-impl.cpp @@ -24,11 +24,9 @@ #include // for strcmp // INTERNAL INCLUDES -#include #include #include #include -#include #include #include #include @@ -124,10 +122,6 @@ void Stage::Initialize( bool renderToFbo ) void Stage::Uninitialize() { - // Remove actors added to SystemOverlay - delete mSystemOverlay; - mSystemOverlay = NULL; - if( mDefaultCamera ) { // its enough to release the handle so the object is released @@ -224,14 +218,6 @@ void Stage::SurfaceResized( float width, float height ) mRootLayer->SetSize( mSize.width, mSize.height ); - // Repeat for SystemOverlay actors - if( mSystemOverlay ) - { - // Note that the SystemOverlay has a separate camera, configured for the full surface-size. - // This will remain unaffected by changes in SetDefaultCameraPosition() - mSystemOverlay->GetImpl()->SetSize( width, height ); - } - SetDefaultSurfaceRectMessage( mUpdateManager, Rect( 0, 0, static_cast( width ), static_cast( height ) ) ); // truncated // if single render task to screen then set its viewport parameters @@ -329,32 +315,6 @@ LayerList& Stage::GetLayerList() return *mLayerList; } -Integration::SystemOverlay& Stage::GetSystemOverlay() -{ - // Lazily create system-level if requested - if( !mSystemOverlay ) - { - mSystemOverlay = new Integration::SystemOverlay( SystemOverlay::New( *this ) ); - DALI_ASSERT_ALWAYS( NULL != mSystemOverlay && "Failed to create system overlay" ); - - mSystemOverlay->GetImpl()->SetSize( mSize.width, mSize.height ); - } - - return *mSystemOverlay; -} - -SystemOverlay* Stage::GetSystemOverlayInternal() -{ - SystemOverlay* overlay( NULL ); - - if( mSystemOverlay ) - { - overlay = mSystemOverlay->GetImpl(); - } - - return overlay; -} - void Stage::SetBackgroundColor(Vector4 color) { // Cache for public GetBackgroundColor() @@ -596,7 +556,6 @@ Stage::Stage( AnimationPlaylist& playlist, mBackgroundColor( Dali::Stage::DEFAULT_BACKGROUND_COLOR ), mTopMargin( 0 ), mDpi( Vector2::ZERO ), - mSystemOverlay( NULL ), mKeyEventSignal(), mKeyEventGeneratedSignal(), mEventProcessingFinishedSignal(), @@ -647,9 +606,6 @@ bool Stage::IsNextUpdateForced() Stage::~Stage() { - delete mSystemOverlay; - - mObjectRegistry.Reset(); } } // namespace Internal diff --git a/dali/internal/event/common/stage-impl.h b/dali/internal/event/common/stage-impl.h index 4e3246e..493c346 100644 --- a/dali/internal/event/common/stage-impl.h +++ b/dali/internal/event/common/stage-impl.h @@ -43,7 +43,6 @@ struct Vector2; namespace Integration { -class SystemOverlay; class RenderController; } @@ -59,7 +58,6 @@ class AnimationPlaylist; class PropertyNotificationManager; class Layer; class LayerList; -class SystemOverlay; class CameraActor; class RenderTaskList; @@ -215,19 +213,6 @@ public: */ LayerList& GetLayerList(); - // System-level overlay actors - - /** - * @copydoc Dali::Integration::Core::GetSystemOverlay() - */ - Integration::SystemOverlay& GetSystemOverlay(); - - /** - * Retrieve the internal implementation of the SystemOverlay. - * @return The implementation, or NULL if this has never been requested from Integration API. - */ - SystemOverlay* GetSystemOverlayInternal(); - // Keyboard stuff /** @@ -513,8 +498,6 @@ private: // The list of render-tasks IntrusivePtr mRenderTaskList; - Integration::SystemOverlay* mSystemOverlay; ///< SystemOverlay stage access - // The key event signal Dali::Stage::KeyEventSignalType mKeyEventSignal; Dali::DevelStage::KeyEventGeneratedSignalType mKeyEventGeneratedSignal; diff --git a/dali/internal/event/common/system-overlay-impl.cpp b/dali/internal/event/common/system-overlay-impl.cpp deleted file mode 100644 index b071222..0000000 --- a/dali/internal/event/common/system-overlay-impl.cpp +++ /dev/null @@ -1,151 +0,0 @@ -/* - * Copyright (c) 2018 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. - * - */ - -// CLASS HEADER -#include - -// INTERNAL INCLUDES -#include -#include -#include -#include -#include -#include - -namespace Dali -{ - -namespace Internal -{ - -SystemOverlay* SystemOverlay::New( EventThreadServices& eventThreadServices ) -{ - SystemOverlay* overlay = new SystemOverlay( eventThreadServices ); - - overlay->Initialize(); - - return overlay; -} - -SystemOverlay::~SystemOverlay() -{ - if ( mRootLayer ) - { - // we are closing down so just delete the root, no point emit disconnect - // signals or send messages to update - mRootLayer.Reset(); - } -} - -void SystemOverlay::Add( Actor& actor ) -{ - CreateRootLayer(); - - mRootLayer->Add( actor ); -} - -void SystemOverlay::Remove( Actor& actor ) -{ - if ( mRootLayer ) - { - mRootLayer->Remove( actor ); - } -} - -void SystemOverlay::SetOverlayRenderTasks(RenderTaskList& taskList) -{ - mOverlayRenderTaskList = &taskList; -} - -RenderTaskList& SystemOverlay::GetOverlayRenderTasks() -{ - return *mOverlayRenderTaskList; -} - -void SystemOverlay::SetSize( float width, float height ) -{ - mSize = Vector2( width, height ); - - if ( mRootLayer ) - { - mRootLayer->SetSize( mSize.width, mSize.height ); - } - - if ( mDefaultCameraActor ) - { - // Sets the default perspective projection for the given size. - mDefaultCameraActor->SetPerspectiveProjection( mSize ); - } -} - -LayerList& SystemOverlay::GetLayerList() -{ - return *mLayerList; -} - -Actor& SystemOverlay::GetDefaultRootActor() -{ - CreateRootLayer(); - - return *mRootLayer; -} - -CameraActor& SystemOverlay::GetDefaultCameraActor() -{ - CreateDefaultCameraActor(); - - return *mDefaultCameraActor; -} - -SystemOverlay::SystemOverlay( EventThreadServices& eventThreadServices ) -: mEventThreadServices( eventThreadServices ) -{ -} - -void SystemOverlay::Initialize() -{ - // Create the ordered list of layers - mLayerList = LayerList::New( mEventThreadServices.GetUpdateManager() ); -} - -void SystemOverlay::CreateRootLayer() -{ - // Lazy initialization; SystemOverlay may never be used - if ( !mRootLayer ) - { - mRootLayer = Layer::NewRoot( *mLayerList, mEventThreadServices.GetUpdateManager() ); - mRootLayer->SetName("SystemOverlayRoot"); - mRootLayer->SetSize( mSize.width, mSize.height ); - } -} - -void SystemOverlay::CreateDefaultCameraActor() -{ - // Lazy initialization; SystemOverlay may never be used - if ( !mDefaultCameraActor ) - { - // Creates a default camera with a default perspective projection. - mDefaultCameraActor = CameraActor::New( mSize ); - mDefaultCameraActor->SetParentOrigin( ParentOrigin::CENTER ); - - Add( *mDefaultCameraActor ); - } -} - -} // namespace Internal - -} // namespace Dali diff --git a/dali/internal/event/common/system-overlay-impl.h b/dali/internal/event/common/system-overlay-impl.h deleted file mode 100644 index 8632014..0000000 --- a/dali/internal/event/common/system-overlay-impl.h +++ /dev/null @@ -1,147 +0,0 @@ -#ifndef __DALI_INTERNAL_SYSTEM_OVERLAY_H__ -#define __DALI_INTERNAL_SYSTEM_OVERLAY_H__ - -/* - * Copyright (c) 2014 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. - * - */ - -// INTERNAL INCLUDES -#include -#include -#include -#include -#include - -namespace Dali -{ - -namespace Internal -{ - -class LayerList; -class RenderTaskList; -class EventThreadServices; - -/** - * Implementation of Dali::Integration::SystemOverlay - */ -class SystemOverlay : public RenderTaskDefaults -{ -public: - - /** - * Create the SystemOverlay; This should only be done once for each Dali core. - * @param[in] eventThreadServices to send messaged to scene graph. - * @return The newly allocated SystemOverlay. - */ - static SystemOverlay* New( EventThreadServices& eventThreadServices ); - - /** - * Non-virtual destructor; not intended as a base class. - */ - ~SystemOverlay(); - - /** - * @copydoc Dali::Integration::SystemOverlay::Add() - */ - void Add( Actor& actor ); - - /** - * @copydoc Dali::Integration::SystemOverlay::Remove() - */ - void Remove( Actor& actor ); - - /** - * @copydoc Dali::Integration::SystemOverlay::SetOverlayRenderTasks() - */ - void SetOverlayRenderTasks(RenderTaskList& taskList); - - /** - * @copydoc Dali::Integration::SystemOverlay::GetOverlayRenderTasks() - */ - RenderTaskList& GetOverlayRenderTasks(); - - /** - * Forwarded from Stage::SetSize(). - * @param[in] width The new width. - * @param[in] height The new height. - */ - void SetSize( float width, float height ); - - /** - * Retrieve the ordered list of system layers. - * @return The layer-list. - */ - LayerList& GetLayerList(); - - /** - * From RenderTaskDefaults. - * Retrieve the default SystemOverlay root actor. - * @note This is different to the root actor provided by Dali::Stage. - */ - virtual Actor& GetDefaultRootActor(); - - /** - * From RenderTaskDefaults. - * Retrieve the default SystemOverlay camera actor. - * @note This is different to the default camera actor provided by Dali::Stage. - */ - virtual CameraActor& GetDefaultCameraActor(); - -private: - - /** - * Protected constructor; see also SystemOverlay::New(). - * @param[in] eventThreadServices to send messaged to the scene graph. - */ - SystemOverlay( EventThreadServices& eventThreadServices ); - - /** - * Second-phase construction. - */ - void Initialize(); - - /** - * Lazy initialization of the SystemOverlay root actor. - */ - void CreateRootLayer(); - - /** - * Lazy initialization of the default camera actor. - */ - void CreateDefaultCameraActor(); - -private: - - EventThreadServices& mEventThreadServices; - - Vector2 mSize; - - IntrusivePtr mOverlayRenderTaskList; - - LayerPtr mRootLayer; - - CameraActorPtr mDefaultCameraActor; - - // Ordered list of currently on-stage layers - OwnerPointer mLayerList; -}; - -} // namespace Internal - -} // namespace Dali - -#endif // __DALI_INTERNAL_SYSTEM_OVERLAY_H__ diff --git a/dali/internal/event/events/hit-test-algorithm-impl.cpp b/dali/internal/event/events/hit-test-algorithm-impl.cpp index d05d16b..59bb3d0 100644 --- a/dali/internal/event/events/hit-test-algorithm-impl.cpp +++ b/dali/internal/event/events/hit-test-algorithm-impl.cpp @@ -19,7 +19,6 @@ #include // INTERNAL INCLUDES -#include #include #include #include @@ -28,7 +27,6 @@ #include #include #include -#include #include #include #include @@ -627,17 +625,6 @@ bool HitTest( Stage& stage, const Vector2& screenCoordinates, Results& results, { bool wasHit( false ); - // Hit-test the system-overlay actors first - SystemOverlay* systemOverlay = stage.GetSystemOverlayInternal(); - - if( systemOverlay ) - { - RenderTaskList& overlayTaskList = systemOverlay->GetOverlayRenderTasks(); - LayerList& overlayLayerList = systemOverlay->GetLayerList(); - - wasHit = HitTestForEachRenderTask( stage, overlayLayerList, overlayTaskList, screenCoordinates, results, hitTestInterface ); - } - // Hit-test the regular on-stage actors if( !wasHit ) { diff --git a/dali/internal/event/size-negotiation/relayout-controller-impl.cpp b/dali/internal/event/size-negotiation/relayout-controller-impl.cpp index 3d064a9..35190fe 100644 --- a/dali/internal/event/size-negotiation/relayout-controller-impl.cpp +++ b/dali/internal/event/size-negotiation/relayout-controller-impl.cpp @@ -21,7 +21,6 @@ // EXTERNAL INCLUDES #if defined(DEBUG_ENABLED) #include -#include #endif // defined(DEBUG_ENABLED) // INTERNAL INCLUDES @@ -31,7 +30,6 @@ #include #include #include -#include #include namespace Dali @@ -216,15 +214,6 @@ void RelayoutController::OnApplicationSceneCreated() Dali::Actor rootLayer = stage.GetRootLayer(); RequestRelayoutTree( rootLayer ); - // Also add request on the root of system overlay - Dali::Internal::SystemOverlay* systemOverlay = GetImplementation(stage).GetSystemOverlayInternal(); - if( systemOverlay ) - { - Dali::Internal::Actor& systemOverlayInternalRoot = systemOverlay->GetDefaultRootActor(); - Dali::Actor systemOverlayRoot = Dali::Actor(&systemOverlayInternalRoot); - RequestRelayoutTree( systemOverlayRoot ); - } - // Flag request for end of frame Request(); } diff --git a/dali/internal/file.list b/dali/internal/file.list index 5854c89..367a424 100644 --- a/dali/internal/file.list +++ b/dali/internal/file.list @@ -37,7 +37,6 @@ internal_src_files = \ $(internal_src_dir)/event/common/property-notification-manager.cpp \ $(internal_src_dir)/event/common/property-helper.cpp \ $(internal_src_dir)/event/common/stage-impl.cpp \ - $(internal_src_dir)/event/common/system-overlay-impl.cpp \ $(internal_src_dir)/event/common/thread-local-storage.cpp \ $(internal_src_dir)/event/common/type-info-impl.cpp \ $(internal_src_dir)/event/common/type-registry-impl.cpp \ diff --git a/dali/internal/update/manager/update-manager.h b/dali/internal/update/manager/update-manager.h index 7e89944..38d9704 100644 --- a/dali/internal/update/manager/update-manager.h +++ b/dali/internal/update/manager/update-manager.h @@ -1034,7 +1034,7 @@ inline void SetRenderingBehaviorMessage( UpdateManager& manager, DevelStage::Ren * Create a message for setting the depth of a layer * @param[in] manager The update manager * @param[in] layers list of layers - * @param[in] rootLayer True if the layers are added via the SystemOverlay API + * @param[in] rootLayer The rool layer */ inline void SetLayerDepthsMessage( UpdateManager& manager, const std::vector< Layer* >& layers, const Layer* rootLayer ) { diff --git a/dali/public-api/dali-core-version.cpp b/dali/public-api/dali-core-version.cpp index 349189d..147ec71 100644 --- a/dali/public-api/dali-core-version.cpp +++ b/dali/public-api/dali-core-version.cpp @@ -28,7 +28,7 @@ namespace Dali const uint32_t CORE_MAJOR_VERSION = 1; const uint32_t CORE_MINOR_VERSION = 4; -const uint32_t CORE_MICRO_VERSION = 7; +const uint32_t CORE_MICRO_VERSION = 8; const char * const CORE_BUILD_DATE = __DATE__ " " __TIME__; #ifdef DEBUG_ENABLED diff --git a/packaging/dali.spec b/packaging/dali.spec index 1ad3b20..a232c39 100644 --- a/packaging/dali.spec +++ b/packaging/dali.spec @@ -1,6 +1,6 @@ Name: dali Summary: DALi 3D Engine -Version: 1.4.7 +Version: 1.4.8 Release: 1 Group: System/Libraries License: Apache-2.0 and BSD-3-Clause and MIT