dpiVertical = int( yres + 0.5f );
}
-int NativeRenderSurfaceEcoreWl::GetOrientation() const
-{
- return 0;
-}
-
void NativeRenderSurfaceEcoreWl::InitializeGraphics()
{
DALI_LOG_TRACE_METHOD( gNativeSurfaceLogFilter );
bool NativeRenderSurfaceEcoreWl::PreRender( bool resizingSurface, const std::vector<Rect<int>>& damagedRects, Rect<int>& clippingRect )
{
- MakeContextCurrent();
-
auto eglGraphics = static_cast<Internal::Adaptor::EglGraphics*>(mGraphics);
if (eglGraphics)
{
eglImpl.SwapBuffers( mEGLSurface, damagedRects );
}
- if ( mOwnSurface )
+ if( mThreadSynchronization )
{
- if( mThreadSynchronization )
- {
- mThreadSynchronization->PostRenderStarted();
- }
-
- if( tbm_surface_queue_can_acquire( mTbmQueue, 1 ) )
- {
- if( tbm_surface_queue_acquire( mTbmQueue, &mConsumeSurface ) != TBM_SURFACE_QUEUE_ERROR_NONE )
- {
- DALI_LOG_ERROR( "Failed to acquire a tbm_surface\n" );
- return;
- }
- }
-
- if ( mConsumeSurface )
- {
- tbm_surface_internal_ref( mConsumeSurface );
- }
+ mThreadSynchronization->PostRenderStarted();
+ }
- if( replacingSurface )
+ if( tbm_surface_queue_can_acquire( mTbmQueue, 1 ) )
+ {
+ if( tbm_surface_queue_acquire( mTbmQueue, &mConsumeSurface ) != TBM_SURFACE_QUEUE_ERROR_NONE )
{
- ConditionalWait::ScopedLock lock( mTbmSurfaceCondition );
- mDrawableCompleted = true;
- mTbmSurfaceCondition.Notify( lock );
+ DALI_LOG_ERROR( "Failed to acquire a tbm_surface\n" );
+ return;
}
+ }
- // create damage for client applications which wish to know the update timing
- if( !replacingSurface && mRenderNotification )
- {
- // use notification trigger
- // Tell the event-thread to render the tbm_surface
- mRenderNotification->Trigger();
- }
+ tbm_surface_internal_ref( mConsumeSurface );
- if( mThreadSynchronization )
- {
- // wait until the event-thread completed to use the tbm_surface
- mThreadSynchronization->PostRenderWaitForCompletion();
- }
+ if( replacingSurface )
+ {
+ ConditionalWait::ScopedLock lock( mTbmSurfaceCondition );
+ mDrawableCompleted = true;
+ mTbmSurfaceCondition.Notify( lock );
+ }
- // release the consumed surface after post render was completed
- ReleaseDrawable();
+ // create damage for client applications which wish to know the update timing
+ if( !replacingSurface && mRenderNotification )
+ {
+ // use notification trigger
+ // Tell the event-thread to render the tbm_surface
+ mRenderNotification->Trigger();
}
- else
+
+ if( mThreadSynchronization )
{
- // create damage for client applications which wish to know the update timing
- if( !replacingSurface && mRenderNotification )
- {
- // use notification trigger
- // Tell the event-thread to render the tbm_surface
- mRenderNotification->Trigger();
- }
+ // wait until the event-thread completed to use the tbm_surface
+ mThreadSynchronization->PostRenderWaitForCompletion();
}
+ // release the consumed surface after post render was completed
+ ReleaseDrawable();
}
void NativeRenderSurfaceEcoreWl::StopRender()
return mGraphics ? mGraphics->GetStencilBufferRequired() : Integration::StencilBufferAvailable::FALSE;
}
-Any NativeRenderSurfaceEcoreWl::GetNativeHandle()
-{
- return mTbmQueue;
-}
-
void NativeRenderSurfaceEcoreWl::ReleaseLock()
{
if( mThreadSynchronization )