X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali%2Finternal%2Fadaptor%2Fcommon%2Fcombined-update-render-controller.h;h=7f6f007a22450083b4ffd9ffe017fd25ebae29ff;hb=c12c1126016b3e49cf1237064f4b7ce5c302e0e4;hp=571485b399f522871421e0b4e07778c31cf13ca9;hpb=398db97500b00d1a7efdbbbc69eb60956b88b038;p=platform%2Fcore%2Fuifw%2Fdali-adaptor.git diff --git a/dali/internal/adaptor/common/combined-update-render-controller.h b/dali/internal/adaptor/common/combined-update-render-controller.h index 571485b..7f6f007 100644 --- a/dali/internal/adaptor/common/combined-update-render-controller.h +++ b/dali/internal/adaptor/common/combined-update-render-controller.h @@ -2,7 +2,7 @@ #define DALI_INTERNAL_COMBINED_UPDATE_RENDER_CONTROLLER_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. @@ -19,6 +19,7 @@ */ // EXTERNAL INCLUDES +#include #include #include #include @@ -126,14 +127,14 @@ public: virtual void ReplaceSurface( Dali::RenderSurfaceInterface* surface ); /** - * @copydoc ThreadControllerInterface::DeleteSurface() + * @copydoc ThreadControllerInterface::ResizeSurface() */ - virtual void DeleteSurface( Dali::RenderSurfaceInterface* surface ); + virtual void ResizeSurface(); /** - * @copydoc ThreadControllerInterface::ResizeSurface() + * @copydoc ThreadControllerInterface::WaitForGraphicsInitialization() */ - virtual void ResizeSurface(); + virtual void WaitForGraphicsInitialization(); /** * @copydoc ThreadControllerInterface::SetRenderRefreshRate() @@ -145,6 +146,11 @@ public: */ void SetPreRenderCallback( CallbackBase* callback ) override; + /** + * @copydoc ThreadControllerInterface::AddSurface() + */ + virtual void AddSurface( Dali::RenderSurfaceInterface* surface ); + private: // Undefined copy constructor. @@ -228,7 +234,7 @@ private: * * @return Pointer to the new surface, NULL otherwise */ - Integration::RenderSurface* ShouldSurfaceBeReplaced(); + Dali::RenderSurfaceInterface* ShouldSurfaceBeReplaced(); /** * Called by the Update/Render thread after a surface has been replaced. @@ -238,21 +244,6 @@ private: void SurfaceReplaced(); /** - * Checks to see if the surface needs to be deleted. - * This will lock the mutex in mUpdateRenderThreadWaitCondition. - * - * @return Pointer to the deleted surface, nullptr otherwise - */ - Integration::RenderSurface* ShouldSurfaceBeDeleted(); - - /** - * Called by the Update/Render thread after a surface has been deleted. - * - * This will lock the mutex in mEventThreadWaitCondition - */ - void SurfaceDeleted(); - - /** * Checks to see if the surface needs to be resized. * This will lock the mutex in mUpdateRenderThreadWaitCondition. * @@ -289,6 +280,11 @@ private: void NotifyThreadInitialised(); /** + * Called by the update-render thread when graphics has been initialised. + */ + void NotifyGraphicsInitialised(); + + /** * Helper to add a performance marker to the performance server (if it's active) * @param[in] type performance marker type */ @@ -327,6 +323,7 @@ private: UpdateStatusLogger mUpdateStatusLogger; ///< Object that logs the update-status as required. sem_t mEventThreadSemaphore; ///< Used by the event thread to ensure all threads have been initialised, and when replacing the surface. + sem_t mGraphicsInitializeSemaphore; ///< Used by the render thread to ensure the graphics has been initialised. ConditionalWait mUpdateRenderThreadWaitCondition; ///< The wait condition for the update-render-thread. @@ -361,8 +358,7 @@ private: volatile unsigned int mUseElapsedTimeAfterWait; ///< Whether we should use the elapsed time after waiting (set by the event-thread, read by the update-render-thread). - Integration::RenderSurface* volatile mNewSurface; ///< Will be set to the new-surface if requested (set by the event-thread, read & cleared by the update-render thread). - Integration::RenderSurface* volatile mDeletedSurface; ///< Will be set to the deleted surface if requested (set by the event-thread, read & cleared by the update-render thread). + Dali::RenderSurfaceInterface* volatile mNewSurface; ///< Will be set to the new-surface if requested (set by the event-thread, read & cleared by the update-render thread). volatile unsigned int mPostRendering; ///< Whether post-rendering is taking place (set by the event & render threads, read by the render-thread). volatile unsigned int mSurfaceResized; ///< Will be set to resize the surface (set by the event-thread, read & cleared by the update-render thread).