MCPcopy Create free account
hub / github.com/comaps/comaps / FillColorsCache

Method FillColorsCache

libs/drape_frontend/traffic_generator.cpp:427–441  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

425}
426
427void TrafficGenerator::FillColorsCache(ref_ptr<dp::TextureManager> textures)
428{
429 auto constexpr kSpeedGroupsCount = static_cast<size_t>(traffic::SpeedGroup::Count);
430 if (!m_colorsCacheValid)
431 {
432 for (size_t i = 0; i < kSpeedGroupsCount; i++)
433 {
434 dp::TextureManager::ColorRegion colorRegion;
435 auto const colorConstant = GetColorBySpeedGroup(static_cast<traffic::SpeedGroup>(i), false /* route */);
436 textures->GetColorRegion(df::GetColorConstant(colorConstant), colorRegion);
437 m_colorsCache[i] = colorRegion;
438 }
439 m_colorsCacheValid = true;
440 }
441}
442} // namespace df

Callers

nothing calls this directly

Calls 2

GetColorConstantFunction · 0.85
GetColorRegionMethod · 0.80

Tested by

no test coverage detected