Commit Graph

357 Commits

Author SHA1 Message Date
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
Kearwood Gilbert
d0b2b8da65 Bug 1436791 - Implement gfxVRExternal,r=rbarker
- gfxVRExternal Enables other processes to present
  real or simulated VR hardware to Firefox.
- This functionality is disabled by default, under
  dom.vr.external.enabled.
- VRDisplayInfo, VRControllerInfo, and associated
  structs have been restructured to ensure internal
  state is not exposed via shmem interface.
- Some refactoring to convert structs to
  POD types, enabling them to be located
  in shmem and be memcpy'd.
- Work needed before unpreffing marked
  with "TODO" comments.
MozReview-Commit-ID: FbsusbxuoQ8

--HG--
extra : rebase_source : 8a448169c3f47411c705a4d9fd462a1f9363dfd9
extra : amend_source : e6702549527292e2850d16e8f503f0be9848159f
2018-03-13 17:09:54 -07:00
Andrew Osmond
ac545b4747 Bug 1433646 - Allow ContentChild::Recv(Re)InitRendering to fail with the GPU process. r=rhunt
When ContentChild::RecvInitRendering is received, it tries to setup the
IPDL actors related to rendering. If the GPU process crashes before or
during this process, it will fail, and cause the content process to
crash as well. This is unnecessary because the UI process will either
restart the GPU process, or subsume its job into itself, and trigger
ContentChild::RecvReinitRendering. It is a similar case for failures in
ContentChild::RecvReinitRendering.

Since the GPU process crashing should be a recoverable scenario, we now
check if the remote IPDL actor is in the UI or the GPU process. If it is
in the UI process, it will fail/crash as it does today. If it is in the
GPU process, it will wait for the next
ContentChild::RecvReinitRendering.

For failures that are not IPDL related (e.g. failed to get some resource
like spawning a thread), we release assert specifically for those
failures. They are not recoverable.
2018-02-14 18:07:53 -05:00
Daniel Holbert
73cea96890 Bug 1435297 part 2: (automated patch) Switch a bunch of C++ files in gfx to use our standard emacs/vim mode lines. r=jrmuizel
This patch was generated automatically by the "modeline.py" script, available
here: https://github.com/amccreight/moz-source-tools/blob/master/modeline.py.
I ran it as follows:
  python /path/to/modeline.py --fix gfx/

This patch changes all affected files to use the exact C++ mode lines from the
Mozilla coding style guide, available here:
https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/Coding_Style#Mode_Line

MozReview-Commit-ID: FsPNGjFkIFV

--HG--
extra : rebase_source : 7532d0478d0af75e346102105caf5b89631457aa
2018-02-02 12:07:36 -05:00
Kearwood "Kip" Gilbert
b91be1697a Bug 1402147 - Part 1: Fire VRDisplayConnect event for VR displays that are already enumerated when a page is loaded r=daoshengmu
MozReview-Commit-ID: 7zQOSYJ6tkg

--HG--
extra : rebase_source : e2535cb282475795a6107a002cce629049258b38
2018-01-04 14:27:03 -08:00
Daosheng Mu
9dfae67fe9 Bug 1427830 - If VR submit thread is inactive in Oculus, don't post tasks; r=kip
MozReview-Commit-ID: BKaD7ft3Fms

--HG--
extra : rebase_source : 94efe7f82541bfcf45f07b8ca83daa6edb1281c9
2018-01-04 10:52:55 +08:00
Daosheng Mu
939d422ae6 Bug 1424378 - Switch off Windows MR mode when the amount of button or axes is less than our expectation; r=kip
MozReview-Commit-ID: AONBdKV0Zqj

--HG--
extra : rebase_source : 86ae1231ec549cf3633dd9a327db7b142a8f1c32
2017-12-12 10:49:03 -06:00
Kearwood "Kip" Gilbert
71c9509bf3 Bug 1426546 - Stop enumerating Oculus devices if one is not found, until a page later calls Navigator.getVRDisplays r=daoshengmu
MozReview-Commit-ID: BzhXSuMF4Je

--HG--
extra : rebase_source : c44d11ff04b1604288e689733787a5df87bfc003
2017-12-20 15:57:26 -08:00
Andrew McCreight
ab7fa64021 Bug 1410209, part 4 - Add names to some IPC runnables. r=kanru
This patch requires that each instance of IPC's RunnableFunction is
passed in a name, like the non-IPC RunnableFunction.

MozReview-Commit-ID: Atu1W3Rl66S

--HG--
extra : rebase_source : f932d7597a26a3f0c4246b3a95df638860d3d32d
2017-10-27 13:39:28 -07:00
Jeff Gilbert
96cde974a6 Bug 1426329 - Reduce includes of GLContext.h in headers. - r=lenzak
MozReview-Commit-ID: LPrK3ghNI5f
2017-12-20 11:45:32 -08:00
Margareta Eliza Balazs
060948a574 Merge inbound to mozilla-central r=merge a=merge 2017-12-20 11:47:11 +02:00
Randall Barker
47b3273053 Bug 1426031 - Ensure gfxVRGVR SubmitFrame is called on the correct thread r=daoshengmu
MozReview-Commit-ID: D1beQMO5n2E
2017-12-19 14:41:13 -08:00
Randall Barker
202ce39f2e Bug 1426028 - Head rotation was being applied twice in gfxVRGVR r=kip
MozReview-Commit-ID: IzcRfzE7qxV
2017-12-19 14:41:13 -08:00
Randall Barker
8158f18570 Bug 1426027 - Update gfxVRGVR to reflect latest GoogleVR NDK API r=kip
MozReview-Commit-ID: E082AW3V52M
2017-12-19 14:41:12 -08:00
Milan Sreckovic
099cfc4242 Bug 1423570: Use BaseRect access methods instead of member variables in gfx/ r=bas.schouten
MozReview-Commit-ID: ZGySgc9oP3

