diff --git a/drape_frontend/backend_renderer.cpp b/drape_frontend/backend_renderer.cpp index 93c616eae9..641541503f 100644 --- a/drape_frontend/backend_renderer.cpp +++ b/drape_frontend/backend_renderer.cpp @@ -69,9 +69,6 @@ void BackendRenderer::RecacheCountryStatus() m_commutator->PostMessage(ThreadsCommutator::RenderThread, move(outputMsg), MessagePriority::High); } -///////////////////////////////////////// -// MessageAcceptor // -///////////////////////////////////////// void BackendRenderer::AcceptMessage(ref_ptr message) { switch (message->GetType()) diff --git a/drape_frontend/frontend_renderer.cpp b/drape_frontend/frontend_renderer.cpp index 9f17efae3d..d97a08f63e 100755 --- a/drape_frontend/frontend_renderer.cpp +++ b/drape_frontend/frontend_renderer.cpp @@ -30,11 +30,7 @@ namespace { const double VSyncInterval = 0.030; -//#ifdef DEBUG -//const double VSyncInterval = 0.030; -//#else //const double VSyncInterval = 0.014; -//#endif } // namespace @@ -818,13 +814,12 @@ void FrontendRenderer::Routine::Do() blendingParams.Apply(); my::HighResTimer timer; - //double processingTime = InitAvarageTimePerMessage; // By init we think that one message processed by 1ms - timer.Reset(); double frameTime = 0.0; int inactiveFrameCount = 0; bool viewChanged = true; ScreenBase modelView = m_renderer.UpdateScene(viewChanged); + while (!IsCancelled()) { context->setDefaultFramebuffer(); @@ -846,19 +841,15 @@ void FrontendRenderer::Routine::Do() } else { - double availableTime = VSyncInterval - (timer.ElapsedSeconds() /*+ avarageMessageTime*/); - + double availableTime = VSyncInterval - timer.ElapsedSeconds(); if (availableTime < 0.0) availableTime = 0.01; while (availableTime > 0) { m_renderer.ProcessSingleMessage(availableTime * 1000.0); - availableTime = VSyncInterval - (timer.ElapsedSeconds() /*+ avarageMessageTime*/); - //messageCount++; + availableTime = VSyncInterval - timer.ElapsedSeconds(); } - - //processingTime = (timer.ElapsedSeconds() - processingTime) / messageCount; } context->present(); diff --git a/drape_frontend/gui/country_status.cpp b/drape_frontend/gui/country_status.cpp index 374a3fa03e..a3a0fe3ee5 100644 --- a/drape_frontend/gui/country_status.cpp +++ b/drape_frontend/gui/country_status.cpp @@ -174,7 +174,7 @@ drape_ptr CountryStatus::Draw(ref_ptr tex, Button::Params params; params.m_anchor = m_position.m_anchor; params.m_label = control.m_label; - params.m_labelFont = dp::FontDecl(dp::Color::White(), 16); + params.m_labelFont = dp::FontDecl(dp::Color::White(), 18); params.m_minWidth = 400; params.m_maxWidth = 600; params.m_margin = 5.0f * visualScale; diff --git a/drape_frontend/gui/shape.cpp b/drape_frontend/gui/shape.cpp index a633056f15..cda00ef9f4 100644 --- a/drape_frontend/gui/shape.cpp +++ b/drape_frontend/gui/shape.cpp @@ -1,5 +1,7 @@ #include "shape.hpp" +#include "drape_frontend/visual_params.hpp" + #include "drape/glsl_func.hpp" #include "drape/utils/projection.hpp" @@ -21,6 +23,13 @@ bool Handle::Update(ScreenBase const & screen) m_uniforms.SetMatrix4x4Value("modelView", value_ptr(transpose(translate(mat4(), vec3(m_pivot, 0.0))))); m_uniforms.SetFloatValue("u_opacity", 1.0); + + auto const & params = df::VisualParams::Instance().GetGlyphVisualParams(); + m_uniforms.SetFloatValue("u_outlineGlyphParams", + params.m_outlineMinStart, params.m_outlineMinEnd, + params.m_outlineMaxStart, params.m_outlineMaxEnd); + m_uniforms.SetFloatValue("u_glyphParams", + params.m_alphaGlyphMin, params.m_alphaGlyphMax); } return true; diff --git a/drape_frontend/visual_params.cpp b/drape_frontend/visual_params.cpp index a7cd14a54b..c6f33d32c3 100644 --- a/drape_frontend/visual_params.cpp +++ b/drape_frontend/visual_params.cpp @@ -42,9 +42,9 @@ void VisualParams::Init(double vs, uint32_t tileSize, vector const & a // Here we set up glyphs rendering parameters separately for high-res and low-res screens. if (vs <= 1.0) - g_VizParams.m_glyphVisualParams = { 0.43, 0.6, 0.615, 0.95, 0.43, 0.6 }; + g_VizParams.m_glyphVisualParams = { 0.44, 0.6, 0.615, 0.95, 0.44, 0.6 }; else - g_VizParams.m_glyphVisualParams = { 0.4, 0.575, 0.58, 0.95, 0.4, 0.575 }; + g_VizParams.m_glyphVisualParams = { 0.41, 0.575, 0.58, 0.95, 0.41, 0.575 }; RISE_INITED; } diff --git a/iphone/Maps/Classes/Widgets/MWMMapWidgets.mm b/iphone/Maps/Classes/Widgets/MWMMapWidgets.mm index 257d985165..68ef8eec23 100644 --- a/iphone/Maps/Classes/Widgets/MWMMapWidgets.mm +++ b/iphone/Maps/Classes/Widgets/MWMMapWidgets.mm @@ -56,7 +56,7 @@ case gui::WIDGET_COMPASS: pivot += m2::PointF(self.leftBound, -self.bottomBound) * self.visualScale; break; - case gui::WIDGET_SCALE_LABLE: + case gui::WIDGET_SCALE_LABEL: case gui::WIDGET_COUNTRY_STATUS: break; } diff --git a/map/framework.cpp b/map/framework.cpp index 815a896686..57090dd912 100644 --- a/map/framework.cpp +++ b/map/framework.cpp @@ -1277,6 +1277,10 @@ void Framework::CreateDrapeEngine(ref_ptr contextFactory, m_lastTapEvent->m_isMyPosition, m_lastTapEvent->m_feature); ActivateUserMark(mark, true); } + + // In case of the engine reinitialization recover route. + if (m_routingSession.IsActive()) + InsertRoute(m_routingSession.GetRoute()); } ref_ptr Framework::GetDrapeEngine() @@ -1781,11 +1785,11 @@ void Framework::BuildRoute(m2::PointD const & start, m2::PointD const & finish, vector absentRoutingIndexes; if (code == IRouter::NoError) { - double constexpr kRouteScaleMultiplierToShowWholeRoute = 1.5; + double const kRouteScaleMultiplier = 1.5; InsertRoute(route); m2::RectD routeRect = route.GetPoly().GetLimitRect(); - routeRect.Scale(kRouteScaleMultiplierToShowWholeRoute); + routeRect.Scale(kRouteScaleMultiplier); m_drapeEngine->SetModelViewRect(routeRect, true, -1, true); } else @@ -1907,6 +1911,7 @@ void Framework::InsertRoute(Route const & route) routeColor = dp::Color(5, 105, 175, 204); else routeColor = dp::Color(30, 150, 240, 204); + m_drapeEngine->AddRoute(route.GetPoly(), turns, routeColor); } diff --git a/routing/routing_session.hpp b/routing/routing_session.hpp index e7fa212ebc..9082c3e955 100644 --- a/routing/routing_session.hpp +++ b/routing/routing_session.hpp @@ -90,6 +90,8 @@ public: bool IsOnRoute() const { return (m_state == OnRoute); } void Reset(); + Route const & GetRoute() const { return m_route; } + State OnLocationPositionChanged(location::GpsInfo const & info, Index const & index); void GetRouteFollowingInfo(location::FollowingInfo & info) const;