X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali%2Finternal%2Fadaptor%2Fcommon%2Fadaptor-impl.h;h=c2a9ad4a0392416563598016f98ddb39b7a4bc46;hb=aecc2d4c642e0cdf360e56accd3e5b96622a707f;hp=d36f8a651f37edda919e55aef9a3e227e9c707fb;hpb=8364cef120b565c63fb38e6366ca1bce0c15f45d;p=platform%2Fcore%2Fuifw%2Fdali-adaptor.git diff --git a/dali/internal/adaptor/common/adaptor-impl.h b/dali/internal/adaptor/common/adaptor-impl.h index d36f8a6..c2a9ad4 100755 --- a/dali/internal/adaptor/common/adaptor-impl.h +++ b/dali/internal/adaptor/common/adaptor-impl.h @@ -2,7 +2,7 @@ #define DALI_INTERNAL_ADAPTOR_IMPL_H /* - * Copyright (c) 2019 Samsung Electronics Co., Ltd. + * Copyright (c) 2020 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -27,31 +27,22 @@ #include // INTERNAL INCLUDES -#include -#include - -#ifdef DALI_ADAPTOR_COMPILATION -#include -#else -#include -#endif - #include #include - +#include +#include +#include +#include +#include #include - #include -#include -#include +#include #include -#include -#include +#include #include #include -#include -#include - +#include +#include namespace Dali { @@ -72,7 +63,6 @@ namespace Adaptor { class DisplayConnection; class GraphicsFactory; -class GestureManager; class GlImplementation; class GlSyncImplementation; class ThreadController; @@ -85,6 +75,7 @@ class PerformanceInterface; class LifeCycleObserver; class ObjectProfiler; class SceneHolder; +class ConfigurationManager; /** * Implementation of the Adaptor class. @@ -261,10 +252,10 @@ public: // AdaptorInternalServices implementation * @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, + virtual bool AddWindow( Dali::Integration::SceneHolder childWindow, const std::string& childWindowName, const std::string& childWindowClassName, - const bool& childWindowMode ); + bool childWindowMode ); /** * Removes an existing Window instance from the Adaptor @@ -285,6 +276,11 @@ public: // AdaptorInternalServices implementation virtual void RemoveIdle( CallbackBase* callback ); /** + * @copydoc Dali::Adaptor::ProcessIdle() + */ + virtual void ProcessIdle(); + + /** * Sets a pre-render callback. */ void SetPreRenderCallback( CallbackBase* callback ); @@ -308,6 +304,11 @@ public: // AdaptorInternalServices implementation */ Dali::WindowContainer GetWindows() const; + /** + * @copydoc Dali::Adaptor::GetSceneHolders() + */ + Dali::SceneHolderList GetSceneHolders() const; + public: /** @@ -321,11 +322,6 @@ public: void SetRenderRefreshRate( unsigned int numberOfVSyncsPerRender ); /** - * @copydoc Dali::Adaptor::SetUseHardwareVSync() - */ - void SetUseHardwareVSync(bool useHardware); - - /** * Return the PlatformAbstraction. * @return The PlatformAbstraction. */ @@ -345,6 +341,14 @@ public: Any GetNativeWindowHandle(); /** + * @brief Retrieve native window handle that the given actor is added to. + * + * @param[in] actor The actor + * @return native window handle + */ + Any GetNativeWindowHandle( Dali::Actor actor ); + + /** * Get the native display associated with the graphics backend * * @return A handle to the native display @@ -399,12 +403,12 @@ public: void GetAppId( std::string& appId ); /** - * Informs core the surface size has changed + * @copydoc Dali::Adaptor::SurfaceResizePrepare */ void SurfaceResizePrepare( Dali::RenderSurfaceInterface* surface, SurfaceSize surfaceSize ); /** - * Informs ThreadController the surface size has changed + * @copydoc Dali::Adaptor::SurfaceResizeComplete */ void SurfaceResizeComplete( Dali::RenderSurfaceInterface* surface, SurfaceSize surfaceSize ); @@ -434,6 +438,18 @@ public: */ void UnregisterProcessor( Integration::Processor& processor ); + /** + * Check MultipleWindow is supported + */ + bool IsMultipleWindowSupported() const; + + /** + * @brief Checks whether the windows are being rendered in the render thread. + * + * @return true if the windows are being rendered in the render thread, or false if not. + */ + bool IsRenderingWindows() const; + public: //AdaptorInternalServices /** @@ -457,11 +473,6 @@ public: //AdaptorInternalServices virtual TriggerEventInterface& GetProcessCoreEventsTrigger(); /** - * @copydoc Dali::Internal::Adaptor::AdaptorInternalServices::GetTriggerEventFactoryInterface() - */ - virtual TriggerEventFactoryInterface& GetTriggerEventFactoryInterface(); - - /** * @copydoc Dali::Internal::Adaptor::AdaptorInternalServices::GetSocketFactoryInterface() */ virtual SocketFactoryInterface& GetSocketFactoryInterface(); @@ -472,11 +483,6 @@ public: //AdaptorInternalServices virtual Dali::RenderSurfaceInterface* GetRenderSurfaceInterface(); /** - * @copydoc Dali::Internal::Adaptor::AdaptorInternalServices::GetVSyncMonitorInterface() - */ - virtual VSyncMonitorInterface* GetVSyncMonitorInterface(); - - /** * @copydoc Dali::Internal::Adaptor::AdaptorInternalServices::GetPerformanceInterface() */ virtual PerformanceInterface* GetPerformanceInterface(); @@ -491,6 +497,11 @@ public: //AdaptorInternalServices */ virtual TraceInterface& GetSystemTraceInterface(); + /** + * copydoc Dali::Internal::Adaptor::AdaptorInternalServices::GetWindowContainerInterface() + */ + virtual void GetWindowContainerInterface( WindowContainer& windows ); + public: // Signals /** @@ -543,7 +554,7 @@ private: // From Dali::Integration::RenderController */ virtual void RequestProcessEventsOnIdle( bool forceProcess ); -private: // From Dali::Internal::Adaptor::WindowVisibilityObserver +public: // From Dali::Internal::Adaptor::WindowVisibilityObserver /** * Called when the window becomes fully or partially visible. @@ -638,26 +649,28 @@ private: // Types STOPPED, ///< Adaptor has been stopped. }; - using SceneHolderPtr = IntrusivePtr< Dali::Internal::Adaptor::SceneHolder >; - using WindowContainer = std::vector; + // There is no weak handle for BaseHandle in DALi, but we can't ref count the window here, + // so we have to store the raw pointer. + using WindowContainer = std::vector; using ObserverContainer = std::vector; private: // Data AdaptorSignalType mResizedSignal; ///< Resized signal. AdaptorSignalType mLanguageChangedSignal; ///< Language changed signal. - WindowCreatedSignalType mWindowCreatedSignal; ///< Window created signal. + WindowCreatedSignalType mWindowCreatedSignal; ///< Window created signal. Dali::Adaptor& mAdaptor; ///< Reference to public adaptor instance. State mState; ///< Current state of the adaptor Dali::Integration::Core* mCore; ///< Dali Core ThreadController* mThreadController; ///< Controls the threads - VSyncMonitor* mVSyncMonitor; ///< Monitors VSync events GraphicsInterface* mGraphics; ///< Graphics interface Dali::DisplayConnection* mDisplayConnection; ///< Display connection WindowContainer mWindows; ///< A container of all the Windows that are currently created + std::unique_ptr mConfigurationManager; ///< Configuration manager + TizenPlatform::TizenPlatformAbstraction* mPlatformAbstraction; ///< Platform abstraction CallbackManager* mCallbackManager; ///< Used to install callbacks @@ -671,11 +684,10 @@ private: // Data PerformanceInterface* mPerformanceInterface; ///< Performance interface KernelTrace mKernelTracer; ///< Kernel tracer SystemTrace mSystemTracer; ///< System tracer - TriggerEventFactory mTriggerEventFactory; ///< Trigger event factory ObjectProfiler* mObjectProfiler; ///< Tracks object lifetime for profiling SocketFactory mSocketFactory; ///< Socket factory const bool mEnvironmentOptionsOwned:1; ///< Whether we own the EnvironmentOptions (and thus, need to delete it) - bool mUseRemoteSurface; ///< whether the remoteSurface is used or not + bool mUseRemoteSurface:1; ///< whether the remoteSurface is used or not public: inline static Adaptor& GetImplementation(Dali::Adaptor& adaptor) { return *adaptor.mImpl; }