History log of /haiku/headers/private/screen_saver/ScreenSaverRunner.h
Revision Date Author Comments
# 1c776bfe 15-Nov-2013 John Scipione <jscipione@gmail.com>

Lock screensaver window directly

By passing the window pointer to ScreenSaverRunner contructor and using that
to lock the window when drawing instead of getting the window from the
Window() method of the view. This is safer.


# d34a680c 14-Nov-2013 John Scipione <jscipione@gmail.com>

Screen Saver: fix race condition

Start the screensaver in the window thread instead of the runner
thread so that there is no lock contention for the window lock in
the runner thread when the saver starts.

The view that gets drawn into is assumed to have been prepared before
being passed to the runner thread, and this assumption has been made
true for the screensaver preview and screen_blanker apps.

Eliminate fHasStarted and the corresponding HasStarted() method in
ScreenSaverRunner as they are no longer needed.

Drawing still happens in the runner thread, and still needs to lock
the window thread potentially causing contention, yet, there
is a timeout here so the contention won't freeze the screensaver window,
only delay drawing the screensaver.

Drawing could be moved to the window thread via message passing to avoid
lock contention with the window but this would defeat a big part of the
purpose of having a separate rendering thread.

This fixes #10125 and #4260


# 5d023095 14-Nov-2013 John Scipione <jscipione@gmail.com>

ScreenSaverRunner: Suspend() and Resume() return status_t


# e22c01af 14-Nov-2013 John Scipione <jscipione@gmail.com>

Screen Saver: style fixes


# d9acbaf0 02-Sep-2013 John Scipione <jscipione@gmail.com>

ScreenSaver: Timeout if window won't lock. Fixes #4260.

If we fail to lock the window in the kInitialTickRate time, quit the thread.
We were deadlocking causing #4260 because you could open several
threads by moving through the screen saver list quickly all trying to lock
the same window at the same time, classic deadlock.


# fa365178 02-Sep-2013 John Scipione <jscipione@gmail.com>

ScreenSaverRunner: Style fixes

Also update copyright info, add myself to authors list alphabetically.


# 7d183c04 01-Oct-2009 Ryan Leavengood <leavengood@gmail.com>

Adding a private header with a method that can be used to provide a consistent
default look for the settings of screen savers without complicated settings
views. This is based on the code originally in the ScreenSaver preferences
window.

Also fixed a type in the ScreenSaverRunner header.


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


# 41158aaf 06-Jun-2006 Axel Dörfler <axeld@pinc-software.de>

* Renamed the ScreenSaverPrefs class to the more Be-like ScreenSaverSettings.
* Minor cleanup.


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


# 7cae4a1e 06-Jun-2006 Axel Dörfler <axeld@pinc-software.de>

* Big time cleanup of the screen saver stuff, not yet finished yet, though.
Renamed lots of things, like ScreenSaverThread to ScreenSaverRunner,
refactored code, etc. Much cleaner interfaces and code.
* Fixed a couple of bugs and in the add-on handling, especially some settings
related bugs (ie. testing a screen saver will now use its latest settings,
etc.).
* Correctly implemented DPMS support in ScreenSaverPrefs and the ScreenSaver
preferences application - screen_blanker still ignores them, though.
* It's not yet font sensitive either.
* Changed the input_server add-on to not switch to the screen blanker immediately
when it's in the "blank corner" - doesn't seem to work yet, though (only tested
under Qemu).
* Correctly implemented the "preview" function (before, a screen saver would
never know it rendered a preview).
* Evaluates the return value of BScreenSaver::StartSaver().
* The screen saver thread is no longer killed without notice - it's now
always shut down properly.
* Made the code more robust against failure.
* Introduced some new bugs as well (the screen saver list view doesn't jump to
the selection anymore, for some reason), those will be fixed later (as the
remaining issues).
* Probably some more I forgot about.


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


# 1c776bfe37a7c1a382f9720112f19de00c7cff07 15-Nov-2013 John Scipione <jscipione@gmail.com>

Lock screensaver window directly

