Follow-up of d54548367a -> Reintroduce GLCanvas3D::m_old_size to avoid unneeded calls to render()

This commit is contained in:
enricoturri1966 2021-05-20 14:42:40 +02:00
parent ef9004cee4
commit 2bd3e018b1
3 changed files with 25 additions and 1 deletions

View file

@ -425,6 +425,10 @@ private:
Model* m_model;
BackgroundSlicingProcess *m_process;
#if ENABLE_SCROLLABLE_LEGEND
std::array<unsigned int, 2> m_old_size{ 0, 0 };
#endif // ENABLE_SCROLLABLE_LEGEND
// Screen is only refreshed from the OnIdle handler if it is dirty.
bool m_dirty;
bool m_initialized;
@ -733,6 +737,10 @@ public:
#endif
}
#if ENABLE_SCROLLABLE_LEGEND
void reset_old_size() { m_old_size = { 0, 0 }; }
#endif // ENABLE_SCROLLABLE_LEGEND
private:
bool _is_shown_on_screen() const;