Граф коммитов

108 Коммитов

Автор SHA1 Сообщение Дата
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
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
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
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
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 "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
Daosheng Mu 4b8304ef73 Bug 1358247 - Reply VR vibrate promises to the individual channels; r=kip
MozReview-Commit-ID: 4NwYNkwKUMR

--HG--
extra : rebase_source : 9e9d8ddcb0f91a3745e6ed5e614bb696b6d950af
2017-11-30 19:37:07 +08:00
Kearwood "Kip" Gilbert c22612d2ce Bug 1404534 - Create new D3D11Device for WebVR r=dvander,jgilbert
- As we are creating a separate VR process in Bug 1362578,
  we will need our own D3D11Device.
- Eventually, we will be allowing the VR device runtimes to
  help select the appropriate adapter / device based on the
  physical connection.  This function will be updated at that
  time.

MozReview-Commit-ID: EewUkNxU3BI

--HG--
extra : rebase_source : d89dd4dcc71f2b0dc54711f50628ee3bc494b73e
2017-08-28 15:56:43 -07:00
Daosheng Mu f1d6f336e7 Bug 1392217 - Part 2: Spawn a VR submit thread in VRDisplayHost; r=kip
MozReview-Commit-ID: 5xvTepEFxe0

--HG--
extra : rebase_source : 06abace030391e0840de11ad6e645fe820f94420
2017-11-17 16:06:59 +08:00
Daosheng Mu 6c5f31bce3 Bug 1392217 - Part 1: Refactor the VR vibrate thread to be as a VRThread and manage its lifetime; r=kip
MozReview-Commit-ID: 7svQQGxDT6j

--HG--
extra : rebase_source : cc3a25a6ac2802844ae6cb0b60fb56254cf068dc
2017-11-15 17:39:38 +08:00
Phil Ringnalda e0e1cf4354 Backed out 4 changesets (bug 1406327) for crashing other tests, crashing itself, and assertion failures
Backed out changeset 471c710b19b1 (bug 1406327)
Backed out changeset 5890bb3a0d97 (bug 1406327)
Backed out changeset 63c8ee57e38c (bug 1406327)
Backed out changeset 345972733daa (bug 1406327)

MozReview-Commit-ID: IwWx11QSuS4
2017-11-01 21:44:12 -07:00
Daosheng Mu 1b3cb570af Bug 1406327 - Part 3: VRSystemManager for multi-threads; r=kip
MozReview-Commit-ID: 4bE5hruFcT2

--HG--
extra : rebase_source : e1184bbd96c7c5663e04db85d4d2c0f44bf4dcd6
2017-10-26 17:45:44 +08:00
Attila Craciun 3f2f6291d0 Backed out changeset 81c384a01762 (bug 1406327) for failing dom/vr/test/mochitest/test_vrController_displayId.html r=backout on a CLOSED TREE. 2017-11-01 11:14:41 +02:00
Daosheng Mu ff91e4857a Bug 1406327 - Part 3: VRSystemManager for multi-threads; r=kip
MozReview-Commit-ID: 4bE5hruFcT2

--HG--
extra : rebase_source : 39a1f7de6930a3d0b78387c9b8a3555c638cfc0a
2017-10-26 17:45:44 +08:00
Phil Ringnalda 1e756a27c8 Backed out 3 changesets (bug 1406327) for bustage in tests that run after the VM tests
Backed out changeset 1784a194ced8 (bug 1406327)
Backed out changeset 44cb5451bbde (bug 1406327)
Backed out changeset e1e57d418c14 (bug 1406327)

MozReview-Commit-ID: HUN1rEqAIWf
2017-10-31 22:33:41 -07:00
Daosheng Mu 17c0316bd9 Bug 1406327 - Part 3: VRSystemManager for multi-threads; r=kip
MozReview-Commit-ID: 4bE5hruFcT2

--HG--
extra : rebase_source : 39a1f7de6930a3d0b78387c9b8a3555c638cfc0a
2017-10-26 17:45:44 +08:00
Andi-Bogdan Postelnicu 07c02b3927 Bug 1411630 - make mozilla::gfx::VRHMDSensorState to be trivial typed. r=kip
MozReview-Commit-ID: 7BniyasLIQD

--HG--
extra : rebase_source : 9f96da05deab0718b19170814a67a2b22c58656e
2017-10-30 14:51:32 +02:00
Kearwood "Kip" Gilbert ccc6462307 Bug 1410493 - Update Oculus SDK from 1.5 to 1.9, update IPD during VR presentation r=daoshengmu
- Oculus SDK was updated from 1.5 to 1.9
- As the Oculus API now returns quaternion orientations for each
  eye-to-head transform, I needed to send more information to the
  content process.
