forked from organicmaps/organicmaps
fixed bug with rare crashes in rendering initialization.
This commit is contained in:
parent
4f19a8a00a
commit
9f3b8cbfe3
3 changed files with 8 additions and 2 deletions
|
@ -23,6 +23,8 @@ CoverageGenerator::CoverageGenerator(
|
|||
RenderPolicy::TCountryIndexFn const & countryIndexFn)
|
||||
: m_queue(1),
|
||||
m_tileRenderer(tileRenderer),
|
||||
m_workCoverage(0),
|
||||
m_currentCoverage(0),
|
||||
m_sequenceID(0),
|
||||
m_windowHandle(windowHandle),
|
||||
m_countryIndexFn(countryIndexFn),
|
||||
|
@ -70,6 +72,8 @@ void CoverageGenerator::InitializeThreadGL()
|
|||
{
|
||||
threads::MutexGuard g(m_mutex);
|
||||
|
||||
LOG(LINFO, ("initializing CoverageGenerator on it's own thread."));
|
||||
|
||||
if (m_renderContext)
|
||||
{
|
||||
m_renderContext->makeCurrent();
|
||||
|
|
|
@ -1387,8 +1387,6 @@ void Framework::SetRenderPolicy(RenderPolicy * renderPolicy)
|
|||
|
||||
m_renderPolicy->SetCountryIndexFn(bind(&Framework::GetCountryIndex, this, _1));
|
||||
|
||||
m_renderPolicy->SetRenderFn(DrawModelFn());
|
||||
|
||||
m_renderPolicy->SetAnimController(m_animController.get());
|
||||
|
||||
m_navigator.SetSupportRotation(m_renderPolicy->DoSupportRotation());
|
||||
|
@ -1403,6 +1401,8 @@ void Framework::SetRenderPolicy(RenderPolicy * renderPolicy)
|
|||
// Do full invalidate instead of any "pending" stuff.
|
||||
Invalidate();
|
||||
|
||||
m_renderPolicy->SetRenderFn(DrawModelFn());
|
||||
|
||||
if (m_benchmarkEngine)
|
||||
m_benchmarkEngine->Start();
|
||||
}
|
||||
|
|
|
@ -97,6 +97,8 @@ TileRenderer::~TileRenderer()
|
|||
|
||||
void TileRenderer::InitializeThreadGL(core::CommandsQueue::Environment const & env)
|
||||
{
|
||||
LOG(LINFO, ("initializing TileRenderer", env.threadNum(), "on it's own thread"));
|
||||
|
||||
ThreadData & threadData = m_threadData[env.threadNum()];
|
||||
|
||||
int tileWidth = m_resourceManager->params().m_textureParams[graphics::ERenderTargetTexture].m_texWidth;
|
||||
|
|
Loading…
Add table
Reference in a new issue