X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali%2Finternal%2Fadaptor%2Fcommon%2Fadaptor.cpp;h=c8d17eee7412cdd1d64494409f2725783638c597;hb=1b4a1e578fd53340e38b919b8f3459ec1a09462f;hp=e6c37353805ae0d5c58afe24ce07882eced37844;hpb=c02a4175107e990b28e2b603641c8839b738b1c3;p=platform%2Fcore%2Fuifw%2Fdali-adaptor.git diff --git a/dali/internal/adaptor/common/adaptor.cpp b/dali/internal/adaptor/common/adaptor.cpp index e6c3735..c8d17ee 100644 --- a/dali/internal/adaptor/common/adaptor.cpp +++ b/dali/internal/adaptor/common/adaptor.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020 Samsung Electronics Co., Ltd. + * Copyright (c) 2023 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. @@ -19,45 +19,44 @@ #include // EXTERNAL INCLUDES -#include #include +#include // INTERNAL INCLUDES -#include #include #include #include #include +#include #include namespace Dali { - -Adaptor& Adaptor::New( Window window ) +Adaptor& Adaptor::New(Window window) { - Internal::Adaptor::SceneHolder* sceneHolder = &Dali::GetImplementation( window ); - Adaptor* adaptor = Internal::Adaptor::Adaptor::New( Dali::Integration::SceneHolder( sceneHolder ), NULL ); + Internal::Adaptor::SceneHolder* sceneHolder = &Dali::GetImplementation(window); + Adaptor* adaptor = Internal::Adaptor::Adaptor::New(Dali::Integration::SceneHolder(sceneHolder), NULL); return *adaptor; } -Adaptor& Adaptor::New( Window window, const Dali::RenderSurfaceInterface& surface ) +Adaptor& Adaptor::New(Window window, const Dali::RenderSurfaceInterface& surface) { - Internal::Adaptor::SceneHolder* sceneHolder = &Dali::GetImplementation( window ); - Dali::RenderSurfaceInterface* pSurface = const_cast(&surface); - Adaptor* adaptor = Internal::Adaptor::Adaptor::New( Dali::Integration::SceneHolder( sceneHolder ), pSurface, NULL ); + Internal::Adaptor::SceneHolder* sceneHolder = &Dali::GetImplementation(window); + Dali::RenderSurfaceInterface* pSurface = const_cast(&surface); + Adaptor* adaptor = Internal::Adaptor::Adaptor::New(Dali::Integration::SceneHolder(sceneHolder), pSurface, NULL, Dali::Internal::Adaptor::ThreadMode::NORMAL); return *adaptor; } -Adaptor& Adaptor::New( Dali::Integration::SceneHolder window ) +Adaptor& Adaptor::New(Dali::Integration::SceneHolder window) { - Adaptor* adaptor = Internal::Adaptor::Adaptor::New( window, NULL ); + Adaptor* adaptor = Internal::Adaptor::Adaptor::New(window, NULL); return *adaptor; } -Adaptor& Adaptor::New( Dali::Integration::SceneHolder window, const Dali::RenderSurfaceInterface& surface ) +Adaptor& Adaptor::New(Dali::Integration::SceneHolder window, const Dali::RenderSurfaceInterface& surface) { - Dali::RenderSurfaceInterface* pSurface = const_cast(&surface); - Adaptor* adaptor = Internal::Adaptor::Adaptor::New( window, pSurface, NULL ); + Dali::RenderSurfaceInterface* pSurface = const_cast(&surface); + Adaptor* adaptor = Internal::Adaptor::Adaptor::New(window, pSurface, NULL, Dali::Internal::Adaptor::ThreadMode::NORMAL); return *adaptor; } @@ -86,39 +85,39 @@ void Adaptor::Stop() mImpl->Stop(); } -bool Adaptor::AddIdle( CallbackBase* callback, bool hasReturnValue ) +bool Adaptor::AddIdle(CallbackBase* callback, bool hasReturnValue) { - DALI_ASSERT_ALWAYS( IsAvailable() && "Adaptor not instantiated" ); - return mImpl->AddIdle( callback, hasReturnValue, false ); + DALI_ASSERT_ALWAYS(IsAvailable() && "Adaptor not instantiated"); + return mImpl->AddIdle(callback, hasReturnValue); } -bool Adaptor::AddWindow( Dali::Integration::SceneHolder childWindow ) +bool Adaptor::AddWindow(Dali::Integration::SceneHolder childWindow) { - DALI_ASSERT_ALWAYS( IsAvailable() && "Adaptor not instantiated" ); - return mImpl->AddWindow( childWindow ); + DALI_ASSERT_ALWAYS(IsAvailable() && "Adaptor not instantiated"); + return mImpl->AddWindow(childWindow); } -void Adaptor::RemoveIdle( CallbackBase* callback ) +void Adaptor::RemoveIdle(CallbackBase* callback) { - DALI_ASSERT_ALWAYS( IsAvailable() && "Adaptor not instantiated" ); - mImpl->RemoveIdle( callback ); + DALI_ASSERT_ALWAYS(IsAvailable() && "Adaptor not instantiated"); + mImpl->RemoveIdle(callback); } void Adaptor::ProcessIdle() { - DALI_ASSERT_ALWAYS( IsAvailable() && "Adaptor not instantiated" ); + DALI_ASSERT_ALWAYS(IsAvailable() && "Adaptor not instantiated"); mImpl->ProcessIdle(); } -void Adaptor::ReplaceSurface( Window window, Dali::RenderSurfaceInterface& surface ) +void Adaptor::ReplaceSurface(Window window, Dali::RenderSurfaceInterface& surface) { - Internal::Adaptor::SceneHolder* sceneHolder = &Dali::GetImplementation( window ); - mImpl->ReplaceSurface( Dali::Integration::SceneHolder( sceneHolder ), surface ); + Internal::Adaptor::SceneHolder* sceneHolder = &Dali::GetImplementation(window); + mImpl->ReplaceSurface(Dali::Integration::SceneHolder(sceneHolder), surface); } -void Adaptor::ReplaceSurface( Dali::Integration::SceneHolder window, Dali::RenderSurfaceInterface& surface ) +void Adaptor::ReplaceSurface(Dali::Integration::SceneHolder window, Dali::RenderSurfaceInterface& surface) { - mImpl->ReplaceSurface( window, surface ); + mImpl->ReplaceSurface(window, surface); } Adaptor::AdaptorSignalType& Adaptor::ResizedSignal() @@ -146,9 +145,9 @@ Any Adaptor::GetNativeWindowHandle() return mImpl->GetNativeWindowHandle(); } -Any Adaptor::GetNativeWindowHandle( Actor actor ) +Any Adaptor::GetNativeWindowHandle(Actor actor) { - return mImpl->GetNativeWindowHandle( actor ); + return mImpl->GetNativeWindowHandle(actor); } Any Adaptor::GetGraphicsDisplay() @@ -161,14 +160,14 @@ void Adaptor::ReleaseSurfaceLock() mImpl->ReleaseSurfaceLock(); } -void Adaptor::SetRenderRefreshRate( unsigned int numberOfVSyncsPerRender ) +void Adaptor::SetRenderRefreshRate(unsigned int numberOfVSyncsPerRender) { - mImpl->SetRenderRefreshRate( numberOfVSyncsPerRender ); + mImpl->SetRenderRefreshRate(numberOfVSyncsPerRender); } -void Adaptor::SetPreRenderCallback( CallbackBase* callback ) +void Adaptor::SetPreRenderCallback(CallbackBase* callback) { - mImpl->SetPreRenderCallback( callback ); + mImpl->SetPreRenderCallback(callback); } Adaptor& Adaptor::Get() @@ -191,17 +190,17 @@ void Adaptor::NotifyLanguageChanged() mImpl->NotifyLanguageChanged(); } -void Adaptor::FeedTouchPoint( TouchPoint& point, int timeStamp ) +void Adaptor::FeedTouchPoint(TouchPoint& point, int timeStamp) { mImpl->FeedTouchPoint(point, timeStamp); } -void Adaptor::FeedWheelEvent( WheelEvent& wheelEvent ) +void Adaptor::FeedWheelEvent(WheelEvent& wheelEvent) { mImpl->FeedWheelEvent(wheelEvent); } -void Adaptor::FeedKeyEvent( KeyEvent& keyEvent ) +void Adaptor::FeedKeyEvent(KeyEvent& keyEvent) { mImpl->FeedKeyEvent(keyEvent); } @@ -211,14 +210,14 @@ void Adaptor::SceneCreated() mImpl->SceneCreated(); } -void Adaptor::SurfaceResizePrepare( Dali::RenderSurfaceInterface* surface, SurfaceSize surfaceSize ) +void Adaptor::SurfaceResizePrepare(Dali::RenderSurfaceInterface* surface, SurfaceSize surfaceSize) { - mImpl->SurfaceResizePrepare( surface, surfaceSize ); + mImpl->SurfaceResizePrepare(surface, surfaceSize); } -void Adaptor::SurfaceResizeComplete( Dali::RenderSurfaceInterface* surface, SurfaceSize surfaceSize ) +void Adaptor::SurfaceResizeComplete(Dali::RenderSurfaceInterface* surface, SurfaceSize surfaceSize) { - mImpl->SurfaceResizeComplete( surface, surfaceSize ); + mImpl->SurfaceResizeComplete(surface, surfaceSize); } void Adaptor::RenderOnce() @@ -226,19 +225,34 @@ void Adaptor::RenderOnce() mImpl->RenderOnce(); } +void Adaptor::FlushUpdateMessages() +{ + mImpl->FlushUpdateMessages(); +} + +void Adaptor::RequestProcessEventsOnIdle() +{ + mImpl->RequestProcessEventsOnIdle(); +} + const LogFactoryInterface& Adaptor::GetLogFactory() { return mImpl->GetLogFactory(); } -void Adaptor::RegisterProcessor( Integration::Processor& processor ) +const TraceFactoryInterface& Adaptor::GetTraceFactory() +{ + return mImpl->GetTraceFactory(); +} + +void Adaptor::RegisterProcessor(Integration::Processor& processor, bool postProcessor) { - mImpl->RegisterProcessor( processor ); + mImpl->RegisterProcessor(processor, postProcessor); } -void Adaptor::UnregisterProcessor( Integration::Processor& processor ) +void Adaptor::UnregisterProcessor(Integration::Processor& processor, bool postProcessor) { - mImpl->UnregisterProcessor( processor ); + mImpl->UnregisterProcessor(processor, postProcessor); } Dali::WindowContainer Adaptor::GetWindows() const @@ -267,7 +281,7 @@ void Adaptor::OnWindowHidden() } Adaptor::Adaptor() -: mImpl( NULL ) +: mImpl(NULL) { }