| 54 | } |
| 55 | |
| 56 | void RouteBuilder::BuildArrows(ref_ptr<dp::GraphicsContext> context, dp::DrapeID subrouteId, |
| 57 | std::vector<ArrowBorders> const & borders, ref_ptr<dp::TextureManager> textures, |
| 58 | int recacheId) |
| 59 | { |
| 60 | auto it = m_routeCache.find(subrouteId); |
| 61 | if (it == m_routeCache.end()) |
| 62 | return; |
| 63 | |
| 64 | drape_ptr<SubrouteArrowsData> routeArrowsData = make_unique_dp<SubrouteArrowsData>(); |
| 65 | routeArrowsData->m_subrouteId = subrouteId; |
| 66 | routeArrowsData->m_pivot = it->second.m_polyline.GetLimitRect().Center(); |
| 67 | routeArrowsData->m_recacheId = recacheId; |
| 68 | RouteShape::CacheRouteArrows(context, textures, it->second.m_polyline, borders, it->second.m_baseDepthIndex, |
| 69 | *routeArrowsData.get()); |
| 70 | |
| 71 | // Flush route arrows geometry. |
| 72 | context->Flush(); |
| 73 | |
| 74 | if (m_flushArrowsFn != nullptr) |
| 75 | m_flushArrowsFn(std::move(routeArrowsData)); |
| 76 | } |
| 77 | } // namespace df |
no test coverage detected