Commit Graph

481 Commits

Author SHA1 Message Date
Daosheng Mu
f5d35b145f Bug 1516554 - Part 4: Fix Win 7 try fails when VR process enable but no GPU process. r=kip
Differential Revision: https://phabricator.services.mozilla.com/D16258

--HG--
extra : moz-landing-system : lando
2019-01-11 22:49:20 +00:00
Daosheng Mu
2d64883f5c Bug 1516554 - Part 3: Fix VRGPUParent memory leak in the destructor. r=kip
Differential Revision: https://phabricator.services.mozilla.com/D16257

--HG--
extra : moz-landing-system : lando
2019-01-14 21:58:51 +00:00
Daosheng Mu
17dec4ca9f Bug 1516554 - Part 2: Fix nsTSubstring assertion when looking for Oculus VR lib. r=kip
Differential Revision: https://phabricator.services.mozilla.com/D16483

--HG--
extra : moz-landing-system : lando
2019-01-14 21:27:40 +00:00
thomasmo
b16b2cbba6 Bug 1474034 - Use consistent prefixes for POD struct members in gfx/vr/external_api/moz_external_vr.h r=kip
This change updates the structs VRDisplayState, VRLayer_2D_Content, and VRLayer_Stereo_Immersive to not have 'm' prefix for its members.

Differential Revision: https://phabricator.services.mozilla.com/D16000

--HG--
extra : moz-landing-system : lando
2019-01-09 21:57:36 +00:00
Ehsan Akhgari
e5e885ae31 Bug 1521000 - Part 2: Adjust our clang-format rules to include spaces after the hash for nested preprocessor directives r=sylvestre
# ignore-this-changeset

--HG--
extra : amend_source : 7221c8d15a765df71171099468e7c7faa648f37c
extra : histedit_source : a0cce6015636202bff09e35a13f72e03257a7695
2019-01-18 10:16:18 +01:00
Ehsan Akhgari
06c3d29113 Bug 1521000 - Part 1: Reformat the tree to ensure everything is formatted correctly with clang-format r=sylvestre
Summary: # ignore-this-changeset

Reviewers: sylvestre

Reviewed By: sylvestre

Subscribers: reviewbot, emilio, jandem, bbouvier, karlt, jya

Bug #: 1521000

Differential Revision: https://phabricator.services.mozilla.com/D16936

--HG--
extra : histedit_source : 4add583bfa729ccc1aef934629ed45ff095189b0
2019-01-18 10:12:56 +01:00
Kearwood "Kip" Gilbert
fe5199bf8c Bug 1460619 - Do not run frame request callbacks immediately after updating a VR layer
--HG--
extra : rebase_source : 7f3a7f0da3a64a3b2b580bf2a7b48d67530fdcb4
2019-01-02 13:32:09 -08:00
Ciure Andrei
7a748ae68f Merge mozilla-central to autoland. a=merge CLOSED TREE 2019-01-04 01:03:06 +02:00
Daosheng Mu
2406b85da6 Bug 1430040 - Part 4: Make the parent process keep the OpenVR controller manifest info when VR process is enabled. r=kip
Differential Revision: https://phabricator.services.mozilla.com/D15419

--HG--
extra : moz-landing-system : lando
2018-12-28 22:09:44 +00:00
Daosheng Mu
a5651d4c31 Bug 1430040 - Part 3: Closing Shmem only when VR process is shutdown. r=kip
Differential Revision: https://phabricator.services.mozilla.com/D15418

--HG--
extra : moz-landing-system : lando
2018-12-28 22:38:14 +00:00
Daosheng Mu
8c4a82ad4b Bug 1430040 - Part 2: According to VRDisplay's state to decide if spawn or shutdown VR process in VRManager. r=kip
Differential Revision: https://phabricator.services.mozilla.com/D15164

--HG--
extra : moz-landing-system : lando
2018-12-28 22:05:03 +00:00
Daosheng Mu
4749a36cf5 Bug 1430040 - Part 1: Adjust VR process IPC channels to allow VR process to be spawned and shutdown at runtime. r=kip,mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D15163

--HG--
extra : moz-landing-system : lando
2019-01-03 20:28:52 +00:00
Daosheng Mu
5d300fd8ad Bug 1514192 - Fixing Oculus Touch touch events error. r=kip
Differential Revision: https://phabricator.services.mozilla.com/D15589

--HG--
extra : moz-landing-system : lando
2019-01-02 19:52:43 +00:00
Emilio Cobos Álvarez
d2ed260822 Bug 1517241 - Rename nsIDocument to mozilla::dom::Document. r=smaug
Summary: Really sorry for the size of the patch. It's mostly automatic
s/nsIDocument/Document/ but I had to fix up in a bunch of places manually to
add the right namespacing and such.

Overall it's not a very interesting patch I think.

nsDocument.cpp turns into Document.cpp, nsIDocument.h into Document.h and
nsIDocumentInlines.h into DocumentInlines.h.

I also changed a bunch of nsCOMPtr usage to RefPtr, but not all of it.

While fixing up some of the bits I also removed some unneeded OwnerDoc() null
checks and such, but I didn't do anything riskier than that.
2019-01-03 17:48:33 +01:00
Sylvestre Ledru
cccdda3c2a Bug 1516555 - Reformat everything to the Google coding style r=Ehsan
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D15426

--HG--
extra : moz-landing-system : lando
2018-12-28 15:48:06 +00:00
Daosheng Mu
e628a129fd Bug 1515002 - Avoid OpenVR controllerInfo and manifest files be instanced in global to make a lot of static constructors. r=kip
Differential Revision: https://phabricator.services.mozilla.com/D15004

