summaryrefslogtreecommitdiff
path: root/chromium/device/vr/openxr/openxr_device.cc
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2020-10-12 14:27:29 +0200
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2020-10-13 09:35:20 +0000
commitc30a6232df03e1efbd9f3b226777b07e087a1122 (patch)
treee992f45784689f373bcc38d1b79a239ebe17ee23 /chromium/device/vr/openxr/openxr_device.cc
parent7b5b123ac58f58ffde0f4f6e488bcd09aa4decd3 (diff)
downloadqtwebengine-chromium-85-based.tar.gz
BASELINE: Update Chromium to 85.0.4183.14085-based
Change-Id: Iaa42f4680837c57725b1344f108c0196741f6057 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'chromium/device/vr/openxr/openxr_device.cc')
-rw-r--r--chromium/device/vr/openxr/openxr_device.cc13
1 files changed, 11 insertions, 2 deletions
diff --git a/chromium/device/vr/openxr/openxr_device.cc b/chromium/device/vr/openxr/openxr_device.cc
index 2b7a8cf0fc9..7e2c2cc0315 100644
--- a/chromium/device/vr/openxr/openxr_device.cc
+++ b/chromium/device/vr/openxr/openxr_device.cc
@@ -7,8 +7,10 @@
#include <string>
#include "base/bind_helpers.h"
+#include "build/build_config.h"
#include "device/vr/openxr/openxr_api_wrapper.h"
#include "device/vr/openxr/openxr_render_loop.h"
+#include "device/vr/openxr/openxr_statics.h"
#include "device/vr/util/transform_utils.h"
#include "mojo/public/cpp/bindings/pending_remote.h"
@@ -53,10 +55,17 @@ mojom::VRDisplayInfoPtr CreateFakeVRDisplayInfo(device::mojom::XRDeviceId id) {
} // namespace
-OpenXrDevice::OpenXrDevice()
+// OpenXrDevice must not take ownership of the OpenXrStatics passed in.
+// The OpenXrStatics object is owned by IsolatedXRRuntimeProvider.
+OpenXrDevice::OpenXrDevice(OpenXrStatics* openxr_statics)
: VRDeviceBase(device::mojom::XRDeviceId::OPENXR_DEVICE_ID),
weak_ptr_factory_(this) {
- SetVRDisplayInfo(CreateFakeVRDisplayInfo(GetId()));
+ mojom::VRDisplayInfoPtr display_info = CreateFakeVRDisplayInfo(GetId());
+ SetVRDisplayInfo(std::move(display_info));
+
+#if defined(OS_WIN)
+ SetLuid(openxr_statics->GetLuid());
+#endif
}
OpenXrDevice::~OpenXrDevice() {