/*
- * Copyright (c) 2022 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.
mEventThreadSemaphore(0),
mSurfaceSemaphore(0),
mUpdateRenderThreadWaitCondition(),
+ mPostRenderWaitCondition(),
mAdaptorInterfaces(adaptorInterfaces),
mPerformanceInterface(adaptorInterfaces.GetPerformanceInterface()),
mCore(adaptorInterfaces.GetCore()),
// Start replacing the surface.
{
ConditionalWait::ScopedLock lock(mUpdateRenderThreadWaitCondition);
- mPostRendering = FALSE; // Clear the post-rendering flag as Update/Render thread will replace the surface now
- mNewSurface = newSurface;
+ mNewSurface = newSurface;
mUpdateRenderThreadWaitCondition.Notify(lock);
}
// Start replacing the surface.
{
ConditionalWait::ScopedLock lock(mUpdateRenderThreadWaitCondition);
- mPostRendering = FALSE; // Clear the post-rendering flag as Update/Render thread will delete the surface now
mDeletedSurface = surface;
mUpdateRenderThreadWaitCondition.Notify(lock);
}
{
ConditionalWait::ScopedLock lock(mUpdateRenderThreadWaitCondition);
- mPostRendering = FALSE; // Clear the post-rendering flag as Update/Render thread will resize the surface now
// Surface is resized and the surface resized count is increased.
mSurfaceResized++;
mUpdateRenderThreadWaitCondition.Notify(lock);
void CombinedUpdateRenderController::PostRenderComplete()
{
- ConditionalWait::ScopedLock lock(mUpdateRenderThreadWaitCondition);
+ ConditionalWait::ScopedLock lock(mPostRenderWaitCondition);
mPostRendering = FALSE;
- mUpdateRenderThreadWaitCondition.Notify(lock);
+ mPostRenderWaitCondition.Notify(lock);
}
///////////////////////////////////////////////////////////////////////////////////////////////////
void CombinedUpdateRenderController::PostRenderStarted()
{
- ConditionalWait::ScopedLock lock(mUpdateRenderThreadWaitCondition);
+ ConditionalWait::ScopedLock lock(mPostRenderWaitCondition);
mPostRendering = TRUE;
}
void CombinedUpdateRenderController::PostRenderWaitForCompletion()
{
- ConditionalWait::ScopedLock lock(mUpdateRenderThreadWaitCondition);
+ ConditionalWait::ScopedLock lock(mPostRenderWaitCondition);
while(mPostRendering &&
!mNewSurface && // We should NOT wait if we're replacing the surface
!mDeletedSurface && // We should NOT wait if we're deleting the surface
!mDestroyUpdateRenderThread)
{
- mUpdateRenderThreadWaitCondition.Wait(lock);
+ mPostRenderWaitCondition.Wait(lock);
}
}
#define DALI_INTERNAL_COMBINED_UPDATE_RENDER_CONTROLLER_H
/*
- * Copyright (c) 2022 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.
Semaphore<> mSurfaceSemaphore; ///< Used by the event thread to ensure the surface has been deleted or replaced.
ConditionalWait mUpdateRenderThreadWaitCondition; ///< The wait condition for the update-render-thread.
+ ConditionalWait mPostRenderWaitCondition; ///< The wait condition for the post render.
AdaptorInternalServices& mAdaptorInterfaces; ///< The adaptor internal interface
PerformanceInterface* mPerformanceInterface; ///< The performance logging interface