forked from organicmaps/organicmaps
added isTiling as a parameter to DrawModel
This commit is contained in:
parent
243b868433
commit
e91c24bce5
8 changed files with 15 additions and 9 deletions
|
@ -126,7 +126,7 @@ void BasicRenderPolicy::DrawFrame(shared_ptr<PaintEvent> const & e,
|
|||
|
||||
e->drawer()->screen()->clear(m_bgColor);
|
||||
|
||||
m_renderFn(e, s, s.ClipRect(), s.ClipRect(), scales::GetScaleLevel(glbRect));
|
||||
m_renderFn(e, s, s.ClipRect(), s.ClipRect(), scales::GetScaleLevel(glbRect), false);
|
||||
|
||||
infoLayer->draw(e->drawer()->screen().get(), math::Identity<double, 3>());
|
||||
e->drawer()->screen()->resetInfoLayer();
|
||||
|
|
|
@ -297,7 +297,7 @@ int Framework::GetDrawScale() const
|
|||
|
||||
RenderPolicy::TRenderFn Framework::DrawModelFn()
|
||||
{
|
||||
return bind(&Framework::DrawModel, this, _1, _2, _3, _4, _5);
|
||||
return bind(&Framework::DrawModel, this, _1, _2, _3, _4, _5, _6);
|
||||
}
|
||||
|
||||
/// Actual rendering function.
|
||||
|
@ -305,7 +305,8 @@ void Framework::DrawModel(shared_ptr<PaintEvent> const & e,
|
|||
ScreenBase const & screen,
|
||||
m2::RectD const & selectRect,
|
||||
m2::RectD const & clipRect,
|
||||
int scaleLevel)
|
||||
int scaleLevel,
|
||||
bool isTiling)
|
||||
{
|
||||
fwork::DrawProcessor doDraw(clipRect, screen, e, scaleLevel);
|
||||
|
||||
|
@ -314,7 +315,7 @@ void Framework::DrawModel(shared_ptr<PaintEvent> const & e,
|
|||
int const scale = (m_queryMaxScaleMode ? 17 : scaleLevel);
|
||||
|
||||
//threads::MutexGuard lock(m_modelSyn);
|
||||
if (m_renderPolicy->IsTiling())
|
||||
if (isTiling)
|
||||
m_model.ForEachFeature_TileDrawing(selectRect, doDraw, scale);
|
||||
else
|
||||
m_model.ForEachFeature(selectRect, doDraw, scale);
|
||||
|
|
|
@ -143,7 +143,8 @@ public:
|
|||
ScreenBase const & screen,
|
||||
m2::RectD const & selectRect,
|
||||
m2::RectD const & clipRect,
|
||||
int scaleLevel);
|
||||
int scaleLevel,
|
||||
bool isTiling);
|
||||
|
||||
void Search(string const & text, SearchCallbackT callback);
|
||||
search::Engine * GetSearchEngine();
|
||||
|
|
|
@ -33,7 +33,8 @@ public:
|
|||
ScreenBase const &,
|
||||
m2::RectD const &,
|
||||
m2::RectD const &,
|
||||
int)> TRenderFn;
|
||||
int,
|
||||
bool)> TRenderFn;
|
||||
|
||||
typedef function<bool (m2::PointD const &)> TEmptyModelFn;
|
||||
|
||||
|
|
|
@ -441,7 +441,8 @@ void RenderQueueRoutine::Do()
|
|||
m_currentRenderCommand->m_frameScreen,
|
||||
glbRect,
|
||||
glbRect,
|
||||
scaleLevel);
|
||||
scaleLevel,
|
||||
false);
|
||||
|
||||
/// all unprocessed commands should be cancelled
|
||||
if (m_currentRenderCommand->m_paintEvent->isCancelled() && m_glQueue)
|
||||
|
|
|
@ -39,7 +39,7 @@ class RenderQueueRoutine : public threads::IRoutine
|
|||
{
|
||||
public:
|
||||
|
||||
typedef function<void(shared_ptr<PaintEvent>, ScreenBase const &, m2::RectD const &, m2::RectD const &, int)> render_fn_t;
|
||||
typedef function<void(shared_ptr<PaintEvent>, ScreenBase const &, m2::RectD const &, m2::RectD const &, int, bool)> render_fn_t;
|
||||
typedef function<bool (m2::PointD const &)> TEmptyModelFn;
|
||||
|
||||
private:
|
||||
|
|
|
@ -104,6 +104,7 @@ TestRenderPolicy::TestRenderPolicy(VideoTimer * videoTimer,
|
|||
|
||||
m_windowHandle->setUpdatesEnabled(false);
|
||||
m_windowHandle->setVideoTimer(videoTimer);
|
||||
m_windowHandle->setRenderPolicy(this);
|
||||
m_windowHandle->setRenderContext(primaryRC);
|
||||
|
||||
m_auxFrameBuffer = make_shared_ptr(new yg::gl::FrameBuffer());
|
||||
|
|
|
@ -167,7 +167,8 @@ void TileRenderer::DrawTile(core::CommandsQueue::Environment const & env,
|
|||
frameScreen,
|
||||
selectRect,
|
||||
clipRect,
|
||||
rectInfo.m_drawScale
|
||||
rectInfo.m_drawScale,
|
||||
rectInfo.m_tileScale <= 17
|
||||
);
|
||||
|
||||
if (!env.isCancelled())
|
||||
|
|
Loading…
Add table
Reference in a new issue