| 953 | } |
| 954 | |
| 955 | void TransitSchemeBuilder::GenerateShapes(ref_ptr<dp::GraphicsContext> context, MwmSet::MwmId const & mwmId) |
| 956 | { |
| 957 | MwmSchemeData const & scheme = m_schemes[mwmId]; |
| 958 | |
| 959 | uint32_t constexpr kBatchSize = 65000; |
| 960 | dp::Batcher batcher(kBatchSize, kBatchSize); |
| 961 | batcher.SetBatcherHash(static_cast<uint64_t>(BatcherBucket::Transit)); |
| 962 | { |
| 963 | dp::SessionGuard guard(context, batcher, |
| 964 | [this, &mwmId, &scheme](dp::RenderState const & state, drape_ptr<dp::RenderBucket> && b) |
| 965 | { |
| 966 | TransitRenderData::Type type = TransitRenderData::Type::Lines; |
| 967 | if (state.GetProgram<gpu::Program>() == gpu::Program::TransitCircle) |
| 968 | type = TransitRenderData::Type::LinesCaps; |
| 969 | TransitRenderData renderData(type, state, m_recacheId, mwmId, scheme.m_pivot, std::move(b)); |
| 970 | m_flushRenderDataFn(std::move(renderData)); |
| 971 | }); |
| 972 | |
| 973 | if (scheme.m_transitVersion == ::transit::TransitVersion::OnlySubway) |
| 974 | GenerateLinesSubway(scheme, batcher, context); |
| 975 | else if (scheme.m_transitVersion == ::transit::TransitVersion::AllPublicTransport) |
| 976 | GenerateLinesPT(scheme, batcher, context); |
| 977 | else |
| 978 | { |
| 979 | LOG(LERROR, (scheme.m_transitVersion)); |
| 980 | UNREACHABLE(); |
| 981 | } |
| 982 | } |
| 983 | } |
| 984 | |
| 985 | template <class F, class S, class T, class L> |
| 986 | void TransitSchemeBuilder::GenerateLocationsWithTitles(ref_ptr<dp::GraphicsContext> context, |
nothing calls this directly
no test coverage detected