mCore.Render( renderStatus );
AddPerformanceMarker( PerformanceInterface::RENDER_END );
- mRenderHelper.PostRender();
+ if( renderStatus.NeedsPostRender() )
+ {
+ mRenderHelper.PostRender();
+ }
// Trigger event thread to request Update/Render thread to sleep if update not required
if( ( Integration::KeepUpdating::NOT_REQUESTED == keepUpdatingStatus ) &&
mThreadSynchronization.RenderFinished();
// Perform any post-render operations
- DALI_LOG_INFO( gRenderLogFilter, Debug::Verbose, "RenderThread::Run. 4 - PostRender()\n");
- mRenderHelper.PostRender();
+ if( renderStatus.NeedsPostRender() )
+ {
+ DALI_LOG_INFO( gRenderLogFilter, Debug::Verbose, "RenderThread::Run. 4 - PostRender()\n");
+ mRenderHelper.PostRender();
+ }
}
}
Integration::UpdateStatus status;
mCore.Update( 0.0f, mLastUpdateRenderTime, mLastUpdateRenderTime + mRefreshRate * MILLISECONDS_PER_FRAME, status );
- Integration::RenderStatus renderStatus;
- mRenderHelper.PreRender();
- mCore.Render( renderStatus );
- mRenderHelper.PostRender();
+ Render();
}
}
if( mState != State::STOPPED )
{
mRenderHelper.ConsumeEvents();
- mRenderHelper.PreRender();
-
- Integration::RenderStatus renderStatus;
- AddPerformanceMarker( PerformanceInterface::RENDER_START );
- mCore.Render( renderStatus );
- AddPerformanceMarker( PerformanceInterface::RENDER_END );
- mRenderHelper.PostRender();
+ const bool needsUpdate = Render();
- if( ! keepUpdatingStatus &&
- ! renderStatus.NeedsUpdate() )
+ if( !keepUpdatingStatus && !needsUpdate )
{
ChangeState( State::SLEEPING );
}
mRenderHelper.ShutdownEgl();
}
+bool SingleThreadController::Render()
+{
+ mRenderHelper.PreRender();
+
+ Integration::RenderStatus renderStatus;
+ AddPerformanceMarker( PerformanceInterface::RENDER_START );
+ mCore.Render( renderStatus );
+ AddPerformanceMarker( PerformanceInterface::RENDER_END );
+
+ if( renderStatus.NeedsPostRender() )
+ {
+ mRenderHelper.PostRender();
+ }
+
+ return renderStatus.NeedsUpdate();
+}
+
} // namespace Adaptor
} // namespace Internal