History log of /haiku/src/apps/activitymonitor/ActivityView.h
Revision Date Author Comments
# 0f2661cc 24-Dec-2021 Adrien Destugues <pulkomandy@pulkomandy.tk>

Partially revert "ActivityMonitor: remove double buffering and custom background drawing"

This partially reverts commit cc0226fad05a6796f50723554c10b1bbd02de7b1.

This commit caused high CPU usage in app_server. The double buffering in
ActivityMonitor is not to avoid flickering, it allows to draw just a few
pixels of the the curves at each update, and reuse most of the bitmap
from the previous run.

Removing this means all the curves are fully redrawn at each update,
resulting in higher CPU usage (one core at 30% on my machine with 5
different graphs).

Keep the part of the changes removing code for custom background
drawing. B_TRANSPARENT_VIEW flag can be used instead.

Change-Id: Ie3438ca634c934f3e96ce5f7ad71ce7b3a435013
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4833
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
Reviewed-by: Axel Dörfler <axeld@pinc-software.de>


# cc0226fa 16-Jan-2020 X512 <danger_mail@list.ru>

ActivityMonitor: remove double buffering and custom background drawing

Part of #15623.

Change-Id: Id6b7c13623e66d5b88ffc48766a5fe5ec4099b64
Reviewed-on: https://review.haiku-os.org/c/haiku/+/2133
Reviewed-by: Stephan Aßmus <superstippi@gmx.de>


# 077c84eb 05-Nov-2013 Pawel Dziepak <pdziepak@quarnos.org>

kernel: atomic_*() functions rework

* No need for the atomically changed variables to be declared as
volatile.
* Drop support for atomically getting and setting unaligned data.
* Introduce atomic_get_and_set[64]() which works the same as
atomic_set[64]() used to. atomic_set[64]() does not return the
previous value anymore.


# fd19c736 30-Apr-2013 Adrien Destugues <pulkomandy@gmail.com>

Fix BAboutWindow lifecycle

BAboutWindow returned false in QuitRequested in order to hide instead of closing.
Not only this keeps a BLooper running for a rarely used window, but it also
prevents quitting an application in the window was not destroyed first.

* Remove aforementioned QuitRequested method,
* Add a static GetWindow method that returns the existing about window, if there
is one, or creates one if there is not. A boolean can be set to tell the caller
what happened,
* Adjust all callers to use that new method, instead of managing the window themselves.


# 5b0cd987 17-Aug-2012 John Scipione <jscipione@gmail.com>

WIP: Create the about dialog once, hide and show, Quit() when object is destroyed.


# d63b75fa 22-Feb-2012 Philippe Saint-Pierre <stpere@gmail.com>

Outline of labels/strings drawn to desktop

* Rather than duplicating the decision taking logic involving wheter or not to draw
the outline or glow in every replicant, update be_control_look to make it more
generic.
* The Monitoring of the background preferences is now only done in Tracker (where it
was already being done).
* Add a BControlLook::B_IGNORE_OUTLINE flag to avoid this new behaviour.
* Remove that said logic from ActivityMonitor and use be_control_look.
* Use the ignore flag in DeskCalc to avoid the outline in its case.

Should fix #7716, #7291.


# bb7cffd0 14-Jan-2010 Philippe Saint-Pierre <stpere@gmail.com>

ActivityMonitor (when used as replicant) :

* Use the "Icon Label Outline" setting to improve readability
* It is using the same algorithm as Tracker to outline and glow the text,
and determine the color of the text.

Implements enhancement suggestion #5105.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35084 a95241bf-73f2-0310-859d-f6bbb57e9c96


# ed1b2753 07-Apr-2009 Stephan Aßmus <superstippi@gmx.de>

* Some beautification, mostly for when the replicant is embedded on the Desktop.
* Fall back to a shorter legend label when the room is too small (before
truncating).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30001 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 8e26f387 05-Apr-2009 Axel Dörfler <axeld@pinc-software.de>

* 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


# 1bb87bd0 13-Mar-2009 Axel Dörfler <axeld@pinc-software.de>