- Rather than adding the quaternion, we now calculate the view matrices
  on the VR thread in the GPU process rather than calculating it in the
  content thread from parameters.
- OpenVR's full view matrix is now used, for compatibility with more devices.
- IPD adjustments are now updated every frame for both Oculus and OpenVR.


MozReview-Commit-ID: LOtfs4QIqc8

--HG--
extra : rebase_source : 0a69824012ede4bea0e0e709a2d027d0c35730bb
2017-10-23 14:23:03 -07:00
Daniel Holbert 126bd9e1a4 Bug 1412427 part 8: (automated patch) Switch a bunch of C++ files in gfx to use our standard 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

For every file that is modified in this patch, the changes are as follows:
 (1) The patch changes the file 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

 (2) The patch deletes any blank lines between the mode line & the MPL
     boilerplate comment.

 (3) If the file previously had the mode lines and MPL boilerplate in a
     single contiguous C++ comment, then the patch splits them into
     separate C++ comments, to match the boilerplate in the coding style.

MozReview-Commit-ID: 77D61xpSmIl

--HG--
extra : rebase_source : c6162fa3cf539a07177a19838324bf368faa162b
2017-10-27 16:10:06 -07:00
Coroiu Cristina 9ca76dcb7a Backed out changeset b7a07167905c::2932c914e223 (bug 1406327) for failing in dom/vr/test/mochitest/test_vrController_displayId.html r=backout a=backout on a CLOSED TREE
Backed out changeset 2932c914e223 (bug 1406327)
Backed out changeset cfbc6262a064 (bug 1406327)
Backed out changeset b7a07167905c (bug 1406327)
2017-10-30 14:51:52 +02:00
Daosheng Mu c32ea833f2 Bug 1406327 - Part 3: VRSystemManager for multi-threads; r=kip
MozReview-Commit-ID: 4bE5hruFcT2

--HG--
extra : rebase_source : 3aa00d81127c90974f00571bd89174bd62a9d117
2017-10-26 17:45:44 +08:00
Sylvestre Ledru d60d69e2cb Bug 1411001 - Remove the +x permissions on cpp & h files r=froydnj
MozReview-Commit-ID: DjDkL20wRg0

--HG--
extra : rebase_source : a343d83d1f4e97e4ba56d0f57fec93079df0b5ea
2017-10-23 20:59:55 +02:00
Daosheng Mu 820e14cb33 Bug 1392216 - Part 4: Move drawing black layer commaneds to Compositor thread when stopping presentation; r=kip
MozReview-Commit-ID: 6YmQ9DYp79O

--HG--
extra : rebase_source : 45898a15fd2648db977647556d8cf120a67ff9d1
2017-10-16 13:30:46 +08:00
Daosheng Mu 48b5ded13e Bug 1392216 - Part 2: Support VR listener thread in VR; r=kip
MozReview-Commit-ID: 62PZ5opXoZ6

--HG--
extra : rebase_source : 81bac1b7228a35baa571f381e863e31608ba350f
2017-10-05 18:16:16 +08:00
Tom Ritter 3eb3b1f0ab Bug 1405439 Do not cast nullptr to bool implicitly, instead return false in gfx/vr r=kip
MozReview-Commit-ID: LtfTRFDopsT

--HG--
extra : rebase_source : c9a3412114b2bc877b2a036eaa7881da7d08b128
2017-10-03 12:47:10 -05:00
Kearwood "Kip" Gilbert c5a2279e20 Bug 1400457 - Isolate VR Rendering from Compositor r=daoshengmu,jgilbert
- WebVR is no longer dependent on PTexture, TextureParent,
  TextureHost, and TextureChild.  It continues to use TextureClient
  for pooling and coordinating locks with other Gecko code.
- PreserveDrawingBuffer now behaving correctly for 2d display mirroring
- Preparation for separating to VR process
MozReview-Commit-ID: 2RGOulCInSu

--HG--
extra : rebase_source : 3542b804c3def36fa74541be32d0e7cbc9698641
2017-07-21 17:30:34 -07:00
Kearwood "Kip" Gilbert 4eef388a2c Bug 1394600 - Allow VRDisplay.requestPresent update the VR layers after presentation has already begun r=daoshengmu
- A user gesture is required only for the VRDisplay.requestPresent
  call that initiates the VR presentation, as per the WebVR 1.1 spec.
- The parameters of the VRLayer can now be updated by calling
  VRDisplay.requestPresent on an active VR presentation.
- Dynamic resolution switching is now functional:
  https://webvr.info/samples/08-dynamic-resolution.html

