#define DALI_INTERNAL_COMBINED_UPDATE_RENDER_CONTROLLER_H
/*
- * Copyright (c) 2018 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.
*/
// EXTERNAL INCLUDES
+#include <pthread.h>
#include <semaphore.h>
#include <stdint.h>
-#include <dali/integration-api/core.h>
#include <dali/devel-api/threading/conditional-wait.h>
+#include <dali/integration-api/core.h>
// INTERNAL INCLUDES
-#include <dali/integration-api/thread-synchronization-interface.h>
-#include <dali/internal/system/common/performance-interface.h>
-#include <dali/internal/system/common/fps-tracker.h>
+#include <dali/integration-api/adaptor-framework/thread-synchronization-interface.h>
#include <dali/internal/adaptor/common/thread-controller-interface.h>
+#include <dali/internal/system/common/fps-tracker.h>
+#include <dali/internal/system/common/performance-interface.h>
#include <dali/internal/system/common/update-status-logger.h>
#include <dali/internal/window-system/common/display-connection.h>
-
namespace Dali
{
virtual void ResizeSurface();
/**
+ * @copydoc ThreadControllerInterface::WaitForGraphicsInitialization()
+ */
+ virtual void WaitForGraphicsInitialization();
+
+ /**
* @copydoc ThreadControllerInterface::SetRenderRefreshRate()
*/
virtual void SetRenderRefreshRate( unsigned int numberOfFramesPerRender );
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
*/
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.