--HG--
extra : moz-landing-system : lando
2018-12-21 00:52:24 +00:00
thomasmo
32f32b7a86 Bug 1508225 - Change return type of VRDisplayExternal::GetSensorState to a reference r=kip,dmajor
This change fixes a compiler warning, where a VRSensorState object is returned on the stack as a rather large object.
To address this warning, the return type of VRDisplayExternal::GetSensorState now returns a const reference to the member. The rest of the change are updates to uphold the new constness.

Differential Revision: https://phabricator.services.mozilla.com/D13586

--HG--
extra : moz-landing-system : lando
2018-12-18 19:39:44 +00:00
Daosheng Mu
f059c66d62 Bug 1496615 - Part 4: Make OpenVR use action-based input API. r=kip
Differential Revision: https://phabricator.services.mozilla.com/D14635

--HG--
extra : moz-landing-system : lando
2018-12-17 20:46:40 +00:00
Daosheng Mu
533d248449 Bug 1496615 - Part 2: Add controller action binding files. r=kip
Differential Revision: https://phabricator.services.mozilla.com/D14633

--HG--
extra : moz-landing-system : lando
2018-12-17 20:38:09 +00:00
Daosheng Mu
35f06c3565 Bug 1496615 - Part 1: update openvr to 1.0.17. r=kip
Differential Revision: https://phabricator.services.mozilla.com/D14631

--HG--
extra : moz-landing-system : lando
2018-12-17 20:36:28 +00:00
Jan Andre Ikenmeyer [:darkspirit]
318c8c660e Bug 1477037 - Add NULL check on aArgv. r=froydnj 2018-12-01 02:08:42 +01:00
Sylvestre Ledru
265e672179 Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
# ignore-this-changeset

--HG--
extra : amend_source : 4d301d3b0b8711c4692392aa76088ba7fd7d1022
2018-11-30 11:46:48 +01:00
Coroiu Cristina
b8bc09a5b5 Merge mozilla-central to inbound a=merge on a CLOSED TREE
--HG--
rename : python/mozrelease/test/data/Firefox-62.0b11.update.json => python/mozrelease/test/data/Firefox-64.0b13.update.json
extra : rebase_source : 6eb078869182f40343e201993c0d0442ed96ad46
2018-11-29 00:34:07 +02:00
Ehsan Akhgari
ca162bee20 Bug 1508472 - Part 4: Fourth batch of comment fix-ups in preparation for the tree reformat r=sylvestre
This is a best effort attempt at ensuring that the adverse impact of
reformatting the entire tree over the comments would be minimal.  I've used a
combination of strategies including disabling of formatting, some manual
formatting and some changes to formatting to work around some clang-format
limitations.

Differential Revision: https://phabricator.services.mozilla.com/D13193

--HG--
extra : moz-landing-system : lando
2018-11-28 09:16:55 +00:00
Nika Layzell
568787b95f Bug 1448426 - Wrap windows.h to avoid problematic define statements, r=froydnj,glandium
By default, windows.h exposes a large number of problematic define statements
which are UpperCamelCase, such as a define from `CreateWindow` to
`CreateWindow{A,W}`.

As many of these names are generic (e.g. CreateFile, CreateWindow), they can
mess up Gecko code that may legitimately have its own methods with the same
names.

The header also defines some traditional SCREAMING_SNAKE_CASE defines which
can mess up our code by conflicting with local values.

This patch adds a simple code generator which generates wrappers for these
defines, and uses them to wrap the windows.h wrapper using the `stl_wrappers`
mechanism, allowing us to use windows.h in more places.

Differential Revision: https://phabricator.services.mozilla.com/D10932
2018-11-28 12:56:20 -05:00
arthur.iakab
af07f9b9d4 Backed out 13 changesets (bug 1500948, bug 1509362, bug 1509591, bug 1448426, bug 1500949, bug 1487249, bug 1509930, bug 1500950, bug 1500944) for causing crashes and assertion failures on PBackgroundParent.cpp:696 CLOSED TREE
Backed out changeset c3fe435e473a (bug 1509362)
Backed out changeset 6494840edc17 (bug 1509591)
Backed out changeset 123b5d5a3637 (bug 1509591)
Backed out changeset bce195f98895 (bug 1509930)
Backed out changeset 66db13126408 (bug 1500950)
Backed out changeset 3b5fffae2d2b (bug 1500949)
Backed out changeset 71c3b3677db8 (bug 1500948)
Backed out changeset 784b3b56e2ab (bug 1500944)
Backed out changeset 0bad27401ddb (bug 1500944)
Backed out changeset e0f95dd96d54 (bug 1448426)
Backed out changeset c60fa11538db (bug 1487249)
Backed out changeset 0190d4ffa54f (bug 1487249)
Backed out changeset 3cd10aba9130 (bug 1487249)
2018-11-28 02:57:32 +02:00
Nika Layzell
6bda5576a0 Bug 1509591 - Part 2: Remove now-unnecessary mIPCOpen variable, r=mccr8
This should eliminate most variables which can be replaced with IPCOpen().

Differential Revision: https://phabricator.services.mozilla.com/D12957
2018-11-27 18:09:51 -05:00
Nika Layzell
9f648dce32 Bug 1448426 - Wrap windows.h to avoid problematic define statements, r=froydnj,glandium
By default, windows.h exposes a large number of problematic define statements
which are UpperCamelCase, such as a define from `CreateWindow` to
`CreateWindow{A,W}`.

As many of these names are generic (e.g. CreateFile, CreateWindow), they can
mess up Gecko code that may legitimately have its own methods with the same
names.

The header also defines some traditional SCREAMING_SNAKE_CASE defines which
can mess up our code by conflicting with local values.

This patch adds a simple code generator which generates wrappers for these
defines, and uses them to wrap the windows.h wrapper using the `stl_wrappers`
mechanism, allowing us to use windows.h in more places.