--HG--
extra : rebase_source : 23aadc10e9885002290155684b2c495780d979ce
2017-12-19 15:48:39 -05:00
Kearwood "Kip" Gilbert
8e218cb777 Bug 1384279 - Oculus Rift Core 2.0 Adjustments r=daoshengmu
- Add pref to enable the ovrInit_Invisible flag for Oculus sessions, enabled by default.
- Ensure that the Oculus library is unloaded every time it is uninitialized,
  improving reliability of exiting and returning to WebVR.

MozReview-Commit-ID: 6VCugCJ2dUz

--HG--
extra : rebase_source : c6002bbaab650a86a31f62b63029f13ce2c8f614
2017-12-07 15:27:03 -08:00
Sylvestre Ledru
a9961096c0 Bug 1394734 - Simplify various corner cases r=glandium
MozReview-Commit-ID: 4s4JdXZPvmv

--HG--
extra : rebase_source : c8f663c99442d41db5f81ac5fe1aa1f47fd5ed82
2017-12-07 22:10:19 +01:00
Sylvestre Ledru
4591d82b23 Bug 1394734 - Replace CONFIG['CLANG*'] by CONFIG['CC_TYPE'] r=glandium
MozReview-Commit-ID: HbF5oT5HW6f

--HG--
extra : rebase_source : eca479b6ae4bff7f600d1cdb39e11ac2057e4e79
2017-12-07 22:09:38 +01:00
Sylvestre Ledru
5de63ef061 Bug 1394734 - Replace CONFIG['MSVC'] by CONFIG['CC_TYPE'] r=glandium
MozReview-Commit-ID: 5orfnoude7h

--HG--
extra : rebase_source : 1ed9a6b56e1d27221a07624767a7fb0e6147117f
2017-12-08 13:46:13 +01:00
Sylvestre Ledru
9bfe27d903 Bug 1394734 - Replace CONFIG['GNU_C*'] by CONFIG['CC_TYPE'] r=glandium
MozReview-Commit-ID: 7duJk2gSd4m

--HG--
extra : rebase_source : 7312fe276e561e8c034a5f6749774ae812727f9c
2017-12-07 22:09:15 +01:00
Daosheng Mu
9c7a773916 Bug 1423866 - Shutdown the vibrate thread when VR controllers are removed; r=kip
MozReview-Commit-ID: IWvokDVH0x3

--HG--
extra : rebase_source : cb96d20552cbc2cb827edd57e0de0e1ce247f8be
2017-12-07 19:20:49 +08:00
Narcis Beleuzu
1f7fdd5826 Merge mozilla-central to inbound. r=merge a=merge on a CLOSED TREE 2017-12-06 01:49:19 +02:00
Kearwood Gilbert
1bed477cca Bug 1407423 - Part 3: Update Puppet Device Implementation,r=daoshengmu
- Update prefs to accomodate tests, disabling
  enumeration throttling
- Updated Puppet display and controller implementation
  to act more like the actual devices.
- Updated tests to ensure that they explicitly
  create a VR mock display and don't create duplicate
  mock displays.

MozReview-Commit-ID: 6RPVqekG2je

--HG--
extra : rebase_source : 9cc9ea116114cc191edbf5a01ac8f84fff9709c4
2017-11-21 14:18:16 -08:00
Kearwood "Kip" Gilbert
f34bcd9f1e Bug 1407423 - Part 2: Update gfxVRGVR to match refactoring,r=rbarker
MozReview-Commit-ID: DmKnEZanQ3f

--HG--
extra : rebase_source : 785f0feca50944f82da9bb251d5911c7b4b94f39
2017-11-14 10:42:46 -08:00
Kearwood "Kip" Gilbert
a9dbddfdba Bug 1407423 - Ensure that any time we have loaded the Oculus runtime libary, we are polling ShouldQuit,r=daoshengmu
- Ensure ovr_GetSessionStatus is polled even when a VR presentation
  is not active.
- When we fail to initialize an Oculus Session or detect VR hardware,
  immediately unload the Oculus Library as we can't poll for ShouldQuit
  without a valid Oculus session.
- When we poll ovr_GetSessionStatus, we are now updating the mounted state
  in VRDisplayInfo::mIsMounted.
- Added prefs to control enumeration throttling and timeout to release
  VR hardware when inactive.
- Some refactoring to make frame loop more understandable and less
  brittle.
- When throttling enumeration, we ensure that all other VR apis
  also throttle enumeration so that they don't pick up the same device
  during throttling.
- Some long functions in VRManager have been broken up and
  had their inner-workings documented in more detail.

MozReview-Commit-ID: CEYwwQ9mYd0

--HG--
extra : rebase_source : b2ab0dfc17b9ddc06f6afafdf69497fb9418fd47
2017-10-10 14:42:37 -07:00