iMozReview-Commit-ID: BL7aJfF6nqR
MozReview-Commit-ID: CmhbFJ4ij5q

--HG--
extra : rebase_source : 28a3f608b4f821631e81ccdfe7f7824f9508a7b4
2017-08-28 16:20:59 -07:00
Kearwood "Kip" Gilbert 8801f82f5e Bug 1381085 - Submit VR frames with a separate ID3DDeviceContextState r=daoshengmu
- Using a separate ID3DDeviceContextState ensures
  that the WebVR context does not stomp over the
  mirrored state used by the MLGPU "Advanced" Layers rendering.

MozReview-Commit-ID: 99mfdsjFrMI

--HG--
extra : rebase_source : 599df3b1344ca1489cbb13169313dff8e767c399
2017-09-18 16:19:49 -07:00
Phil Ringnalda 173d5226f0 Backed out changeset 8e98f894a8a3 (bug 1381085) for Windows 7 failures in draw_rect.html and change_size.html
CLOSED TREE

MozReview-Commit-ID: D8RWiRfUPL9
2017-09-20 19:39:36 -07:00
Kearwood "Kip" Gilbert fcc8fcf709 Bug 1381085 - Submit VR frames with a separate ID3DDeviceContextState r=daoshengmu
- Using a separate ID3DDeviceContextState ensures
  that the WebVR context does not stomp over the
  mirrored state used by the MLGPU "Advanced" Layers rendering.
MozReview-Commit-ID: 99mfdsjFrMI

--HG--
extra : rebase_source : fdcdcb55185048cfb54163f51aca70409a1aa74a
2017-09-18 16:19:49 -07:00
Daosheng Mu b95528913e Bug 1392476 - Add dropframe telemetry for WebVR; r=francois,kip
MozReview-Commit-ID: IPVnPBkY8CN

--HG--
extra : rebase_source : 437b3528cecb05bc0bb4307447dee3e18c63d762
2017-08-28 18:43:25 +08:00
Daosheng Mu 6cea13ecbd Bug 1389227 - Avoid accessing invalid array index in vr controllers when stopping vibrate; r=kip
MozReview-Commit-ID: NR5FLllABm

