haiku/headers/private/screen_saver
John Scipione d34a680c04 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
2013-11-14 23:30:26 -05:00
..
BuildScreenSaverDefaultSettingsView.h
ScreenSaverRunner.h Screen Saver: fix race condition 2013-11-14 23:30:26 -05:00
ScreenSaverSettings.h