Differential Revision: https://phabricator.services.mozilla.com/D10932
2018-11-27 18:09:33 -05:00
Daosheng Mu
764c6b0bd8 Bug 1498625 - Part 1: Move VRHapticThread start/end to the main thread. r=kip,froydnj
Differential Revision: https://phabricator.services.mozilla.com/D10642

--HG--
extra : moz-landing-system : lando
2018-11-02 21:54:12 +00:00
Daosheng Mu
3ae40f5ada Bug 1502527 - Keeping VR managers alive even though no focused VR windows. r=kip
Differential Revision: https://phabricator.services.mozilla.com/D9964

--HG--
extra : moz-landing-system : lando
2018-10-26 23:17:52 +00:00
Daosheng Mu
09b5ef8f66 Bug 1501869 - Part 2: Stop calling VR tasks when they are at background. r=kip
Differential Revision: https://phabricator.services.mozilla.com/D9880

--HG--
extra : moz-landing-system : lando
2018-10-28 22:49:15 +00:00
Daosheng Mu
4db1e662d5 Bug 1501869 - Part 1: Refine the mechanism for VR tasks. r=kip
Differential Revision: https://phabricator.services.mozilla.com/D9879

--HG--
extra : moz-landing-system : lando
2018-10-28 22:47:58 +00:00
Cosmin Sabou
fbde123ca1 Backed out 2 changesets (bug 1501869) for causing wpt failures on webvr-enabled-by-feature-policy-attribute-redirect-on-load
Backed out changeset 56896b0e10d3 (bug 1501869)
Backed out changeset cdb87cbfe882 (bug 1501869)
2018-10-27 00:51:10 +03:00
Daosheng Mu
c3b4427b6c Bug 1501869 - Part 2: Stop calling VR tasks when they are at background. r=kip
Differential Revision: https://phabricator.services.mozilla.com/D9880

--HG--
extra : moz-landing-system : lando
2018-10-26 17:26:32 +00:00
Daosheng Mu
2852126050 Bug 1501869 - Part 1: Refine the mechanism for VR tasks. r=kip
Differential Revision: https://phabricator.services.mozilla.com/D9879

--HG--
extra : moz-landing-system : lando
2018-10-26 17:23:13 +00:00
Daosheng Mu
14f9503ffe Bug 1481683 - Change gfx/vr/service and gfxvrExternal CRLF line break types to LF. r=kip
MozReview-Commit-ID: 4mFBUls14e7

Differential Revision: https://phabricator.services.mozilla.com/D8785

--HG--
extra : moz-landing-system : lando
2018-10-25 21:33:25 +00:00
Kearwood "Kip" Gilbert
b3309c2776 Bug 1501455 - Remove gfx/vr/gfxVROculus.cpp and gfx/vr/gfxVROpenVR.cpp r=daoshengmu
Now that the VRService thread is enabled by default, we
can remove these old files.

The OpenVR 3rd party code has been moved from gfx/vr/openvr
to gfx/vr/service/openvr to be closer to the OpenVRSession
implementation.

The Oculus header (ovr_capi_dynamic.h) has been moved from
gfx/vr/ovr_capi_dynamic.h to gfx/vr/service/oculus to be
closer to the OculusSession implementation.

Differential Revision: https://phabricator.services.mozilla.com/D9600

--HG--
rename : gfx/vr/ovr_capi_dynamic.h => gfx/vr/service/oculus/ovr_capi_dynamic.h
rename : gfx/vr/openvr/LICENSE => gfx/vr/service/openvr/LICENSE
rename : gfx/vr/openvr/README.md => gfx/vr/service/openvr/README.md
rename : gfx/vr/openvr/README.mozilla => gfx/vr/service/openvr/README.mozilla
rename : gfx/vr/openvr/headers/openvr.h => gfx/vr/service/openvr/headers/openvr.h
rename : gfx/vr/openvr/moz.build => gfx/vr/service/openvr/moz.build
rename : gfx/vr/openvr/src/README => gfx/vr/service/openvr/src/README
rename : gfx/vr/openvr/src/dirtools_public.cpp => gfx/vr/service/openvr/src/dirtools_public.cpp
rename : gfx/vr/openvr/src/dirtools_public.h => gfx/vr/service/openvr/src/dirtools_public.h
rename : gfx/vr/openvr/src/envvartools_public.cpp => gfx/vr/service/openvr/src/envvartools_public.cpp
rename : gfx/vr/openvr/src/envvartools_public.h => gfx/vr/service/openvr/src/envvartools_public.h
rename : gfx/vr/openvr/src/hmderrors_public.cpp => gfx/vr/service/openvr/src/hmderrors_public.cpp
rename : gfx/vr/openvr/src/hmderrors_public.h => gfx/vr/service/openvr/src/hmderrors_public.h
rename : gfx/vr/openvr/src/ivrclientcore.h => gfx/vr/service/openvr/src/ivrclientcore.h
rename : gfx/vr/openvr/src/openvr_api_public.cpp => gfx/vr/service/openvr/src/openvr_api_public.cpp
rename : gfx/vr/openvr/src/pathtools_public.cpp => gfx/vr/service/openvr/src/pathtools_public.cpp
rename : gfx/vr/openvr/src/pathtools_public.h => gfx/vr/service/openvr/src/pathtools_public.h
rename : gfx/vr/openvr/src/sharedlibtools_public.cpp => gfx/vr/service/openvr/src/sharedlibtools_public.cpp
rename : gfx/vr/openvr/src/sharedlibtools_public.h => gfx/vr/service/openvr/src/sharedlibtools_public.h
rename : gfx/vr/openvr/src/strtools_public.cpp => gfx/vr/service/openvr/src/strtools_public.cpp
rename : gfx/vr/openvr/src/strtools_public.h => gfx/vr/service/openvr/src/strtools_public.h
rename : gfx/vr/openvr/src/vrpathregistry_public.cpp => gfx/vr/service/openvr/src/vrpathregistry_public.cpp
rename : gfx/vr/openvr/src/vrpathregistry_public.h => gfx/vr/service/openvr/src/vrpathregistry_public.h
extra : moz-landing-system : lando
2018-10-24 22:22:41 +00:00
Daosheng Mu
56c58b6d06 Bug 1497787 - MacIOSurface should only be access at VRSession thread. r=kip
MozReview-Commit-ID: FmWOuctM3yH