--HG--
extra : rebase_source : 3856d3a434716e057a98ff07fc27e3ec2b544172
2017-08-11 18:10:29 +08:00
Milan Sreckovic e3cd0a3157 Bug 1387514: Upgrade BaseRect (derived classes) width and height direct member variable use to instead use Width()/SetWidth() and Height()/SetHeight() in .cpp files in gfx/*. r=milan
MozReview-Commit-ID: 1jESowJKdyp

--HG--
extra : rebase_source : 3839cdea46729a9af05c777215cffcb9f42a2018
2017-08-14 08:29:28 -04:00
Daosheng Mu ef8460e296 Bug 1388274 - Adjust WebVR telemetry histogram's high bound for user time spent; r=francois,kip
MozReview-Commit-ID: JcQZTgVmxr3

--HG--
extra : rebase_source : e00eab62c6d661a410d46d165843d7985054b145
2017-08-08 18:23:43 +08:00
Daosheng Mu 96e02d5de5 Bug 1306156 - Add telemetry for watching MAU and time spent of WebVR users; r=kip
MozReview-Commit-ID: 6v3F6aGdNK7

--HG--
extra : rebase_source : 6fc6a8accb1cc48968f3e1a09dc76de4b508afc7
2017-07-28 18:42:11 +08:00
Daosheng Mu 6afecdd28e Bug 1383110 - Force to fetch Oculus Touch tracking data when it is added; r=kip
MozReview-Commit-ID: 4e8qoV6cDzy

--HG--
extra : rebase_source : fd5f41fe3d67583af98e50a0bee363989ea00c40
2017-07-27 15:42:59 +08:00
Daosheng Mu 50f04ed171 Bug 1375816 - Part 3: VRController displayId attribute support; r=kip
MozReview-Commit-ID: CfWCYJuZaBK

--HG--
extra : rebase_source : faa7a409d619d7618784e1d80358b59625dc87e6
2017-07-14 17:01:09 +08:00
Sebastian Hengst 8689e62ade Backed out changeset 13155b1e7a48 (bug 1375816) 2017-07-18 11:48:26 +02:00
Daosheng Mu 9e15accf51 Bug 1375816 - Part 3: VRController displayId attribute support; r=kip
MozReview-Commit-ID: CfWCYJuZaBK

--HG--
extra : rebase_source : 1fdc733c56978ad87d35a323997f5058e1f35247
2017-07-14 17:01:09 +08:00
Wes Kocher eaeabd21b5 Backed out 4 changesets (bug 1375816) for various failures including builds busted in gfxVROculus.cpp a=backout
Backed out changeset 73619b7ce23d (bug 1375816)
Backed out changeset dd09fc501f90 (bug 1375816)
Backed out changeset fd4517198d6c (bug 1375816)
Backed out changeset e15e060f034c (bug 1375816)

MozReview-Commit-ID: 9VXOC0V45NE
2017-07-17 23:18:21 -07:00
Daosheng Mu a4e7f823f5 Bug 1375816 - Part 3: VRController displayId attribute support; r=kip
MozReview-Commit-ID: CfWCYJuZaBK

--HG--
extra : rebase_source : 1fdc733c56978ad87d35a323997f5058e1f35247
2017-07-14 17:01:09 +08:00
Kearwood "Kip" Gilbert 0a5d006f8a Bug 1287944 - Improve interaction with Oculus Home r=daoshengmu
- Now destroying and re-creating Oculus sessions when switching
  between magic window and immersive WebVR (BeginPresent / ExitPresent)
- Now sending flags to Oculus ovr_initilize to specify if Firefox will
  be presenting to the VR display or just using tracking
- Now coordinating oculus session shutdown and restart between the
  VR controllers and the VR display with reference counting.
- Now able to return to Oculus home after using WebVR
- Magic window / non-exclusive sessions no longer take over the VR headset
  causing it to display a message that Firefox.exe is not responding.


MozReview-Commit-ID: EnRsxt6ZSzg

--HG--
extra : rebase_source : 10ba1b76bf75774b8842d99b555319fb5dd7f736
2017-07-04 13:28:27 -07:00
Wes Kocher c119435f8a Backed out changeset f9b033c61423 (bug 1287944) for win debug failures in test_child_assertions.js a=backout
MozReview-Commit-ID: Fem34WwTkY6
2017-07-06 17:03:39 -07:00
Kearwood "Kip" Gilbert d4f04befed Bug 1287944 - Improve interaction with Oculus Home r=daoshengmu
- Now destroying and re-creating Oculus sessions when switching
  between magic window and immersive WebVR (BeginPresent / ExitPresent)
- Now sending flags to Oculus ovr_initilize to specify if Firefox will
  be presenting to the VR display or just using tracking
- Now coordinating oculus session shutdown and restart between the
  VR controllers and the VR display with reference counting.
- Now able to return to Oculus home after using WebVR
- Magic window / non-exclusive sessions no longer take over the VR headset
  causing it to display a message that Firefox.exe is not responding.


MozReview-Commit-ID: EnRsxt6ZSzg

--HG--
extra : rebase_source : d1ecf52e064ffe88c2cdebb011b8ffa9beb7b46e
2017-07-04 13:28:27 -07:00
Nicholas Nethercote 3e439bb4f8 Bug 1376638 - Minimize uses of prmem.h. r=glandium.
It's silly to use prmem.h within Firefox code given that in our configuration
its functions are just wrappers for malloc() et al. (Indeed, in some places we
mix PR_Malloc() with free(), or malloc() with PR_Free().)

This patch removes all uses, except for the places where we need to use
PR_Free() to free something allocated by another NSPR function; in those cases
I've added a comment explaining which function did the allocation.

--HG--
extra : rebase_source : 0f781bca68b5bf3c4c191e09e277dfc8becffa09
2017-06-30 19:05:41 -07:00
Bill McCloskey f115503a0b Bug 1372405 - Provide names for all runnables in the tree (r=froydnj)
MozReview-Commit-ID: DKR6ROiHRS7
2017-06-26 14:19:58 -07:00
Kearwood "Kip" Gilbert 50c0fb8b90 Bug 1375060 - Update Oculus headers to match requested API version. r=daoshengmu
MozReview-Commit-ID: KADOmlLm674

--HG--
extra : rebase_source : 60c976400ef1c0d7fc3c97fe5aa0b1e805c644b1
2017-06-21 15:42:10 -07:00
Kearwood Gilbert a679f93781 Bug 1352446 - Fix 32-bit build crash with Oculus VR r=daoshengmu
- Validate GetSharedResourceView in VRDisplayOculus::SubmitFrame and VRDisplayPuppet::SubmitFrame
- Correct size of frameIndex to be "long long" rather than "int" for
  ovr_GetPredictedDisplayTime
- Updated to Oculus 1.15.0 SDK
- Now sending absolute timestamp of the predicted frame time
  to ovr_GetTrackingState rather than a delta

MozReview-Commit-ID: GLSkqwae7Jp

--HG--
extra : rebase_source : 80a051c4af9e2241fe971fc2763015b5f3d18f7c
2017-06-08 14:03:26 -07:00