* Added a ViewHistory class that stores the current values, so they don't have

to be interpolated everytime. This class also makes sure that the values are
  always from the same offsets, so the flickering is gone.
* Need to use SetMouseEventMask() or else the mouse up will be ignored when
  changing the resolution via dragging the mouse.
* Fixed a bug that prevented the DataHistory data interpolation from working
  correctly.
* The refresh threads are now working at B_URGENT_DISPLAY_PRIORITY, making the
  view updates much more stable with less jitter.
* Removed the draw refresh, and have it always be the same as the value
  refresh.
* Added lower refresh intervals (25, and 75 ms).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29950 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler
2009-04-05 21:05:50 +00:00
parent 9cfb11a5cf
commit 8e26f38727
4 changed files with 218 additions and 79 deletions
+8 -6
View File
@@ -17,7 +17,11 @@
static const uint32 kMsgUpdateTimeInterval = 'upti';
static const bigtime_t kUpdateIntervals[] = { 50, 100, 250, 500, 1000, 2000 };
static const bigtime_t kUpdateIntervals[] = {
25, 50, 75, 100, 250, 500, 1000, 2000
};
static const size_t kNumUpdateIntervals
= sizeof(kUpdateIntervals) / sizeof(kUpdateIntervals[0]);
class IntervalSlider : public BSlider {
@@ -42,9 +46,7 @@ public:
// Find closest index
int32 bestDiff = LONG_MAX;
uint32 bestIndex = 0;
for (uint32 i = 0;
i < sizeof(kUpdateIntervals) / sizeof(kUpdateIntervals[0]);
i++) {
for (uint32 i = 0; i < kNumUpdateIntervals; i++) {
int32 diff = abs(kUpdateIntervals[i] - interval);
if (diff < bestDiff) {
bestDiff = diff;
@@ -63,7 +65,7 @@ public:
private:
const char* _TextFor(uint32 level) const
{
if (level >= sizeof(kUpdateIntervals) / sizeof(kUpdateIntervals[0]))
if (level >= kNumUpdateIntervals)
return NULL;
bigtime_t interval = kUpdateIntervals[level];
@@ -90,7 +92,7 @@ SettingsWindow::SettingsWindow(ActivityWindow* target)
SetLayout(new BGroupLayout(B_VERTICAL));
fIntervalSlider = new IntervalSlider("Update time interval:",
new BMessage(kMsgUpdateTimeInterval), 6);
new BMessage(kMsgUpdateTimeInterval), kNumUpdateIntervals);
fIntervalSlider->SetInterval(target->RefreshInterval());
// controls pane