mirror of
https://codeberg.org/comaps/comaps
synced 2025-12-19 21:13:35 +00:00
Format all C++ and Java code via clang-format
Signed-off-by: Konstantin Pastbin <konstantin.pastbin@gmail.com>
This commit is contained in:
@@ -8,7 +8,7 @@ namespace dp
|
||||
{
|
||||
extern void RenderFrameMediator(std::function<void()> && renderFrameFunction);
|
||||
} // namespace dp
|
||||
#define RENDER_FRAME_MEDIATOR(renderFunction) dp::RenderFrameMediator([this]{ renderFunction; })
|
||||
#define RENDER_FRAME_MEDIATOR(renderFunction) dp::RenderFrameMediator([this] { renderFunction; })
|
||||
#else
|
||||
#define RENDER_FRAME_MEDIATOR(renderFunction) renderFunction
|
||||
#endif
|
||||
@@ -46,19 +46,17 @@ void BaseRenderer::StopThread()
|
||||
|
||||
// wake up render thread if necessary
|
||||
if (!m_isEnabled)
|
||||
{
|
||||
WakeUp();
|
||||
}
|
||||
|
||||
// wait for render thread completion
|
||||
m_selfThread.Join();
|
||||
}
|
||||
|
||||
|
||||
void BaseRenderer::IterateRenderLoop()
|
||||
{
|
||||
RENDER_FRAME_MEDIATOR(IterateRenderLoopImpl());
|
||||
}
|
||||
|
||||
|
||||
void BaseRenderer::IterateRenderLoopImpl()
|
||||
{
|
||||
RenderFrame();
|
||||
@@ -155,8 +153,7 @@ void BaseRenderer::CheckRenderingEnabled()
|
||||
else
|
||||
{
|
||||
bool const isDrawContext = m_threadName == ThreadsCommutator::RenderThread;
|
||||
context = isDrawContext ? m_contextFactory->GetDrawContext() :
|
||||
m_contextFactory->GetResourcesUploadContext();
|
||||
context = isDrawContext ? m_contextFactory->GetDrawContext() : m_contextFactory->GetResourcesUploadContext();
|
||||
context->SetRenderingEnabled(false);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user