* Added a settings window - right now, you can only change the time interval,
though.
* Shortened the time interval defaults to 250 ms; the drawing updates are made
every 500 ms - this still seems to have only little influence on CPU load over
here (YMMV).
* The resolution/scale change is now applied to all views, not just the current.
* Changed the pen size of the chart to 1.5.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29497 a95241bf-73f2-0310-859d-f6bbb57e9c96


# d4216445 15-Jul-2008 Axel Dörfler <axeld@pinc-software.de>

* Offloaded the data source retrieval into another thread for more accuracy.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26434 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 51591198 14-Jul-2008 Axel Dörfler <axeld@pinc-software.de>

* Now use two views when starting (one memory, one CPU usage). The third view
that is added to the window is a networking monitor, all later views default
to CPU usage again.
* DataSources can now share a single adaptive scale, so that they become
comparable in a single view.
* The networking in/out sources are now using this feature.
* DataHistory::ValueAt() now uses binary search to find the right data_item;
this also fixes bug #2140, and makes it possible to change the refresh rate
(which is not yet implemented, though).
* Zooming the timeline now also works by clicking the first mouse button and
dragging the mouse around (instead of only via the scroll wheel, in case you
hadn't noticed yet :-)).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26409 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 1201d52e 22-Apr-2008 Axel Dörfler <axeld@pinc-software.de>

* Color drops for the data source color are now only accepted on the colored
box, added a new method _LegendColorFrameAt() that returns that area, and
is also used when drawing it.
* Fixed changing the history background color; it accidently changed the color
of the wrong view. This fixes bug #2115.
* If the history gets too dark, it will now lighten up the scale, instead of
drawing it even darker.
* Changing the color of a data source now immediately redraws the colored box,
too.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25097 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 9c89c450 19-Apr-2008 Axel Dörfler <axeld@pinc-software.de>

* Allow color drops to change the legend background color only for the
replicant.
* Implemented storing and restoring the color of the data sources.
* Minor style fixes.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25046 a95241bf-73f2-0310-859d-f6bbb57e9c96


# c28f8ea3 18-Apr-2008 François Revol <revol@free.fr>

Now reacts to color drops. Tested with Zeta prefs and ArtPaint palette.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25028 a95241bf-73f2-0310-859d-f6bbb57e9c96


# dc1ffc79 18-Apr-2008 François Revol <revol@free.fr>

- fix BeOS build (it's getting nasty)
- add a media node count data source. Yes I do have work to do instead :P


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25022 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 065e8de0 17-Apr-2008 Axel Dörfler <axeld@pinc-software.de>

* Improved layout of the activity views: each view now has separate layout
items for the history and the legend, causing the history parts of all
views to be of equal size if used (which ActivityWindow now does, of course).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25020 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 74158bb4 17-Apr-2008 François Revol <revol@free.fr>

- introduced a SystemInfoHandler class used to watch for stuff when polling isn't needed.
- used it to add a count of running apps (not exactly the same as teams).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25012 a95241bf-73f2-0310-859d-f6bbb57e9c96


# cbd4bc95 17-Apr-2008 François Revol <revol@free.fr>

Made ActivityMonitor buildable under BeOS (at least BONE).
This is only temporary, to help test adding data sources, so the gross #ifdef __HAIKU__ are intentional to keep BeOS-only code (without layout support) trackable. It is not fully functional but sufficient for testing and will go away later.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25009 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 3a4a2141 13-Apr-2008 Axel Dörfler <axeld@pinc-software.de>

Some more work on the ActivityMonitor:
* Added legend.
* Added network receiving/sending DataSource.
* Now uses the new layout engine.
* Added support for per CPU DataSources, and added a per CPU CPU usage
DataSource.
* The DataSources can now be turned on and off via popup menu.
* You can now add more than one view to the window.
* The DataSources of the ActivityViews are now remembered.
* Now uses an offscreen bitmap to reduce flicker (it should now no longer
flicker with accelerated graphics).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24955 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 18d3e65e 06-Apr-2008 Axel Dörfler <axeld@pinc-software.de>

* The beginnings of an activity monitor application. Very bare and feature-less
right now, but it's already working (and shows that we better compute our
system_info::cached_pages field directly).
* I am not sure if we want to keep this app here, merge it with
ProcessController, or have it as a separate (3rdparty) app. Opinions welcome.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24846 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 077c84eb27b25430428d356f3d13afabc0cc0d13 05-Nov-2013 Pawel Dziepak <pdziepak@quarnos.org>

kernel: atomic_*() functions rework

* No need for the atomically changed variables to be declared as
volatile.
* Drop support for atomically getting and setting unaligned data.
* Introduce atomic_get_and_set[64]() which works the same as
atomic_set[64]() used to. atomic_set[64]() does not return the
previous value anymore.


# fd19c7366df2134106131c370c99c3ed7f38757f 30-Apr-2013 Adrien Destugues <pulkomandy@gmail.com>

Fix BAboutWindow lifecycle

BAboutWindow returned false in QuitRequested in order to hide instead of closing.
Not only this keeps a BLooper running for a rarely used window, but it also
prevents quitting an application in the window was not destroyed first.

* Remove aforementioned QuitRequested method,
* Add a static GetWindow method that returns the existing about window, if there
is one, or creates one if there is not. A boolean can be set to tell the caller
what happened,
* Adjust all callers to use that new method, instead of managing the window themselves.


# 5b0cd98792de98b6ef3f40c432f0971ca6a5d405 17-Aug-2012 John Scipione <jscipione@gmail.com>

WIP: Create the about dialog once, hide and show, Quit() when object is destroyed.


# d63b75faf848697b07bfad9b71899e6caf9ab5bc 22-Feb-2012 Philippe Saint-Pierre <stpere@gmail.com>

Outline of labels/strings drawn to desktop

* Rather than duplicating the decision taking logic involving wheter or not to draw
the outline or glow in every replicant, update be_control_look to make it more
generic.
* The Monitoring of the background preferences is now only done in Tracker (where it
was already being done).
* Add a BControlLook::B_IGNORE_OUTLINE flag to avoid this new behaviour.
* Remove that said logic from ActivityMonitor and use be_control_look.
* Use the ignore flag in DeskCalc to avoid the outline in its case.

Should fix #7716, #7291.


# bb7cffd0d19375d3bde01a3628f5a31a0b33aeda 14-Jan-2010 Philippe Saint-Pierre <stpere@gmail.com>

ActivityMonitor (when used as replicant) :

* Use the "Icon Label Outline" setting to improve readability
* It is using the same algorithm as Tracker to outline and glow the text,
and determine the color of the text.

Implements enhancement suggestion #5105.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@35084 a95241bf-73f2-0310-859d-f6bbb57e9c96


# ed1b27536bc03e0a594e114846d84c5b32cb0fb7 07-Apr-2009 Stephan Aßmus <superstippi@gmx.de>

* Some beautification, mostly for when the replicant is embedded on the Desktop.
* Fall back to a shorter legend label when the room is too small (before
truncating).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30001 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 8e26f38727f01b9130d72f2877a7391ddafc06f1 05-Apr-2009 Axel Dörfler <axeld@pinc-software.de>

* 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


# 1bb87bd0b16cfc690abe9a3a492ff8a755f1eced 13-Mar-2009 Axel Dörfler <axeld@pinc-software.de>

* Added a settings window - right now, you can only change the time interval,
though.
* Shortened the time interval defaults to 250 ms; the drawing updates are made
every 500 ms - this still seems to have only little influence on CPU load over
here (YMMV).
* The resolution/scale change is now applied to all views, not just the current.
* Changed the pen size of the chart to 1.5.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@29497 a95241bf-73f2-0310-859d-f6bbb57e9c96


# d421644512b9c7572f8f636f56a5589ab247858c 15-Jul-2008 Axel Dörfler <axeld@pinc-software.de>

* Offloaded the data source retrieval into another thread for more accuracy.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26434 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 51591198d6bef95aae6948b6d2c879c549141648 14-Jul-2008 Axel Dörfler <axeld@pinc-software.de>

* Now use two views when starting (one memory, one CPU usage). The third view
that is added to the window is a networking monitor, all later views default
to CPU usage again.
* DataSources can now share a single adaptive scale, so that they become
comparable in a single view.
* The networking in/out sources are now using this feature.
* DataHistory::ValueAt() now uses binary search to find the right data_item;
this also fixes bug #2140, and makes it possible to change the refresh rate
(which is not yet implemented, though).
* Zooming the timeline now also works by clicking the first mouse button and
dragging the mouse around (instead of only via the scroll wheel, in case you
hadn't noticed yet :-)).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@26409 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 1201d52e6cf4fb8b7bd0a3362cb3c16fa904c037 22-Apr-2008 Axel Dörfler <axeld@pinc-software.de>

* Color drops for the data source color are now only accepted on the colored
box, added a new method _LegendColorFrameAt() that returns that area, and
is also used when drawing it.
* Fixed changing the history background color; it accidently changed the color
of the wrong view. This fixes bug #2115.
* If the history gets too dark, it will now lighten up the scale, instead of
drawing it even darker.
* Changing the color of a data source now immediately redraws the colored box,
too.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25097 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 9c89c45059340c777c79071489172d889e7238d3 19-Apr-2008 Axel Dörfler <axeld@pinc-software.de>

* Allow color drops to change the legend background color only for the
replicant.
* Implemented storing and restoring the color of the data sources.
* Minor style fixes.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25046 a95241bf-73f2-0310-859d-f6bbb57e9c96


# c28f8ea349ddd0e5b6cb9891bbb97f7bc9216965 18-Apr-2008 François Revol <revol@free.fr>

Now reacts to color drops. Tested with Zeta prefs and ArtPaint palette.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25028 a95241bf-73f2-0310-859d-f6bbb57e9c96


# dc1ffc79efc4e89a886c17a1b70ec308b77361d3 18-Apr-2008 François Revol <revol@free.fr>

- fix BeOS build (it's getting nasty)
- add a media node count data source. Yes I do have work to do instead :P


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25022 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 065e8de0d5ffd72d355f2f800b88e8bc12b7c19d 17-Apr-2008 Axel Dörfler <axeld@pinc-software.de>

* Improved layout of the activity views: each view now has separate layout
items for the history and the legend, causing the history parts of all
views to be of equal size if used (which ActivityWindow now does, of course).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25020 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 74158bb474dca9b4236178b7c48224979244c142 17-Apr-2008 François Revol <revol@free.fr>

- introduced a SystemInfoHandler class used to watch for stuff when polling isn't needed.
- used it to add a count of running apps (not exactly the same as teams).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25012 a95241bf-73f2-0310-859d-f6bbb57e9c96


# cbd4bc95732d8effec986f41fd877beec55cf19b 17-Apr-2008 François Revol <revol@free.fr>

Made ActivityMonitor buildable under BeOS (at least BONE).
This is only temporary, to help test adding data sources, so the gross #ifdef __HAIKU__ are intentional to keep BeOS-only code (without layout support) trackable. It is not fully functional but sufficient for testing and will go away later.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25009 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 3a4a214197712d83f79b1f035937ada3d486dbea 13-Apr-2008 Axel Dörfler <axeld@pinc-software.de>

Some more work on the ActivityMonitor:
* Added legend.
* Added network receiving/sending DataSource.
* Now uses the new layout engine.
* Added support for per CPU DataSources, and added a per CPU CPU usage
DataSource.
* The DataSources can now be turned on and off via popup menu.
* You can now add more than one view to the window.
* The DataSources of the ActivityViews are now remembered.
* Now uses an offscreen bitmap to reduce flicker (it should now no longer
flicker with accelerated graphics).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24955 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 18d3e65ebdb42c4a1a7e2963101de48107b930f1 06-Apr-2008 Axel Dörfler <axeld@pinc-software.de>

* The beginnings of an activity monitor application. Very bare and feature-less
right now, but it's already working (and shows that we better compute our
system_info::cached_pages field directly).
* I am not sure if we want to keep this app here, merge it with
ProcessController, or have it as a separate (3rdparty) app. Opinions welcome.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@24846 a95241bf-73f2-0310-859d-f6bbb57e9c96