Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--indexer/drawing_rules.hpp2
-rw-r--r--map/framework.cpp4
-rw-r--r--render/cpu_drawer.cpp4
-rw-r--r--render/cpu_drawer.hpp2
-rw-r--r--render/software_renderer.cpp5
-rw-r--r--render/software_renderer.hpp2
6 files changed, 9 insertions, 10 deletions
diff --git a/indexer/drawing_rules.hpp b/indexer/drawing_rules.hpp
index a72b764f99..f7f4d0eab2 100644
--- a/indexer/drawing_rules.hpp
+++ b/indexer/drawing_rules.hpp
@@ -77,7 +77,7 @@ namespace drule
BaseRule const * Find(Key const & k) const;
- uint32_t GetBgColor(int scale = 0) const;
+ uint32_t GetBgColor(int scale) const;
#ifdef OMIM_OS_DESKTOP
void LoadFromTextProto(string const & buffer);
diff --git a/map/framework.cpp b/map/framework.cpp
index 1dfd0838fd..4a5c2af47b 100644
--- a/map/framework.cpp
+++ b/map/framework.cpp
@@ -11,6 +11,7 @@
#ifndef USE_DRAPE
#include "render/feature_processor.hpp"
#include "render/drawer.hpp"
+ #include "render/proto_to_styles.hpp"
#else
#include "../drape_frontend/visual_params.hpp"
#endif // USE_DRAPE
@@ -315,7 +316,6 @@ void Framework::DrawSingleFrame(m2::PointD const & center, int zoomModifier,
ASSERT(rect.IsPointInside(symbols.m_searchResult), ());
}
-
int baseZoom = m_scales.GetDrawTileScale(rect);
int resultZoom = baseZoom + zoomModifier;
int const minZoom = symbols.m_bottomZoom == -1 ? resultZoom : symbols.m_bottomZoom;
@@ -326,7 +326,7 @@ void Framework::DrawSingleFrame(m2::PointD const & center, int zoomModifier,
CheckMinMaxVisibleScale(rect);
frameNavigator.SetFromRect(m2::AnyRectD(rect));
- m_cpuDrawer->BeginFrame(pxWidth, pxHeight);
+ m_cpuDrawer->BeginFrame(pxWidth, pxHeight, ConvertColor(drule::rules().GetBgColor(resultZoom)));
ScreenBase const & s = frameNavigator.Screen();
shared_ptr<PaintEvent> event = make_shared<PaintEvent>(m_cpuDrawer.get());
diff --git a/render/cpu_drawer.cpp b/render/cpu_drawer.cpp
index eca1dcce6f..177f41c110 100644
--- a/render/cpu_drawer.cpp
+++ b/render/cpu_drawer.cpp
@@ -172,9 +172,9 @@ CPUDrawer::CPUDrawer(Params const & params)
{
}
-void CPUDrawer::BeginFrame(uint32_t width, uint32_t height)
+void CPUDrawer::BeginFrame(uint32_t width, uint32_t height, graphics::Color const & bgColor)
{
- m_renderer->BeginFrame(width, height);
+ m_renderer->BeginFrame(width, height, bgColor);
}
void CPUDrawer::Flush()
diff --git a/render/cpu_drawer.hpp b/render/cpu_drawer.hpp
index c38b42faa8..969c43b709 100644
--- a/render/cpu_drawer.hpp
+++ b/render/cpu_drawer.hpp
@@ -25,7 +25,7 @@ public:
CPUDrawer(Params const & params);
- void BeginFrame(uint32_t width, uint32_t height);
+ void BeginFrame(uint32_t width, uint32_t height, graphics::Color const & bgColor);
void Flush();
void DrawMyPosition(m2::PointD const & myPxPotision);
void DrawSearchResult(m2::PointD const & pxPosition);
diff --git a/render/software_renderer.cpp b/render/software_renderer.cpp
index 152642cc8b..4335bfd3ff 100644
--- a/render/software_renderer.cpp
+++ b/render/software_renderer.cpp
@@ -180,7 +180,7 @@ SoftwareRenderer::SoftwareRenderer(graphics::GlyphCache::Params const & glyphCac
ASSERT(m_skinWidth != 0 && m_skinHeight != 0, ());
}
-void SoftwareRenderer::BeginFrame(uint32_t width, uint32_t height)
+void SoftwareRenderer::BeginFrame(uint32_t width, uint32_t height, graphics::Color const & bgColor)
{
ASSERT(m_frameWidth == 0 && m_frameHeight == 0, ());
m_frameWidth = width;
@@ -195,8 +195,7 @@ void SoftwareRenderer::BeginFrame(uint32_t width, uint32_t height)
m_baseRenderer.reset_clipping(true);
unsigned op = m_pixelFormat.comp_op();
m_pixelFormat.comp_op(agg::comp_op_src);
- graphics::Color c = ConvertColor(drule::rules().GetBgColor());
- m_baseRenderer.clear(agg::rgba8(c.r, c.g, c.b, c.a));
+ m_baseRenderer.clear(agg::rgba8(bgColor.r, bgColor.g, bgColor.b, bgColor.a));
m_pixelFormat.comp_op(op);
}
diff --git a/render/software_renderer.hpp b/render/software_renderer.hpp
index 1c77ade30a..6d91c16f72 100644
--- a/render/software_renderer.hpp
+++ b/render/software_renderer.hpp
@@ -33,7 +33,7 @@ class SoftwareRenderer
public:
SoftwareRenderer(graphics::GlyphCache::Params const & glyphCacheParams, graphics::EDensity density);
- void BeginFrame(uint32_t width, uint32_t height);
+ void BeginFrame(uint32_t width, uint32_t height, graphics::Color const & bgColor);
void DrawSymbol(m2::PointD const & pt, graphics::EPosition anchor,
graphics::Icon::Info const & info);