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

Method OnSwitchMapStyle

libs/drape/texture_manager.cpp:404–421  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

402}
403
404void 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
423void TextureManager::OnVisualScaleChanged(ref_ptr<dp::GraphicsContext> context, Params const & params)
424{

Callers 1

AcceptMessageMethod · 0.80

Calls 4

make_refFunction · 0.85
DeferredCleanupMethod · 0.80
GetApiVersionMethod · 0.45
InvalidateMethod · 0.45

Tested by

no test coverage detected