Differential Revision: https://phabricator.services.mozilla.com/D8185

--HG--
extra : moz-landing-system : lando
2018-10-12 21:54:09 +00:00
Kearwood "Kip" Gilbert
06f22ca88b Bug 1466700 - Refactor gfxVROculus.cpp to use gfxVRExternal interface, r=daoshengmu
Tags: #secure-revision

Bug #: 1466700

Differential Revision: https://phabricator.services.mozilla.com/D8177
2018-07-13 17:16:35 -07:00
Daniel Varga
d51fae3043 Backed out changeset f536c1abf26e (bug 1466700) for causing build bustage at /build/build/src/gfx/vr/service/OculusSession.cpp
--HG--
extra : rebase_source : 1a2e33bbba56a6abc9806624b9944a1f1b4d81e2
2018-10-12 22:29:20 +03:00
Kearwood "Kip" Gilbert
382df23968 Bug 1466700 - Refactor gfxVROculus.cpp to use gfxVRExternal interface, r=daoshengmu
Tags: #secure-revision

Bug #: 1466700

Differential Revision: https://phabricator.services.mozilla.com/D8177
2018-07-13 17:16:35 -07:00
Jan Beich
b92dd020ad Bug 1497379 - Don't disable OSVR along with OpenVR on BSDs. r=kip 2018-10-08 22:41:00 -04:00
Kearwood Gilbert
7a3eb1a6a2 Bug 1494556 - Remove VRListenerThread r=daoshengmu
We are refactoring much of the code in gfx/vr, moving
most of the code that runs in the VRListenerThread into
it's own process.  The remaining code will be non-blocking
once this refactoring is complete.

In order to resolve some shutdown crashes, it is simpler
to remove the VRListenerThread and the related code
starting and stopping this thread.  If this is done
prior to completion of the refactoring for Bug 1473399
(Enable VRService thread by default), there would be a
regression in responsiveness during detection of VR
hardware due to blocking API calls moving off the thread.

Differential Revision: https://phabricator.services.mozilla.com/D7227

--HG--
extra : moz-landing-system : lando
2018-10-02 21:17:05 +00:00
Kearwood Gilbert
ce372ea306 Bug 1466701 - Refactor gfxVROSVR.cpp to use gfxVRExternal interface r=daoshengmu
Differential Revision: https://phabricator.services.mozilla.com/D7352

--HG--
rename : gfx/vr/osvr/ClientKit/ClientKitC.h => gfx/vr/service/osvr/ClientKit/ClientKitC.h
rename : gfx/vr/osvr/ClientKit/ContextC.h => gfx/vr/service/osvr/ClientKit/ContextC.h
rename : gfx/vr/osvr/ClientKit/DisplayC.h => gfx/vr/service/osvr/ClientKit/DisplayC.h
rename : gfx/vr/osvr/ClientKit/Export.h => gfx/vr/service/osvr/ClientKit/Export.h
rename : gfx/vr/osvr/ClientKit/InterfaceC.h => gfx/vr/service/osvr/ClientKit/InterfaceC.h
rename : gfx/vr/osvr/ClientKit/InterfaceCallbackC.h => gfx/vr/service/osvr/ClientKit/InterfaceCallbackC.h
rename : gfx/vr/osvr/ClientKit/InterfaceStateC.h => gfx/vr/service/osvr/ClientKit/InterfaceStateC.h
rename : gfx/vr/osvr/ClientKit/SystemCallbackC.h => gfx/vr/service/osvr/ClientKit/SystemCallbackC.h
rename : gfx/vr/osvr/ClientKit/TransformsC.h => gfx/vr/service/osvr/ClientKit/TransformsC.h
rename : gfx/vr/osvr/Util/APIBaseC.h => gfx/vr/service/osvr/Util/APIBaseC.h
rename : gfx/vr/osvr/Util/AnnotationMacrosC.h => gfx/vr/service/osvr/Util/AnnotationMacrosC.h
rename : gfx/vr/osvr/Util/BoolC.h => gfx/vr/service/osvr/Util/BoolC.h
rename : gfx/vr/osvr/Util/ChannelCountC.h => gfx/vr/service/osvr/Util/ChannelCountC.h
rename : gfx/vr/osvr/Util/ClientCallbackTypesC.h => gfx/vr/service/osvr/Util/ClientCallbackTypesC.h
rename : gfx/vr/osvr/Util/ClientOpaqueTypesC.h => gfx/vr/service/osvr/Util/ClientOpaqueTypesC.h
rename : gfx/vr/osvr/Util/ClientReportTypesC.h => gfx/vr/service/osvr/Util/ClientReportTypesC.h
rename : gfx/vr/osvr/Util/Export.h => gfx/vr/service/osvr/Util/Export.h
rename : gfx/vr/osvr/Util/ImagingReportTypesC.h => gfx/vr/service/osvr/Util/ImagingReportTypesC.h
rename : gfx/vr/osvr/Util/MatrixConventionsC.h => gfx/vr/service/osvr/Util/MatrixConventionsC.h
rename : gfx/vr/osvr/Util/PlatformConfig.h => gfx/vr/service/osvr/Util/PlatformConfig.h
rename : gfx/vr/osvr/Util/Pose3C.h => gfx/vr/service/osvr/Util/Pose3C.h
rename : gfx/vr/osvr/Util/QuaternionC.h => gfx/vr/service/osvr/Util/QuaternionC.h
rename : gfx/vr/osvr/Util/QuatlibInteropC.h => gfx/vr/service/osvr/Util/QuatlibInteropC.h
rename : gfx/vr/osvr/Util/RadialDistortionParametersC.h => gfx/vr/service/osvr/Util/RadialDistortionParametersC.h
rename : gfx/vr/osvr/Util/RenderingTypesC.h => gfx/vr/service/osvr/Util/RenderingTypesC.h
rename : gfx/vr/osvr/Util/ReturnCodesC.h => gfx/vr/service/osvr/Util/ReturnCodesC.h
rename : gfx/vr/osvr/Util/StdInt.h => gfx/vr/service/osvr/Util/StdInt.h
rename : gfx/vr/osvr/Util/TimeValueC.h => gfx/vr/service/osvr/Util/TimeValueC.h
rename : gfx/vr/osvr/Util/Vec2C.h => gfx/vr/service/osvr/Util/Vec2C.h
rename : gfx/vr/osvr/Util/Vec3C.h => gfx/vr/service/osvr/Util/Vec3C.h
extra : moz-landing-system : lando
2018-10-02 00:24:40 +00:00
Daosheng Mu
4254b0cddc Bug 1491868 - Avoid shutdown hang by checking if VRListenerThread is null. r=kip
MozReview-Commit-ID: HbWlMUQGXD8

