#define DALI_NATIVE_RENDER_SURFACE_H
/*
- * Copyright (c) 2020 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 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.
virtual void SetRenderNotification(TriggerEventInterface* renderNotification) = 0;
/**
- * @brief Waits until surface is replaced
- * After tbm surface is acquired in PostRender, this function is finished.
- */
- virtual void WaitUntilSurfaceReplaced() = 0;
-
- /**
* @brief Get the native renderable handle
* @return The native renderable handle
*/
mEGLSurface(nullptr),
mEGLContext(nullptr),
mOwnSurface(false),
- mDrawableCompleted(false),
mTbmQueue(NULL),
mConsumeSurface(NULL),
mThreadSynchronization(NULL)
mRenderNotification = renderNotification;
}
-void NativeRenderSurfaceEcoreWl::WaitUntilSurfaceReplaced()
-{
- ConditionalWait::ScopedLock lock(mTbmSurfaceCondition);
- while(!mDrawableCompleted)
- {
- mTbmSurfaceCondition.Wait(lock);
- }
-
- mDrawableCompleted = false;
-}
-
Any NativeRenderSurfaceEcoreWl::GetNativeRenderable()
{
return mTbmQueue;
tbm_surface_internal_ref(mConsumeSurface);
}
- if(replacingSurface)
- {
- ConditionalWait::ScopedLock lock(mTbmSurfaceCondition);
- mDrawableCompleted = true;
- mTbmSurfaceCondition.Notify(lock);
- }
-
// create damage for client applications which wish to know the update timing
- if(!replacingSurface && mRenderNotification)
+ if(mRenderNotification)
{
// use notification trigger
// Tell the event-thread to render the tbm_surface
else
{
// create damage for client applications which wish to know the update timing
- if(!replacingSurface && mRenderNotification)
+ if(mRenderNotification)
{
// use notification trigger
// Tell the event-thread to render the tbm_surface
void SetRenderNotification(TriggerEventInterface* renderNotification) override;
/**
- * @copydoc Dali::NativeRenderSurface::WaitUntilSurfaceReplaced()
- */
- void WaitUntilSurfaceReplaced() override;
-
- /**
* @copydoc Dali::NativeRenderSurface::GetNativeRenderable()
*/
virtual Any GetNativeRenderable() override;
ColorDepth mColorDepth;
tbm_format mTbmFormat;
bool mOwnSurface;
- bool mDrawableCompleted;
tbm_surface_queue_h mTbmQueue;
tbm_surface_h mConsumeSurface;
ThreadSynchronizationInterface* mThreadSynchronization; ///< A pointer to the thread-synchronization
- ConditionalWait mTbmSurfaceCondition;
};
} // namespace Dali