Commit Graph

257 Commits

Author SHA1 Message Date
Nicholas Nethercote
8a68e6fb83 Bug 1403868 (part 4) - Reduce tools/profiler/public/*.h to almost nothing in non-MOZ_GECKO_PROFILER builds. r=mstange.
Currently the Gecko Profiler defines a moderate amount of stuff when
MOZ_GECKO_PROFILER is undefined. It also #includes various headers, including
JS ones. This is making it difficult to separate Gecko's media stack for
inclusion in Servo.

This patch greatly simplifies how things are exposed. The starting point is:

- GeckoProfiler.h can be #included unconditionally;

- everything else from the profiler must be guarded by MOZ_GECKO_PROFILER.

In practice this introduces way too many #ifdefs, so the patch loosens it by
adding no-op macros for a number of the most common operations.

The net result is that #ifdefs and macros are used a bit more, but almost
nothing is exposed in non-MOZ_GECKO_PROFILER builds (including
ProfilerMarkerPayload.h and GeckoProfiler.h), and understanding what is exposed
is much simpler than before.

Note also that in BHR, ThreadStackHelper is now entirely absent in
non-MOZ_GECKO_PROFILER builds.
2017-10-04 09:11:18 +11:00
Sebastian Hengst
5e0b457b10 merge mozilla-inbound to mozilla-central. r=merge a=merge
MozReview-Commit-ID: EVLGo1zCANb
2017-10-04 11:13:24 +02: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
07bf2f8968 Bug 1400407 - Part 1: Cleanup WebVR dead code,r=daoshengmu,r=jgilbert
- VRManagerChild no longer needs to be a TextureForwarder
- VRManagerParent no longer descends from HostIPCAllocator or ShmemAllocator
- PVRManager no longer manages PTexture's
- VRLayerParent::mSize was not used and has been removed

MozReview-Commit-ID: 3bNN5FR5j7M

--HG--
extra : rebase_source : 634277825c00057bca6f8c77cdc942de61d61e9c
2017-09-14 17:10:15 -07: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
dmu@mozilla.com
e2a5d6b175 Bug 1402749 - Part 2: Only allow updating VR controller amount at Vsync time; r=kip
MozReview-Commit-ID: EwXpyGnTYTD

--HG--
extra : rebase_source : b969991e31dcb612e81dd47129168a535427ce0a
2017-09-29 06:53:27 +00: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
Kearwood "Kip" Gilbert
c0e22d6c35 Bug 1400387 - Change 32-bit VR Frame ID's to 64-bit r=daoshengmu
MozReview-Commit-ID: BSvZMa0XVSO

--HG--
extra : rebase_source : 47c1a2cc9ff756cc1dd9174a12a434c4fbfc4a09
2017-09-15 13:38:47 -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
Andrew Osmond
2b3ebd2479 Backed out changeset 727f0d09e299 (bug 1399453) because the annotations are no longer needed. 2017-09-15 15:11:29 -04:00
Daosheng Mu
a9f76cd981 Bug 1383907 - Enable WebVR reftests on macOS; r=jgilbert,kip
MozReview-Commit-ID: 2OpA95QWI4d

--HG--
extra : rebase_source : b2457c5690fe8290d407c7fab11f29afdeda159c
2017-08-25 00:30:31 +08:00
Andrew Osmond
85db0466a2 Bug 1399453 - Temporarily annotate crash reports with compositor thread owners. r=dvander
From the crashes associated with bug 1389021, we know that some
compositor thread IPDL owners are not being cleaned up properly. We do
not know which protocols are causing the problem, so we temporarily will
annotate the logs with the ownership status. This should be limited to
under a dozen instances of the protocols.

This change will be backed out after a few builds are produced with it
and we see the first crash reports with the relevant data.
2017-09-13 11:16:05 -04:00
Kearwood "Kip" Gilbert
bcd45085c6 Bug 1394561 - Ensure WebVR content can catch up when IPC messages are delayed r=daoshengmu,kanru
MozReview-Commit-ID: F4NKtyaNwEo

--HG--
extra : rebase_source : fb7b2fc51de6b9cf94e6d6bb1837464ec7ea528b
2017-08-31 16:29:14 -07:00
Daosheng Mu
ae7ecb064c Bug 1397397 - Detect vrdisplayconnect/vrdisplaydisconnect events with IsTrackedDeviceConnected() in OpenVR; r=kip
MozReview-Commit-ID: 1Q8zyCZhQuC

--HG--
extra : rebase_source : eb7befe980cb70b8c86adb379190b8aa0a76d973
2017-09-08 15:35:53 +08:00
Daosheng Mu
8a895d7e7f Bug 1352520 - Add GeckoProfiler markers for WebVR; r=kip
MozReview-Commit-ID: 6j22J0rSw1Y

--HG--
extra : rebase_source : 44f3d0052ab0b608f3b5cea5b977f7a2bba428b6
2017-09-06 16:08:21 +08: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
53021c2bb8 Bug 1386664 - Add Knuckles string id for SteamVR Knuckles controllers; r=kip
MozReview-Commit-ID: H8fX21j0u6F

--HG--
extra : rebase_source : f3d3b2ccf62559fabc8a1bc112322b3fa7c1078f
2017-08-04 14:52:01 +08:00
Daosheng Mu
ea78826dc4 Bug 1382114 - Update openvr to 1.0.9; r=kip
MozReview-Commit-ID: BthbIIWFywD

--HG--
extra : rebase_source : 6dfa9c4c93e39acc4a2c74691ee389d4e0a0c166
2017-08-01 16:03:26 +08:00
JerryShih
061742e951 Bug 1357299 - P11: Update layers, dxva and vr module to use SyncObjectChild. v3. r=mattwoodrow,dvander
MozReview-Commit-ID: 4HTPz0YcYHq
2017-08-07 18:15:24 +08:00
Daosheng Mu
92a31f9962 Bug 1382123 - SteamVR Knuckles support in WebVR. r=kip
MozReview-Commit-ID: 4dHRkcQcmeL
2017-08-01 16:36:26 -04:00
Nicholas Nethercote
72c884bf74 Bug 1384835 (part 3, attempt 2) - Remove the Preferences::Get*CString() variants that return nsAdoptingCString. r=froydnj.
--HG--
extra : rebase_source : d317b25be2ec21d1a60d25da3689e46cdce0b649
2017-07-31 14:28:48 +10: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
9297f5b2a3 Bug 1382438 - Part 2: Replace vr controller displayId test with gamepadbuttondown event; r=kip
MozReview-Commit-ID: DSTg2IS407e

--HG--
extra : rebase_source : dba54bda77ff75f1d9e929ae7339b36d38e4e001
2017-07-27 11:25:45 +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
c673ebcff6 Bug 1384865 - Using game pose of OpenVR VRDisplay instead of render pose; r=kip
MozReview-Commit-ID: FXnPBdyVLdE

--HG--
extra : rebase_source : c1788782b6bfd408026b26f4ba2756437c5ce62b
2017-07-27 17:20:58 +08:00
Kearwood Gilbert
21d51ec691 Bug 1310665 - macOS OpenVR Support r=daoshengmu,mattwoodrow
MozReview-Commit-ID: 9CDJpFOcFUB

--HG--
extra : rebase_source : ab1f13bd733a6f295570f58940191b333868a088
extra : source : d527620e9351a04bc70689af6a7369dd09ffeef0
2017-07-04 13:50:40 -07:00
Chih-Yi Leu
47a2617b3f Bug 1381378: Refactor - Isolate gamepad index and GamepadServiceType from GamepadChangeEvent; r=daoshengmu
MozReview-Commit-ID: IFjvDsl6vlY

--HG--
extra : rebase_source : 2b9add020e182acb03c01bd5c55742dc7860625d
2017-07-17 11:44:39 +08:00
Daosheng Mu
3980ed0fd6 Bug 1375816 - Part 4: VRController displayId attribute testcase; r=kip
MozReview-Commit-ID: KkMXsTDRnQO

--HG--
extra : rebase_source : 1bb85ecddfea7695ec310d19a1f4f1f05543a4d6
2017-07-14 17:08:15 +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
Sebastian Hengst
b5972de663 Backed out changeset 498baf1613db (bug 1375816) 2017-07-18 11:48:22 +02:00
Daosheng Mu
f2d37e1ed5 Bug 1375816 - Part 4: VRController displayId attribute testcase; r=kip
MozReview-Commit-ID: KkMXsTDRnQO

--HG--
extra : rebase_source : d4a91a5e8a33de2f65c4c6ce23dab6ccdab13952
2017-07-14 17:08:15 +08: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
8277d4012f Bug 1375816 - Part 4: VRController displayId attribute testcase; r=kip
MozReview-Commit-ID: KkMXsTDRnQO

--HG--
extra : rebase_source : bec4dbe0bc8a791f39cd80444aa5f41da38bbc14
2017-07-14 17:08:15 +08: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
2a221a0a19 Bug 1321275 - Fix reference counting of PVRLayerChild when GPU process has been terminated r=daoshengmu
- In VRManagerChild::DeallocPVRLayerChild, we delete the PVRLayerChild, rather
  than doing proper reference counting on the VRLayerChild object which has
  been deallocated but still referenced by VRDisplayPresentation::mLayers.
  This happens when the GPU process is terminated.

- When the user tries to stop the VR presentation or change the URL,
  PVRLayerChild::SendDestroy is called by VRDisplayPresentation::DestroyLayers.
  This results in the assertion about "invalid actor state".

- This patch fixes this by following the same pattern used by TextureClient
  for its PTextureChild.

MozReview-Commit-ID: 327cdb4s7kl

--HG--
extra : rebase_source : 88847acd39d82f258f0c969e6ef5e22b794f6428
2017-07-12 16:05:40 -07:00
Kearwood "Kip" Gilbert
476b6eb5b0 Bug 1381165 - Ensure that only the first VRDisplay.submitFrame call per VRDisplay RAF callback renders and kicks off the next VR RAF callback. r=daoshengmu
MozReview-Commit-ID: L9qPfr1Jf9o

--HG--
extra : rebase_source : 78367b8efff80b6411fd0a08493742221a18ac26
2017-07-14 16:08:49 -07: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
Tom Ritter
0a440eba9b Bug 1380114 Update OpenVR to build with MinGW r=kip
This involved four commits:
- Windows.h -> windows.h and similar https://github.com/ValveSoftware/openvr/pull/508
- Add a void* cast for a farproc auto-conversion https://github.com/ValveSoftware/openvr/pull/509
- Add share.h https://github.com/ValveSoftware/openvr/pull/510
- Use GCC Variadic Macros https://github.com/ValveSoftware/openvr/pull/511

This is a reapply of Bug 1363173. Hopefully Valve will actually include the patches in the next release.

MozReview-Commit-ID: KC7Z3r8qSUY

--HG--
extra : rebase_source : 7c712bf64cfedd9d895083f8f3111b41850c30ff
2017-05-08 15:29:43 -05: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
Jan Beich
28f774243d Bug 1375693 - Don't build OpenVR on Tier3 due to lack of open source runtime. r=kip
MozReview-Commit-ID: 6GYN5xRSZ2D

--HG--
extra : rebase_source : aea410a33baeef0f2e3ba99b9f27c3cc07f7365c
2017-06-23 04:02:12 +00:00