Differential Revision: https://phabricator.services.mozilla.com/D7220

--HG--
extra : moz-landing-system : lando
2018-10-01 21:36:23 +00:00
Imanol Fernandez
34b84d783f Bug 1495421 - Fix gfxVRExtenal::StartPresentation value reset on Android r=kip
WebVR broke in Firefox Reality after https://phabricator.services.mozilla.com/D3378 landed because deleting the watchdog block also deleted some value resets in the Android #ifdef

Differential Revision: https://phabricator.services.mozilla.com/D7282

--HG--
extra : moz-landing-system : lando
2018-10-01 17:33:04 +00:00
Kearwood "Kip" Gilbert
6f7ee781b6 Bug 1494490 - Early exit VRManager::RunTasks when not on the VR Listener thread r=daoshengmu
During shutdown, VRManager::RunTasks may be run outside
of the VR Listener thread due to residual nsTimer events.
This results in intermittent assertions during shutdown
when the assert is hit.
We do not need to run these periodic tasks during shutdown
so we can simply early-exit here.

Differential Revision: https://phabricator.services.mozilla.com/D7022

--HG--
extra : moz-landing-system : lando
2018-09-27 05:20:53 +00:00
Kearwood "Kip" Gilbert
4bbd4a30cf Bug 1473398 - Add telemetry support to gfxVRExternal and OpenVRSession r=daoshengmu
Differential Revision: https://phabricator.services.mozilla.com/D7014

--HG--
extra : moz-landing-system : lando
2018-09-27 21:56:20 +00:00
Kris Maglione
8451acf329 Bug 1494513: Work around VRThread shutdown bug causing frequent intermittent failures. r=erahm
Differential Revision: https://phabricator.services.mozilla.com/D7134

--HG--
extra : moz-landing-system : lando
2018-09-27 20:28:31 +00:00
Emilio Cobos Álvarez
7b4dcb8ab8 Bug 1488573 - Fix merge conflict with inbound. r=me a=ebalazs
The patch in this bug conflicted with:

  1679bd50f3
2018-09-26 15:58:11 +02:00
arthur.iakab
ec46826255 Merge inbound to mozilla-central. a=merge 2018-09-26 15:54:41 +03:00
Jeff Gilbert
d53fb0f64f No bug - Fix compiler warnings from clang-cl. 2018-09-25 18:29:13 -07:00
Kearwood "Kip" Gilbert
f65dbeca74 Bug 1473397 - Implement haptic feedback support for gfxVRExternal and OpenVRSession r=daoshengmu
- Implemented 1ms, 10ms, and 100ms VR tasks, dispatched from
  VRManager
- Removed Android-specific code that compensated for
  tasks that did not run when the...

...compositor was paused.

Differential Revision: https://phabricator.services.mozilla.com/D3378

--HG--
extra : moz-landing-system : lando
2018-09-25 22:56:10 +00:00
Daosheng Mu
e807dc8d6a Bug 1488573 - Part 2: Checking OpenVR btn/axis count at runtime to avoid array overflow. r=kip
MozReview-Commit-ID: 5KgcuAcKCmO

Differential Revision: https://phabricator.services.mozilla.com/D6744

--HG--
extra : moz-landing-system : lando
2018-09-25 22:00:30 +00:00
Daosheng Mu
ab575da60d Bug 1488573 - Part 1: Add crash log for VR controllers have unmatched button/axis count. r=kip
MozReview-Commit-ID: 8F3cDiZJ7ef

Differential Revision: https://phabricator.services.mozilla.com/D6817

--HG--
extra : moz-landing-system : lando
2018-09-25 21:58:35 +00:00
Daosheng Mu
a1355f493d Bug 1493835 - Don't notify VR process shutdown when no GPUChild connection. r=kip
MozReview-Commit-ID: ZXs6SldKcw

Differential Revision: https://phabricator.services.mozilla.com/D6825

