| 1010 | } |
| 1011 | |
| 1012 | void TransitSchemeBuilder::GenerateStops(ref_ptr<dp::GraphicsContext> context, MwmSet::MwmId const & mwmId, |
| 1013 | ref_ptr<dp::TextureManager> textures) |
| 1014 | { |
| 1015 | MwmSchemeData const & scheme = m_schemes[mwmId]; |
| 1016 | |
| 1017 | auto const flusher = [this, &mwmId, &scheme](dp::RenderState const & state, drape_ptr<dp::RenderBucket> && b) |
| 1018 | { |
| 1019 | TransitRenderData::Type type = TransitRenderData::Type::Stubs; |
| 1020 | if (state.GetProgram<gpu::Program>() == gpu::Program::TransitMarker) |
| 1021 | type = TransitRenderData::Type::Markers; |
| 1022 | else if (state.GetProgram<gpu::Program>() == gpu::Program::TextOutlined) |
| 1023 | type = TransitRenderData::Type::Text; |
| 1024 | |
| 1025 | TransitRenderData renderData(type, state, m_recacheId, mwmId, scheme.m_pivot, std::move(b)); |
| 1026 | m_flushRenderDataFn(std::move(renderData)); |
| 1027 | }; |
| 1028 | |
| 1029 | uint32_t constexpr kBatchSize = 5000; |
| 1030 | dp::Batcher batcher(kBatchSize, kBatchSize); |
| 1031 | |
| 1032 | batcher.SetBatcherHash(static_cast<uint64_t>(BatcherBucket::Transit)); |
| 1033 | if (scheme.m_transitVersion == ::transit::TransitVersion::OnlySubway) |
| 1034 | { |
| 1035 | GenerateLocationsWithTitles(context, textures, batcher, flusher, scheme, scheme.m_stopsSubway, |
| 1036 | scheme.m_transfersSubway, scheme.m_linesSubway); |
| 1037 | } |
| 1038 | else if (scheme.m_transitVersion == ::transit::TransitVersion::AllPublicTransport) |
| 1039 | { |
| 1040 | GenerateLocationsWithTitles(context, textures, batcher, flusher, scheme, scheme.m_stopsPT, scheme.m_transfersPT, |
| 1041 | scheme.m_linesPT); |
| 1042 | } |
| 1043 | else |
| 1044 | { |
| 1045 | LOG(LERROR, (scheme.m_transitVersion)); |
| 1046 | UNREACHABLE(); |
| 1047 | } |
| 1048 | } |
| 1049 | |
| 1050 | void TransitSchemeBuilder::GenerateMarker(ref_ptr<dp::GraphicsContext> context, m2::PointD const & pt, |
| 1051 | m2::PointD widthDir, float linesCountWidth, float linesCountHeight, |
nothing calls this directly
no test coverage detected