X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali%2Finternal%2Fadaptor%2Fcommon%2Fadaptor-impl.h;h=23459c37cb4cc69688426ed0ec1b75ca64257db1;hb=0c1d27e964b7ef74d70c38f850af69869191afa5;hp=69a6b3f45d18506f4f868c55a5d85b27a646e463;hpb=0242559376e3ddb4652d2d3d3f28074c1ae110fc;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 69a6b3f..23459c3 100644 --- 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) 2021 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. @@ -21,13 +21,13 @@ // EXTERNAL INCLUDES #include #include +#include #include #include #include #include // INTERNAL INCLUDES -#include #include #include #include @@ -50,11 +50,6 @@ namespace Dali { class RenderSurfaceInterface; -namespace Accessibility -{ -class Bridge; -} - namespace Integration { class Core; @@ -96,6 +91,7 @@ class Adaptor : public Integration::RenderController, public: using AdaptorSignalType = Dali::Adaptor::AdaptorSignalType; using WindowCreatedSignalType = Dali::Adaptor::WindowCreatedSignalType; + using LocaleChangedSignalType = Dali::Adaptor::LocaleChangedSignalType; using SurfaceSize = Uint16Pair; ///< Surface size type @@ -173,6 +169,9 @@ public: */ void SceneCreated(); + /** + * Get the application package name + */ static std::string GetApplicationPackageName(); public: // AdaptorInternalServices implementation @@ -246,7 +245,7 @@ public: // AdaptorInternalServices implementation /** * @copydoc Dali::Adaptor::AddIdle() */ - virtual bool AddIdle(CallbackBase* callback, bool hasReturnValue, bool forceAdd); + virtual bool AddIdle(CallbackBase* callback, bool hasReturnValue); /** * Adds a new Window instance to the Adaptor @@ -425,6 +424,12 @@ public: void SurfaceResizeComplete(Dali::RenderSurfaceInterface* surface, SurfaceSize surfaceSize); /** + * @brief Increase surface resize completed counter. + * This API will be ignored if thread controller is not exist. + */ + void IncreaseSurfaceResizeCounter(); + + /** * Sets layout direction of root by system language * @param[in] locale System locale */ @@ -441,6 +446,11 @@ public: const LogFactoryInterface& GetLogFactory(); /** + * @copydoc Dali::Adaptor::GetTraceFactory + */ + const TraceFactoryInterface& GetTraceFactory(); + + /** * @copydoc Dali::Adaptor::RegisterProcessor */ void RegisterProcessor(Integration::Processor& processor, bool postProcessor); @@ -455,6 +465,13 @@ public: */ bool IsMultipleWindowSupported() const; + /** + * @brief Gets the render thread id of DALi. + * @note If render thread id getter doesn't supported, it will return 0 as default. + * @return The render thread id. + */ + int32_t GetRenderThreadId() const; + public: //AdaptorInternalServices /** * @copydoc Dali::Internal::Adaptor::AdaptorInternalServices::GetPlatformAbstractionInterface() @@ -506,6 +523,20 @@ public: //AdaptorInternalServices */ void GetWindowContainerInterface(WindowContainer& windows) override; + /** + * copydoc Dali::Internal::Adaptor::AdaptorInternalServices::GetTextureUploadManager() + */ + Devel::TextureUploadManager& GetTextureUploadManager() override; + + /** + * @brief Get the configuration manager + * @return The configuration manager, or null if it hasn't been created yet + */ + const ConfigurationManager* GetConfigurationManager() const + { + return mConfigurationManager.get(); + } + public: // Signals /** * @copydoc Dali::Adaptor::SignalResized @@ -531,9 +562,22 @@ public: // Signals return mWindowCreatedSignal; } + /** + * @copydoc Dali::Adaptor::LocaleChangedSignal + */ + LocaleChangedSignalType& LocaleChangedSignal() + { + return mLocaleChangedSignal; + } + public: // From Dali::Internal::Adaptor::CoreEventInterface /** - * @copydoc Dali::Internal::Adaptor:CoreEventInterface:::ProcessCoreEvents() + * @copydoc Dali::Internal::Adaptor::CoreEventInterface:::FlushUpdateMessages() + */ + void FlushUpdateMessages() override; + + /** + * @copydoc Dali::Internal::Adaptor::CoreEventInterface:::ProcessCoreEvents() */ void ProcessCoreEvents() override; @@ -543,16 +587,16 @@ private: // From Dali::Internal::Adaptor::CoreEventInterface */ void QueueCoreEvent(const Dali::Integration::Event& event) override; -private: // From Dali::Integration::RenderController +public: // From Dali::Integration::RenderController /** * @copydoc Dali::Integration::RenderController::RequestUpdate() */ - void RequestUpdate(bool forceUpdate) override; + void RequestUpdate() override; /** * @copydoc Dali::Integration::RenderController::RequestProcessEventsOnIdle() */ - void RequestProcessEventsOnIdle(bool forceProcess) override; + void RequestProcessEventsOnIdle() override; public: // From Dali::Internal::Adaptor::WindowVisibilityObserver /** @@ -605,6 +649,11 @@ private: void SetupSystemInformation(); /** + * Remove system information if needs + */ + void RemoveSystemInformation(); + + /** * Adds a callback to be run when entering an idle state. * * A callback of the following type should be used: @@ -613,13 +662,18 @@ private: * @endcode * This callback will be called repeatedly as long as it returns true. A return of 0 deletes this callback. */ - bool AddIdleEnterer(CallbackBase* callback, bool forceAdd); + bool AddIdleEnterer(CallbackBase* callback); /** * Removes a previously added the idle enterer callback. */ void RemoveIdleEnterer(CallbackBase* callback); + /** + * Trigger to log the memory pools from Core and Adaptor + */ + bool MemoryPoolTimeout(); + private: /** * Constructor @@ -653,6 +707,7 @@ private: // Data AdaptorSignalType mResizedSignal; ///< Resized signal. AdaptorSignalType mLanguageChangedSignal; ///< Language changed signal. WindowCreatedSignalType mWindowCreatedSignal; ///< Window created signal. + LocaleChangedSignalType mLocaleChangedSignal; ///< Locale changed signal. Dali::Adaptor& mAdaptor; ///< Reference to public adaptor instance. State mState; ///< Current state of the adaptor @@ -667,34 +722,31 @@ private: // Data TizenPlatform::TizenPlatformAbstraction* mPlatformAbstraction; ///< Platform abstraction - CallbackManager* mCallbackManager; ///< Used to install callbacks - bool mNotificationOnIdleInstalled; ///< whether the idle handler is installed to send an notification event - TriggerEventInterface* mNotificationTrigger; ///< Notification event trigger - FeedbackPluginProxy* mDaliFeedbackPlugin; ///< Used to access feedback support - FeedbackController* mFeedbackController; ///< Plays feedback effects for Dali-Toolkit UI Controls. - Dali::TtsPlayer mTtsPlayers[Dali::TtsPlayer::MODE_NUM]; ///< Provides TTS support - ObserverContainer mObservers; ///< A list of adaptor observer pointers - EnvironmentOptions* mEnvironmentOptions; ///< environment options - PerformanceInterface* mPerformanceInterface; ///< Performance interface - KernelTrace mKernelTracer; ///< Kernel tracer - SystemTrace mSystemTracer; ///< System tracer - ObjectProfiler* mObjectProfiler; ///< Tracks object lifetime for profiling - SocketFactory mSocketFactory; ///< Socket factory - Mutex mMutex; ///< Mutex - ThreadMode mThreadMode; ///< The thread mode - const bool mEnvironmentOptionsOwned : 1; ///< Whether we own the EnvironmentOptions (and thus, need to delete it) - bool mUseRemoteSurface : 1; ///< whether the remoteSurface is used or not - Dali::LayoutDirection::Type mRootLayoutDirection; ///< LayoutDirection of window + std::unique_ptr mCallbackManager; ///< Used to install callbacks + bool mNotificationOnIdleInstalled; ///< whether the idle handler is installed to send an notification event + bool mRequiredIdleRepeat; ///< whether we need to repeat installed notification event in idle handler + TriggerEventInterface* mNotificationTrigger; ///< Notification event trigger + FeedbackPluginProxy* mDaliFeedbackPlugin; ///< Used to access feedback support + FeedbackController* mFeedbackController; ///< Plays feedback effects for Dali-Toolkit UI Controls. + Dali::TtsPlayer mTtsPlayers[Dali::TtsPlayer::MODE_NUM]; ///< Provides TTS support + ObserverContainer mObservers; ///< A list of adaptor observer pointers + EnvironmentOptions* mEnvironmentOptions; ///< environment options + PerformanceInterface* mPerformanceInterface; ///< Performance interface + KernelTrace mKernelTracer; ///< Kernel tracer + SystemTrace mSystemTracer; ///< System tracer + Devel::TextureUploadManager mTextureUploadManager; ///< TextureUploadManager + ObjectProfiler* mObjectProfiler; ///< Tracks object lifetime for profiling + Dali::Timer mMemoryPoolTimer; ///< Logs memory pool capacity + SlotDelegate mMemoryPoolTimerSlotDelegate; + SocketFactory mSocketFactory; ///< Socket factory + Mutex mMutex; ///< Mutex + ThreadMode mThreadMode; ///< The thread mode + const bool mEnvironmentOptionsOwned : 1; ///< Whether we own the EnvironmentOptions (and thus, need to delete it) + bool mUseRemoteSurface : 1; ///< whether the remoteSurface is used or not + Dali::LayoutDirection::Type mRootLayoutDirection; ///< LayoutDirection of window std::unique_ptr mAddOnManager; ///< Pointer to the addon manager - class AccessibilityObserver : public ConnectionTracker - { - public: - void OnAccessibleKeyEvent(const Dali::KeyEvent& event); - }; - AccessibilityObserver mAccessibilityObserver; - public: inline static Adaptor& GetImplementation(Dali::Adaptor& adaptor) {