| 402 | } |
| 403 | |
| 404 | void TextureManager::OnSwitchMapStyle(ref_ptr<dp::GraphicsContext> context) |
| 405 | { |
| 406 | CHECK(m_isInitialized, ()); |
| 407 | |
| 408 | bool const isVulkan = context->GetApiVersion() == dp::ApiVersion::Vulkan; |
| 409 | |
| 410 | // Here we need invalidate only textures which can be changed in map style switch. |
| 411 | // Now we update only symbol textures, if we need update other textures they must be added here. |
| 412 | // For Vulkan we use m_texturesToCleanup to defer textures destroying. |
| 413 | for (auto const & texture : m_symbolTextures) |
| 414 | { |
| 415 | ref_ptr<SymbolsTexture> symbolsTexture = make_ref(texture); |
| 416 | if (isVulkan) |
| 417 | symbolsTexture->DeferredCleanup(m_texturesToCleanup); |
| 418 | |
| 419 | symbolsTexture->Invalidate(context, m_resPostfix, make_ref(m_textureAllocator)); |
| 420 | } |
| 421 | } |
| 422 | |
| 423 | void TextureManager::OnVisualScaleChanged(ref_ptr<dp::GraphicsContext> context, Params const & params) |
| 424 | { |
no test coverage detected