--HG--
extra : moz-landing-system : lando
2018-09-25 21:48:55 +00:00
Henri Sivonen
434c47b3cb Bug 1489462 - Avoid writing past the logical length of a string in Oculus library loader. r=kip
* Avoid writing past an XPCOM string's length using BeginWriting().
 * Instead of having a constant for max path length, query the
   Windows API for the length it wants.
 * Avoid using AppendPrintf for mere concatenation using arguments
   that might contain non-ASCII.

MozReview-Commit-ID: 9m7xOHRTB35

Differential Revision: https://phabricator.services.mozilla.com/D5349

--HG--
extra : moz-landing-system : lando
2018-09-08 17:23:25 +00:00
Imanol Fernandez
01d16686d3 Bug 1487115 - Fix navigator.Gamepads returns empty VR array after a page load when using gfxVRExternal r=qdot,kip
Differential Revision: https://phabricator.services.mozilla.com/D4570

--HG--
extra : moz-landing-system : lando
2018-08-29 19:10:55 +00:00
Gabriele Svelto
6bddc0a55e Bug 1486772 - Refactor the screen-orientation types and headers r=smaug
This patch removes the 'ScreenOrientationInternal' type from
dom/base/ScreenOrientation.h and moves it into the
HalScreenConfiguration.h header, renaming it simply to 'ScreenOrientation'
in the process. This has several knock-off effects:

- It allows files that needed ScreenOrientationInternal to include a much
  smaller header than before

- It greatly reduces the number of headers pulled in when including Hal.h

- It clarifies the role of the type. The 'Internal' part in the name had
  nothing to do with it being part of the implementation. The type was public
  and called that way only to avoid clashing with the 'ScreenOrientation'
  class. Since we moved it into a different namespace it can be renamed
  safely.

- It allows a file that was manually re-declaring 'ScreenConfigurationInternal'
  type to use the original one

- Finally this fixes a few files which were missing headers they actually
  required but that would still build because unified compilation put them into
  units that already had those headers thanks to ScreenConfiguration.h

Differential Revision: https://phabricator.services.mozilla.com/D4458

--HG--
extra : moz-landing-system : lando
2018-08-29 20:54:56 +00:00
Daosheng Mu
8e0cd59f7c Bug 1485388 - Checking VRGPUChild is created before asking stop VRService. r=kip
MozReview-Commit-ID: 8NM2bcmqVAa

Differential Revision: https://phabricator.services.mozilla.com/D4054

--HG--
extra : moz-landing-system : lando
2018-08-27 20:51:16 +00:00
Imanol Fernandez
2072f84821 Bug 1482613 - Make WebVR work with multiprocess enabled on Android r=kip,rbarker,kvark
MozReview-Commit-ID: G9aHbp0G7DK

Differential Revision: https://phabricator.services.mozilla.com/D3152

--HG--
extra : moz-landing-system : lando
2018-08-24 15:32:12 +00:00
Cosmin Sabou
164891642a Backed out changeset 1eb34707779f (bug 1482613) for causing android crashes in test_vrDisplay_canvas2d.
--HG--
extra : amend_source : f97559dc9494fbe0120035381d8903cfc62d2830
2018-08-24 00:10:57 +03:00
Imanol Fernandez
4ee978a82d Bug 1482613 - Make WebVR work with multiprocess enabled on Android r=kip,rbarker,kvark
MozReview-Commit-ID: G9aHbp0G7DK

Differential Revision: https://phabricator.services.mozilla.com/D3152

--HG--
extra : moz-landing-system : lando
2018-08-23 18:35:15 +00:00
Daosheng Mu
90d9af9138 Bug 1485095 - Fix can't get VRSystemManagerExternal in Android. r=kip
MozReview-Commit-ID: F82UoWhVVWs

Differential Revision: https://phabricator.services.mozilla.com/D3915

--HG--
extra : moz-landing-system : lando
2018-08-21 22:01:00 +00:00
Kearwood Gilbert
8fc883c938 Bug 1481327 - Part 2: Handle VR process shared memory.,r=kip
--HG--
extra : rebase_source : 9cd9aee74783c0817d8825aff7e7b3cef881fdab
2018-08-20 14:59:56 -07:00
Kearwood Gilbert
a642b0a38b Bug 1481327 - Part 1: Launch VR service in VR process., r=kip,r=mccr8
--HG--
extra : rebase_source : 1de178356f2c4550f01635763e80fbd05b7b0c05
2018-08-20 14:58:28 -07:00
Daosheng Mu
a0fe81c1da Bug 1430038 - Part 3: Construct IPC connection for VR/GPU process; r=kip, jimm, jgilbert
Summary: MozReview-Commit-ID: 2kOyfC4TFZP

Tags: #secure-revision

Differential Revision: https://phabricator.services.mozilla.com/D2879

MozReview-Commit-ID: 17O2xbRMOFJ

--HG--
extra : rebase_source : fdf55e8542dd5487868cfe36fc27f447d95528de
2018-08-06 22:47:18 -07:00
Daosheng Mu
fc47ba869a Bug 1430038 - Part 2: launch VR process and communicate with GPU process; r=kip, jimm
Summary: MozReview-Commit-ID: IQZVIYVSCxe

Tags: #secure-revision

Differential Revision: https://phabricator.services.mozilla.com/D2877

MozReview-Commit-ID: 4sT6fqk7MpT

--HG--
extra : rebase_source : dab038bdb214ec7e808a74ed5c76a11097c3ffcf
2018-08-07 11:20:34 -07:00
Imanol Fernandez
5424767924 Bug 1481393 - Implement a listener for WebVR PresentationGenerationContext changes; r=kip,rbarker,nika
MozReview-Commit-ID: FAR1fYnNM0U

Differential Revision: https://phabricator.services.mozilla.com/D2832

