forked from organicmaps/organicmaps
forcing recalculation of ScreenCoverage in some cases
This commit is contained in:
parent
46e1a2e65a
commit
515eb7975f
4 changed files with 15 additions and 5 deletions
|
@ -75,9 +75,9 @@ void CoverageGenerator::Cancel()
|
|||
m_queue.Cancel();
|
||||
}
|
||||
|
||||
void CoverageGenerator::AddCoverScreenTask(ScreenBase const & screen)
|
||||
void CoverageGenerator::AddCoverScreenTask(ScreenBase const & screen, bool doForce)
|
||||
{
|
||||
if (screen == m_currentScreen)
|
||||
if ((screen == m_currentScreen) && (!doForce))
|
||||
return;
|
||||
|
||||
m_currentScreen = screen;
|
||||
|
|
|
@ -60,7 +60,7 @@ public:
|
|||
void InitializeThreadGL();
|
||||
void FinalizeThreadGL();
|
||||
|
||||
void AddCoverScreenTask(ScreenBase const & screen);
|
||||
void AddCoverScreenTask(ScreenBase const & screen, bool doForce);
|
||||
void AddMergeTileTask(Tiler::RectInfo const & rectInfo);
|
||||
|
||||
void CoverScreen(ScreenBase const & screen, int sequenceID);
|
||||
|
|
|
@ -36,7 +36,8 @@ TilingRenderPolicyST::TilingRenderPolicyST(VideoTimer * videoTimer,
|
|||
shared_ptr<yg::gl::RenderContext> const & primaryRC)
|
||||
: QueuedRenderPolicy(GetPlatform().CpuCores() + 1, primaryRC, false, GetPlatform().CpuCores()),
|
||||
m_drawScale(0),
|
||||
m_isEmptyModel(false)
|
||||
m_isEmptyModel(false),
|
||||
m_doForce(false)
|
||||
{
|
||||
yg::ResourceManager::Params rmp = rmParams;
|
||||
|
||||
|
@ -262,7 +263,8 @@ void TilingRenderPolicyST::DrawFrame(shared_ptr<PaintEvent> const & e, ScreenBas
|
|||
|
||||
pDrawer->screen()->clear(m_bgColor);
|
||||
|
||||
m_coverageGenerator->AddCoverScreenTask(currentScreen);
|
||||
m_coverageGenerator->AddCoverScreenTask(currentScreen, m_doForce);
|
||||
m_doForce = false;
|
||||
|
||||
m_coverageGenerator->Mutex().Lock();
|
||||
|
||||
|
|
|
@ -40,6 +40,8 @@ private:
|
|||
int m_drawScale;
|
||||
bool m_isEmptyModel;
|
||||
|
||||
bool m_doForce;
|
||||
|
||||
protected:
|
||||
|
||||
TileRenderer & GetTileRenderer();
|
||||
|
@ -59,6 +61,12 @@ public:
|
|||
virtual void StartScale();
|
||||
virtual void StopScale();
|
||||
|
||||
virtual void StartDrag();
|
||||
virtual void StopDrag();
|
||||
|
||||
virtual void StartRotate(double a, double timeInSec);
|
||||
virtual void StopRotate(double a, double timeInSec);
|
||||
|
||||
bool IsTiling() const;
|
||||
bool IsEmptyModel() const;
|
||||
int GetDrawScale(ScreenBase const & s) const;
|
||||
|
|
Loading…
Add table
Reference in a new issue