Review fixes.

This commit is contained in:
Daria Volvenkova 2017-11-28 13:35:45 +03:00 committed by Roman Kuznetsov
parent 1c9fc8ac72
commit 24ad732af8
5 changed files with 14 additions and 12 deletions

View file

@ -1314,6 +1314,7 @@ void FrontendRenderer::RenderTrafficLayer(ScreenBase const & modelView)
m_trafficRenderer->RenderTraffic(modelView, m_currentZoomLevel, 1.0f /* opacity */,
make_ref(m_gpuProgramManager), m_generalUniforms);
}
GLFunctions::glDisable(gl_const::GLDepthTest);
}
void FrontendRenderer::RenderRouteLayer(ScreenBase const & modelView)
@ -1322,6 +1323,7 @@ void FrontendRenderer::RenderRouteLayer(ScreenBase const & modelView)
GLFunctions::glEnable(gl_const::GLDepthTest);
m_routeRenderer->RenderRoute(modelView, m_trafficRenderer->HasRenderData(),
make_ref(m_gpuProgramManager), m_generalUniforms);
GLFunctions::glDisable(gl_const::GLDepthTest);
}
void FrontendRenderer::RenderUserMarksLayer(ScreenBase const & modelView, RenderState::DepthLayer layerId)

View file

@ -204,8 +204,8 @@ void CacheUserMarks(TileKey const & tileKey, ref_ptr<dp::TextureManager> texture
if (!symbolName.empty())
{
textures->GetSymbolRegion(symbolName, region);
symbolSize.x = max(region.GetPixelSize().x, symbolSize.x);
symbolSize.y = max(region.GetPixelSize().y, symbolSize.y);
symbolSize.x = std::max(region.GetPixelSize().x, symbolSize.x);
symbolSize.y = std::max(region.GetPixelSize().y, symbolSize.y);
}
if (renderInfo.m_titleDecl != nullptr && renderInfo.m_minTitleZoom <= tileKey.m_zoomLevel)

View file

@ -376,7 +376,7 @@ void TransitRouteDisplay::ProcessSubroute(vector<RouteSegment> const & segments,
strings::EndsWith(symbolName, "-m") ||
strings::EndsWith(symbolName, "-l"))
{
symbolName = symbolName.substr(0, symbolName.length() - 2);
symbolName = symbolName.substr(0, symbolName.rfind('-'));
}
gateMarkInfo.m_featureId = fid;
@ -481,7 +481,7 @@ void TransitRouteDisplay::CreateTransitMarks(std::vector<TransitMarkInfo> const
symbolNames[kMediumIconZoom] = mark.m_symbolName + "-m";
symbolNames[kLargeIconZoom] = mark.m_symbolName + "-l";
transitMark->SetSymbolNames(symbolNames);
transitMark->SetPriority(UserMark::Priority::Transit_Gate);
transitMark->SetPriority(UserMark::Priority::TransitGate);
}
else if (mark.m_type == TransitMarkInfo::Type::Transfer)
{
@ -514,7 +514,7 @@ void TransitRouteDisplay::CreateTransitMarks(std::vector<TransitMarkInfo> const
coloredSymbol.insert(make_pair(zoomLevel, params));
}
transitMark->SetColoredSymbols(coloredSymbol);
transitMark->SetPriority(UserMark::Priority::Transit_Transfer);
transitMark->SetPriority(UserMark::Priority::TransitTransfer);
}
else
{
@ -553,7 +553,7 @@ void TransitRouteDisplay::CreateTransitMarks(std::vector<TransitMarkInfo> const
coloredSymbol[kLargeIconZoom] = params;
transitMark->SetColoredSymbols(coloredSymbol);
transitMark->SetPriority(UserMark::Priority::Transit_KeyStop);
transitMark->SetPriority(UserMark::Priority::TransitKeyStop);
}
else
{
@ -569,7 +569,7 @@ void TransitRouteDisplay::CreateTransitMarks(std::vector<TransitMarkInfo> const
coloredSymbol.insert(make_pair(zoomLevel, params));
}
transitMark->SetColoredSymbols(coloredSymbol);
transitMark->SetPriority(UserMark::Priority::Transit_Stop);
transitMark->SetPriority(UserMark::Priority::TransitStop);
transitMark->SetMinTitleZoom(kMinStopTitleZoom);
}
}

View file

@ -126,4 +126,4 @@ private:
TransitRouteInfo m_routeInfo;
int m_subrouteIndex = 0;
};
};

View file

@ -21,10 +21,10 @@ public:
enum class Priority: uint16_t
{
Default = 0,
Transit_Stop,
Transit_Gate,
Transit_Transfer,
Transit_KeyStop
TransitStop,
TransitGate,
TransitTransfer,
TransitKeyStop
};
enum class Type