By passing the window pointer to ScreenSaverRunner contructor and using that
to lock the window when drawing instead of getting the window from the
Window() method of the view. This is safer.


# d34a680c043c72bae01662cc730ca81cb4cd2615 14-Nov-2013 John Scipione <jscipione@gmail.com>

Screen Saver: fix race condition

Start the screensaver in the window thread instead of the runner
thread so that there is no lock contention for the window lock in
the runner thread when the saver starts.

The view that gets drawn into is assumed to have been prepared before
being passed to the runner thread, and this assumption has been made
true for the screensaver preview and screen_blanker apps.

Eliminate fHasStarted and the corresponding HasStarted() method in
ScreenSaverRunner as they are no longer needed.

Drawing still happens in the runner thread, and still needs to lock
the window thread potentially causing contention, yet, there
is a timeout here so the contention won't freeze the screensaver window,
only delay drawing the screensaver.

Drawing could be moved to the window thread via message passing to avoid
lock contention with the window but this would defeat a big part of the
purpose of having a separate rendering thread.

This fixes #10125 and #4260


# 5d023095c25384b1c8333c8b516a44d985f0abe6 14-Nov-2013 John Scipione <jscipione@gmail.com>

ScreenSaverRunner: Suspend() and Resume() return status_t


# e22c01af030d33e53e6bbde56e331dd8cd7de097 14-Nov-2013 John Scipione <jscipione@gmail.com>

Screen Saver: style fixes


# d9acbaf0dc65137e36e15b351c4ff7a56aca55b1 02-Sep-2013 John Scipione <jscipione@gmail.com>

ScreenSaver: Timeout if window won't lock. Fixes #4260.

If we fail to lock the window in the kInitialTickRate time, quit the thread.
We were deadlocking causing #4260 because you could open several
threads by moving through the screen saver list quickly all trying to lock
the same window at the same time, classic deadlock.


# fa3651781a7d9c61eb1fb7608e5a37ea87c25d04 02-Sep-2013 John Scipione <jscipione@gmail.com>

ScreenSaverRunner: Style fixes

Also update copyright info, add myself to authors list alphabetically.


# 7d183c04921e41b09c56f1462afee114e752bfa2 01-Oct-2009 Ryan Leavengood <leavengood@gmail.com>

Adding a private header with a method that can be used to provide a consistent
default look for the settings of screen savers without complicated settings
views. This is based on the code originally in the ScreenSaver preferences
window.

Also fixed a type in the ScreenSaverRunner header.


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


# 41158aaf918229a36e911666a32573bb633196ea 06-Jun-2006 Axel Dörfler <axeld@pinc-software.de>

* Renamed the ScreenSaverPrefs class to the more Be-like ScreenSaverSettings.
* Minor cleanup.


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


# 7cae4a1ee0a7e8f1214e6fa410efe9f5a0c7cecb 06-Jun-2006 Axel Dörfler <axeld@pinc-software.de>

* Big time cleanup of the screen saver stuff, not yet finished yet, though.
Renamed lots of things, like ScreenSaverThread to ScreenSaverRunner,
refactored code, etc. Much cleaner interfaces and code.
* Fixed a couple of bugs and in the add-on handling, especially some settings
related bugs (ie. testing a screen saver will now use its latest settings,
etc.).
* Correctly implemented DPMS support in ScreenSaverPrefs and the ScreenSaver
preferences application - screen_blanker still ignores them, though.
* It's not yet font sensitive either.
* Changed the input_server add-on to not switch to the screen blanker immediately
when it's in the "blank corner" - doesn't seem to work yet, though (only tested
under Qemu).
* Correctly implemented the "preview" function (before, a screen saver would
never know it rendered a preview).
* Evaluates the return value of BScreenSaver::StartSaver().
* The screen saver thread is no longer killed without notice - it's now
always shut down properly.
* Made the code more robust against failure.
* Introduced some new bugs as well (the screen saver list view doesn't jump to
the selection anymore, for some reason), those will be fixed later (as the
remaining issues).
* Probably some more I forgot about.


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