--HG--
extra : moz-landing-system : lando
2018-08-07 23:09:42 +00:00
Masatoshi Kimura
3b21b7868b Bug 1090497 - Re-enable warnings as errors on clang-cl. r=froydnj
--HG--
extra : rebase_source : c09366fb93e5b0f72abe1e99d3094e3d96a934fb
extra : intermediate-source : 5950c9d63c3b4fd63a25464a7b50944aaec7079f
extra : source : ca1b9a2bcc4381795f556fea2fb59066567c30f3
2018-07-31 22:10:07 +09:00
Kearwood "Kip" Gilbert
7be6545dd6 Bug 1320616 - Use the render pose rather than the gameplay pose for OpenVR headsets r=daoshengmu
The WebVR api was returning a headset pose predicted one additional frame in the
future, but the SteamVR async reprojection was reprojecting it using the
prior (correct) frame's pose.

This resulted in a sickness inducing swimming effect as well as deregistration
from the Vive chaperone bounds.

Differential Revision: https://phabricator.services.mozilla.com/D2693

--HG--
extra : moz-landing-system : lando
2018-08-03 22:05:06 +00:00
Imanol Fernandez
25d362ba4f Bug 1479424 - Fix VRManager NotifyVSync not called when compositor is paused on Android; r=kip,rbarker
MozReview-Commit-ID: JY8xyCSKIgv

--HG--
extra : rebase_source : 8ae0ba070bba5cc03137c4053a7730ad89090e96
2018-07-30 18:14:05 +02:00
Kearwood Gilbert
17fa5240f0 Bug 1476797 - Indicate VR session activity indepenently of layer presence r=daoshengmu
MozReview-Commit-ID: 4F0vclSj5gB

Differential Revision: https://phabricator.services.mozilla.com/D2451

--HG--
extra : moz-landing-system : lando
2018-07-31 01:41:25 +00:00
Hiroyuki Ikezoe
d096c8bddf Bug 1479234 - Include missing headers in D3D11YCbCrImage.cpp and VRLayerChild.cpp. r=hiro
MozReview-Commit-ID: C8VQO46Lm1

--HG--
extra : rebase_source : 5751da5530ac9771ed349b71a2c10fec28904a97
2018-07-31 08:13:19 +09:00
Imanol Fernandez
c7746a52c2 Bug 1476380 - Remove the spin wait in Android gfxVRExternal PullState calls; r=kip
MozReview-Commit-ID: 7pwMhE7emwY

--HG--
extra : rebase_source : f7ce0053855e51c0b166a0a9e686e2f2e9a09e22
2018-07-24 16:27:58 +02:00
Imanol Fernandez
6672f5861e Bug 1475270 - Avoid deadlock when pausing the compositor while gfxVRExternal is waiting for a SubmitFrame result; r=kip
--HG--
extra : amend_source : d7344800392a8b22c72a9deac717feca07ea9e58
2018-07-12 17:22:20 +02:00
Kearwood Gilbert
d0b35a2ff4 Bug 1470527 - Implement Controller support for gfxVRExternal and VRServiceOpenVR,r=daoshengmu
MozReview-Commit-ID: I1xHfmAPMxT

--HG--
extra : rebase_source : 5d957ff6172f3e730b61878b9067ec506ea4a383
extra : source : 66c97a5d22efc6436aab76756759b9b51517e940
2018-07-11 12:20:51 -07:00
Ciure Andrei
4a390e2fc4 Backed out 1 changesets (bug 1470527) for build bustages on OpenVRSession.cpp CLOSED TREE
Backed out changeset 66c97a5d22ef (bug 1470527)
2018-07-11 23:23:42 +03:00
Kearwood Gilbert
0ee53b44e4 Bug 1470527 - Implement Controller support for gfxVRExternal and VRServiceOpenVR
--HG--
extra : amend_source : d639de8cb929b209bbde0f44b47acadd23a9e257
2018-07-11 12:20:51 -07:00
Kearwood Gilbert
04e66eb0c1 Bug 1470348 - Enable gfxVRExternal for Android; r=kip
MozReview-Commit-ID: 4XMdLLoedIh

--HG--
extra : rebase_source : b71d5d73b832f1f16ae261463860b4f60b38c559
2018-07-10 17:41:58 -07:00
Jan Beich
2624692e9c Bug 1473881 - Unbreak build on Tier3 after bug 1466699. r=kip
MozReview-Commit-ID: 7G9bLplXoHB

--HG--
extra : rebase_source : 080b8495aedc1a3ed32afe6f94a9da5f5e7253c9
2018-07-06 13:38:01 +00:00
Kearwood "Kip" Gilbert
d1989d114c Bug 1466699 - Implement VRService thread r=daoshengmu
- Refactored gfxVROpenVR to use gfxVRExternal interface from the
  VR Service.  Existing gfxVROpenVR left in place (for now) to
  allow VR service to be enabled or disabled by pref.
- The VR service, containing gfxVROpenVR, is to run in-process within
  its own thread first, then to be later moved to its own process.
- Fixed periodic immersive mode flicker that occured due to HMD pose and
  HMD state being separately sampled from the Shmem.  It was possible
  to advance a frame without also getting an updated pose if a dirty
  copy of the shmem was detected.
MozReview-Commit-ID: IvpJErmi5kF

--HG--
extra : rebase_source : 0e21d3414a13dc514c3035f2bd5f6adc365b465d
2018-05-08 11:31:28 -07:00
Kearwood "Kip" Gilbert
89b524f028 Bug 1469967 - Implement immersive mode for gfxVRExternal r=rbarker
- The VR External interface/shmem and gfxVRExternal are
  updated to enable entering VR, exiting VR, and submitting
  frames.
- You can now construct gfxVRExternal using a pointer to
  the VR External API shmem, if it is created elsewhere.

MozReview-Commit-ID: LZuoLvoEmKO

