Commit aacbd758 authored by Alex Cooper's avatar Alex Cooper Committed by Commit Bot

Register mixed_reality_renderloop as a UI Thread

On windows release 1809 (and presumably up), input was not being routed
to the chromium webxr process/threads.  This resulted in polling tracked
controllers and subscriptions to input events never firing or returning
any controllers.  This change has no effect on 1803.

Bug: 953129
Change-Id: Ifdfbd47906b1d5817e791449ac94235e346ea0e0
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1577485
Commit-Queue: Alexander Cooper <alcooper@chromium.org>
Reviewed-by: default avatarBill Orr <billorr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#652913}
parent f5f16014
......@@ -9,6 +9,7 @@
#include "base/macros.h"
#include "base/memory/ptr_util.h"
#include "base/message_loop/message_loop.h"
#include "base/numerics/math_constants.h"
#include "base/threading/thread.h"
#include "build/build_config.h"
......@@ -94,7 +95,11 @@ void MixedRealityDevice::RequestSession(
CreateRenderLoop();
if (!render_loop_->IsRunning()) {
render_loop_->Start();
// We need to start a UI message loop or we will not receive input events
// on 1809 or newer.
base::Thread::Options options;
options.message_loop_type = base::MessageLoop::TYPE_UI;
render_loop_->StartWithOptions(options);
// IsRunning() should be true here unless the thread failed to start (likely
// memory exhaustion). If the thread fails to start, then we fail to create
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment