Moved over to a next time based display update.

git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@320 e378c898-3ddf-0310-93e7-cc216c733640
This commit is contained in:
rakshasa
2005-03-03 20:09:04 +00:00
parent b840476527
commit fd0c10d962
16 changed files with 48 additions and 74 deletions
+7 -4
View File
@@ -3,6 +3,7 @@
#include <sigc++/slot.h>
#include "canvas.h"
#include "utils/timer.h"
namespace display {
@@ -20,17 +21,19 @@ public:
bool is_active() { return m_active; }
bool is_dynamic() { return m_dynamic; }
bool is_dirty() { return m_lastDraw == 0; }
bool is_dirty() { return m_nextDraw <= utils::Timer::cache(); }
utils::Timer get_next_draw() { return m_nextDraw; }
int get_min_height() { return m_minHeight; }
bool get_active() { return m_active; }
void set_active(bool a) { m_active = a; }
void refresh();
void refresh() { m_canvas->refresh(); }
void resize(int x, int y, int w, int h);
void mark_dirty() { m_lastDraw = 0; }
void mark_dirty() { m_nextDraw = utils::Timer::min(); }
virtual void redraw() = 0;
@@ -48,7 +51,7 @@ protected:
bool m_dynamic;
int m_minHeight;
utils::Timer m_lastDraw;
utils::Timer m_nextDraw;
};
}