Use Win32 runtime binding for thread control
This commit is contained in:
@@ -70,6 +70,10 @@ What is already real:
|
|||||||
- `pp_app_core`
|
- `pp_app_core`
|
||||||
|
|
||||||
Latest slice:
|
Latest slice:
|
||||||
|
- `src/platform_windows/windows_runtime_shell.cpp` and
|
||||||
|
`src/platform_windows/windows_lifecycle_shell.cpp` now drive thread
|
||||||
|
start/stop through the explicit Windows runtime binding instead of routing
|
||||||
|
that control through `App::runtime()`.
|
||||||
- `src/platform_windows/windows_platform_services.cpp` no longer brokers the
|
- `src/platform_windows/windows_platform_services.cpp` no longer brokers the
|
||||||
Win32 main-thread queue through `bound_app()->runtime()`; it now uses an
|
Win32 main-thread queue through `bound_app()->runtime()`; it now uses an
|
||||||
explicit Windows runtime binding.
|
explicit Windows runtime binding.
|
||||||
|
|||||||
@@ -78,6 +78,9 @@ Completed, blocked, and superseded task history moved to
|
|||||||
the queue is now ordered by code movement instead.
|
the queue is now ordered by code movement instead.
|
||||||
|
|
||||||
Current slice:
|
Current slice:
|
||||||
|
- `src/platform_windows/windows_runtime_shell.cpp` and
|
||||||
|
`src/platform_windows/windows_lifecycle_shell.cpp` now use the explicit
|
||||||
|
Windows runtime binding for thread start/stop control.
|
||||||
- `src/platform_windows/windows_platform_services.cpp` no longer uses
|
- `src/platform_windows/windows_platform_services.cpp` no longer uses
|
||||||
`bound_app()->runtime()` for main-thread task brokering.
|
`bound_app()->runtime()` for main-thread task brokering.
|
||||||
- `src/platform_windows/windows_runtime_state.*` now carries the active
|
- `src/platform_windows/windows_runtime_state.*` now carries the active
|
||||||
|
|||||||
@@ -7,6 +7,7 @@
|
|||||||
#include "platform_windows/windows_lifecycle_state.h"
|
#include "platform_windows/windows_lifecycle_state.h"
|
||||||
#include "platform_windows/windows_main_window_session.h"
|
#include "platform_windows/windows_main_window_session.h"
|
||||||
#include "platform_windows/windows_runtime_shell.h"
|
#include "platform_windows/windows_runtime_shell.h"
|
||||||
|
#include "platform_windows/windows_runtime_state.h"
|
||||||
#include "platform_windows/windows_stylus_input.h"
|
#include "platform_windows/windows_stylus_input.h"
|
||||||
|
|
||||||
namespace pp::platform::windows {
|
namespace pp::platform::windows {
|
||||||
@@ -19,10 +20,14 @@ void request_window_close(HWND hWnd)
|
|||||||
void handle_window_close_message(VrShellState& vr)
|
void handle_window_close_message(VrShellState& vr)
|
||||||
{
|
{
|
||||||
auto* app = bound_app();
|
auto* app = bound_app();
|
||||||
|
auto* runtime = retained_bound_runtime();
|
||||||
mark_lifecycle_stopped();
|
mark_lifecycle_stopped();
|
||||||
request_stop_and_join_vr_thread(vr);
|
request_stop_and_join_vr_thread(vr);
|
||||||
app->runtime().ui_thread_stop();
|
if (runtime)
|
||||||
app->runtime().render_thread_stop();
|
{
|
||||||
|
runtime->ui_thread_stop();
|
||||||
|
runtime->render_thread_stop();
|
||||||
|
}
|
||||||
app->terminate();
|
app->terminate();
|
||||||
release_bound_app();
|
release_bound_app();
|
||||||
PostQuitMessage(0);
|
PostQuitMessage(0);
|
||||||
|
|||||||
@@ -30,9 +30,11 @@ void register_touch_window(HWND hWnd)
|
|||||||
void initialize_runtime_threads()
|
void initialize_runtime_threads()
|
||||||
{
|
{
|
||||||
auto* app = bound_app();
|
auto* app = bound_app();
|
||||||
|
auto* runtime = retained_bound_runtime();
|
||||||
|
assert(runtime);
|
||||||
mark_lifecycle_running();
|
mark_lifecycle_running();
|
||||||
app->runtime().render_thread_start(*app);
|
runtime->render_thread_start(*app);
|
||||||
app->runtime().ui_thread_start(*app);
|
runtime->ui_thread_start(*app);
|
||||||
}
|
}
|
||||||
|
|
||||||
void install_debug_gl_callbacks()
|
void install_debug_gl_callbacks()
|
||||||
|
|||||||
Reference in New Issue
Block a user