diff --git a/drape_frontend/viewport.cpp b/drape_frontend/viewport.cpp index e67ba1f262..4d5e709e0b 100644 --- a/drape_frontend/viewport.cpp +++ b/drape_frontend/viewport.cpp @@ -59,6 +59,11 @@ uint32_t Viewport::GetHeight() const return GetLogicHeight() * m_pixelRatio; } +float Viewport::GetPixelRatio() const +{ + return m_pixelRatio; +} + void Viewport::Apply() const { GLFunctions::glViewport(GetX0(), GetY0(), GetWidth(), GetHeight()); diff --git a/drape_frontend/viewport.hpp b/drape_frontend/viewport.hpp index 3bef34e05d..e98faf3adc 100644 --- a/drape_frontend/viewport.hpp +++ b/drape_frontend/viewport.hpp @@ -28,6 +28,7 @@ public: uint32_t GetY0() const; uint32_t GetWidth() const; uint32_t GetHeight() const; + float GetPixelRatio() const; // Apply viewport to graphics pipeline // with convert start poin and size to physical pixels void Apply() const; diff --git a/drape_frontend/visual_params.cpp b/drape_frontend/visual_params.cpp index 15cd59d376..7d1e976557 100644 --- a/drape_frontend/visual_params.cpp +++ b/drape_frontend/visual_params.cpp @@ -178,7 +178,11 @@ int CalculateTileSize(int screenWidth, int screenHeight) res = flooredSz; } - return min(max(res / 2, 256), 1024); +#ifndef OMIM_OS_DESKTOP + return my::clamp(res / 2, 256, 1024); +#else + return my::clamp(res / 2, 512, 1024); +#endif } int GetDrawTileScale(int baseScale)