--HG--
extra : rebase_source : ab38ae4c34f9ac5cdd69e7222f12b1c758307057
2018-05-08 11:31:28 -07:00
Andi-Bogdan Postelnicu
de9afa6930 Bug 1453795 - WebVR - Initialize member fields in classes/ structures. r=kip
--HG--
extra : rebase_source : e74859026aa9f35df953c98812591500f54efb75
extra : amend_source : c2fad0ffaa313aadbc1e8b7e01654bd28feea971
2018-06-15 18:16:15 +03:00
Randall Barker
2c2e0b614f Bug 1465816 - Add initial code needed to support gfxVRExternal on android r=kip,jchen
MozReview-Commit-ID: 9rXXqIvyvhp
2018-06-05 18:33:01 -07:00
Cosmin Sabou
2c1302b895 Backed out changeset 66a3146a7fce (bug 1465816) for frequent reftest failures on draw_rect.html. CLOSED TREE 2018-06-06 00:28:56 +03:00
Randall Barker
4b62519e23 Bug 1465816 - Add initial code needed to support gfxVRExternal on android r=kip,jchen
MozReview-Commit-ID: 9rXXqIvyvhp
2018-06-05 12:34:15 -07:00
Kearwood Gilbert
5bb50b3bf3 Bug 1463329 - Iterate over a copy of VRManagerChild::mDisplays to guard against modifications to mDisplays during the loop
--HG--
extra : rebase_source : 52f30a91d8dd8567e56aa30c9cb37a02f86dea9b
2018-05-30 14:07:13 -07:00
sotaro
623f090649 Bug 1451183 - Make EGLLibrary destroyable r=jgilbert 2018-06-04 11:09:29 +09:00
Emilio Cobos Álvarez
fffb25b74f Bug 1465585: Switch from mozilla::Move to std::move. r=froydnj
This was done automatically replacing:

  s/mozilla::Move/std::move/
  s/ Move(/ std::move(/
  s/(Move(/(std::move(/

Removing the 'using mozilla::Move;' lines.

And then with a few manual fixups, see the bug for the split series..

MozReview-Commit-ID: Jxze3adipUh
2018-06-01 10:45:27 +02:00
Daosheng Mu
1cb8578ef7 Bug 1456664 - Fix the right Oculus Touch axes no value issue when the left one is off; r=kip
MozReview-Commit-ID: E4jxHnHjYUB

--HG--
extra : rebase_source : 04e5dedb8d953196ee56d1676b21a37cd7066d00
2018-05-25 16:17:50 -07:00
Daosheng Mu
6212744b91 Bug 1455159 - Let Oculus Touch trigger listen touch events instead of using button values; r=kip
MozReview-Commit-ID: 6P5BW3PQo7

--HG--
extra : rebase_source : 940c9804776534c31b041442115b9c7100c39ef2
2018-05-25 11:10:59 -07:00
Kearwood Gilbert
a6a73845e8 Bug 1423731 - Update OpenVR to 1.0.18 r=rbarker
MozReview-Commit-ID: HnsMlUukB6z

--HG--
extra : rebase_source : 4c270d99cf6e54dfff653a1475a32b43548d4a77
2018-05-04 16:31:58 -07:00
Kearwood "Kip" Gilbert
08e845d5e5 Bug 1373279 - Avoid checking for OpenVR runtime until hitting WebVR content r=rbarker
MozReview-Commit-ID: 9nUZ44uZEjE

--HG--
extra : rebase_source : 3e82c22bbc23da36d0985c8efd2556239f18df0d
2018-05-03 16:27:46 -07:00
Masatoshi Kimura
c7c5848511 Bug 1442275 - Stop using PR_LoadLibrary in gfx/. r=jgilbert
MozReview-Commit-ID: LNZtr4NVFYj

--HG--
extra : rebase_source : 2f064f5662b02a3c2e76774908f4a15e7580720d
extra : source : ad866775710347c330907a315d88784e56dec00e
2018-02-25 01:33:57 +09:00
Nathan Froyd
dbc53de3d9 Bug 1451363 - part 5 - remove ProtocolName virtual function; r=mccr8
ProtocolName() is only used for producing error messages and annotating
crash reports.  But examining actual crash reports that would have used
the result of ProtocolName() indicates that we can always tell what the
erroring protocol is due to the stack backtrace.  So having this virtual
function around just provides duplicate information, and it takes up too
much space in the vtable besides.  Let's get rid of it.
2018-04-23 14:13:36 -04:00
Sebastian Hengst
0819f35e51 Backed out 4 changesets (bug 525063) on request from Andi. a=backout
Backed out changeset 516c4fb1e4b8 (bug 525063)
Backed out changeset 6ff8aaef2866 (bug 525063)
Backed out changeset bf13e4103150 (bug 525063)
Backed out changeset d7d2f08e051c (bug 525063)
2018-04-13 16:01:28 +03:00
Tristan Bourvon
a3a77c0312 Bug 525063 - Initialize uninitialized class attributes in m-c. r=ehsan 2018-04-10 21:11:02 +02:00
Miko Mynttinen
65c6bee9d6 Bug 1445302 - Replace TArray.RemoveElementAt(TArray.Length() - 1) pattern with TArray.RemoveLastElement() or TArray.PopLastElement() r=froydnj
MozReview-Commit-ID: rGjabnP2iz

--HG--
extra : rebase_source : 1ef6c5ce028ac9ebd9f3176d57835c43fe46bada
2018-03-13 14:51:33 +01:00
Kearwood Gilbert
0fd0d36de4 Bug 1445647 - Fixed initialization of state.mSittingToStandingTransform
--HG--
extra : rebase_source : 42d51f2c33a27b920071f18d71b59c0550118f9f
2018-03-14 13:30:06 -07:00