From c1d9a43ada8af9cf72765bc498d9e164ac492d8d Mon Sep 17 00:00:00 2001 From: "r.kuznetsov" Date: Fri, 18 Dec 2015 10:13:36 +0300 Subject: [PATCH] Added progress symbols precaching --- drape_frontend/gui/country_status.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/drape_frontend/gui/country_status.cpp b/drape_frontend/gui/country_status.cpp index d12eecc836..daea647abf 100644 --- a/drape_frontend/gui/country_status.cpp +++ b/drape_frontend/gui/country_status.cpp @@ -176,6 +176,16 @@ drape_ptr CountryStatus::Draw(ref_ptr tex, drape_ptr renderer = make_unique_dp(); dp::Batcher::TFlushFn flushFn = bind(&ShapeRenderer::AddShape, renderer.get(), _1, _2); + // Precache progress symbols. + { + CountryStatusHelper & helper = DrapeGui::GetCountryStatusHelper(); + string alphabet; + size_t maxLength; + helper.GetProgressInfo(alphabet, maxLength); + dp::TextureManager::TGlyphsBuffer buffer; + tex->GetGlyphRegions(strings::MakeUniString(alphabet), buffer); + } + // Create labels. ForEachComponent(helper, CountryStatusHelper::CONTROL_TYPE_LABEL, [this, &tex, &flushFn, &state](CountryStatusHelper::Control const & control)