Commit Graph

744 Commits

Author SHA1 Message Date
Imanol Fernandez
0c20e550e5 Bug 1655006 - Implement WebXR nativeFramebufferScaleFactor. r=jgilbert,kip,daoshengmu
Clamp the requested XRWebGLLayer framebuffer size to ensure it's not too small to see or larger than the max native resolution.

Differential Revision: https://phabricator.services.mozilla.com/D84799
2020-07-29 10:00:53 +00:00
Olli Pettay
bccd166233 Bug 1654088, make WindowWatcher methods to use CStrings and not char and make window.open throw the correct exception, r=farre,geckoview-reviewers,agi*
Differential Revision: https://phabricator.services.mozilla.com/D84604
2020-07-27 21:36:24 +00:00
Simon Giesecke
fea9dab7f2 Bug 1651714 - Reduce expensive includes for TabMessageUtils.h. r=smaug
With these changes, on my Linux analysis with ClangBuildAnalyzer, the
top two expensive headers, DOMTypes.h and TabMessageUtils.h are no longer
among the 30 most expensive headers.

Differential Revision: https://phabricator.services.mozilla.com/D82935
2020-07-15 13:24:20 +00:00
Daosheng Mu
9bc29112b7 Bug 1650714 - Part 4: Adjust OpenVR and OculusVR rotate transform. r=kip
Depends on D83008

Differential Revision: https://phabricator.services.mozilla.com/D83174
2020-07-10 21:52:57 +00:00
Daosheng Mu
088f996216 Bug 1650714 - Part 1: Correct Matrix Decompose and SetRotationFromQuaternion. r=kip,imanol,lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D82391
2020-07-10 22:01:11 +00:00
Jean-Yves Avenard
e1424a9e65 Bug 1649977 - Use a nsThread for the VRService. r=kip
The logic was apparently initially copied from the compositor thread which too got migrated to nsThread in bug 1634253, so we re-use that same logic again.

This allows to remove all use of the Google's MessageLoop.

Differential Revision: https://phabricator.services.mozilla.com/D81974
2020-07-03 02:52:05 +00:00
Jean-Yves Avenard
8fd158d479 Bug 1649684 - Use the current nsISerialEventTarget with the various process hosts. r=nika
In all those cases, the current nsISerialEventTarget is either the main thread or the MessageChannel's nsISerialEventTarget (since bug 1634846)

Differential Revision: https://phabricator.services.mozilla.com/D81966
2020-07-02 22:59:24 +00:00
Simon Giesecke
cd8b8939b9 Bug 1648010 - Replace uses of NS_LITERAL_STRING/NS_LITERAL_CSTRING macros by _ns literals. r=geckoview-reviewers,jgilbert,agi,hsivonen,froydnj
Differential Revision: https://phabricator.services.mozilla.com/D80860
2020-07-01 08:29:29 +00:00
Sylvestre Ledru
68e6f06c65 Bug 1649071 - Replace the DISALLOW_COPY_AND_ASSIGN & DISALLOW_EVIL_CONSTRUCTORS macros with = delete; r=froydnj
Generated with:
./mach static-analysis check --checks="-*, modernize-replace-disallow-copy-and-assign-macro" --fix -j 10 <file>
and
./mach clang-format -p <file>
(as clang-apply-replacement doesn't reformat the change)

(with ~/.mozbuild/clang-tools/clang-tidy/bin/clang-tidy pointing to clang-tidy 11)

Differential Revision: https://phabricator.services.mozilla.com/D81489
2020-06-29 14:37:56 +00:00
Daosheng Mu
16ae869cfe Bug 1636011 - Remove FxR PC installation probes. r=kip,thomasmo,chutten
We don't need these telemetry in Gecko now because we are working on it with Glean.

Differential Revision: https://phabricator.services.mozilla.com/D80116
2020-06-24 17:29:45 +00:00
Andrew McCreight
01610277f9 Bug 1647795 - Remove some uses of "blacklist" from dom/ipc/. r=nika
Differential Revision: https://phabricator.services.mozilla.com/D80694
2020-06-23 17:50:23 +00:00
Jean-Yves Avenard
8d2ff29220 Bug 1647133 - P4. Use nsISerialEventTarget where it's actually that. r=mattwoodrow
We are here, always actually dealing with the compositor thread, with the exception of VRDisplayPresentation which is passing  the main thread.

Depends on D80422

Differential Revision: https://phabricator.services.mozilla.com/D80423
2020-06-22 09:38:34 +00:00
Imanol Fernandez
cc77358c6f Bug 1646073 - Enable WebGL SwapChain pooling on Android. Use a separate SwapChain for WebVR. r=jgilbert
- Enable WebGL SwapChain pooling on Android. Creating and releasing Android Surfaces every frame causes a big performance hit due to AndroidSurface slow destructors bug.
- Add a separate SwapChain for WebVR. We are already using separate SwapChains for WebXR (WebGLFramebuffer::mOpaqueSwapChain) but not for WebVR (it uses the canvas backbuffer).

Differential Revision: https://phabricator.services.mozilla.com/D79840
2020-06-17 18:56:16 +00:00
Sylvestre Ledru
85c05f3a47 Bug 1519636 - Reformat recent changes to the Google coding style r=andi
# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D79795
2020-06-16 14:37:23 +00:00
Jeff Gilbert
fac855a09e Bug 1632249 - Determine webgl's layers::TextureType in Present. r=lsalzman
Differential Revision: https://phabricator.services.mozilla.com/D79617
2020-06-15 18:26:14 +00:00
Jeff Gilbert
fd44ed35e8 Bug 1632249 - WebXR compositing fixes. r=imanol
Differential Revision: https://phabricator.services.mozilla.com/D78117
2020-06-15 18:25:58 +00:00
Jeff Gilbert
a97c615de2 Bug 1632249 - Support compositing out-of-process WebGL. r=handyman,lsalzman,nical,geckoview-reviewers,agi,imanol
* Majorly simplity CanvasRenderer
* Replace GLScreenBuffer with trivial GLSwapChain
* Use descriptor structs so that future SharedSurface changes aren't so painful
  to propagate
* Mortgage/strip out more OffscreenCanvas code for now

Differential Revision: https://phabricator.services.mozilla.com/D75055
2020-06-15 18:25:55 +00:00
Kearwood Gilbert
8584903f39 Bug 1644579 - Allow VR backends to be enabled and disabled without restarting. Ensure that all other backends are disabled when the VR puppet is enabled. r=daoshengmu
Differential Revision: https://phabricator.services.mozilla.com/D78993
2020-06-10 19:04:19 +00:00
Dorel Luca
255f146f14 Backed out 7 changesets (bug 1632249) for Gtest perma chrash in [@ mozilla::BlockingResourceBase::CheckAcquire()]. CLOSED TREE
Backed out changeset 4ff99aab3ee8 (bug 1632249)
Backed out changeset d5b7fe789001 (bug 1632249)
Backed out changeset 64fbb616a0f3 (bug 1632249)
Backed out changeset 6f19f43e0a0b (bug 1632249)
Backed out changeset 073302d26c5e (bug 1632249)
Backed out changeset 7c94d37c446e (bug 1632249)
Backed out changeset 204b899f436d (bug 1632249)
2020-06-11 19:44:20 +03:00
Jeff Gilbert
06fa957778 Bug 1632249 - WebXR compositing fixes. r=imanol
Differential Revision: https://phabricator.services.mozilla.com/D78117
2020-06-11 06:37:36 +00:00
Jeff Gilbert
cf3c8fedea Bug 1632249 - Support compositing out-of-process WebGL. r=handyman,lsalzman,nical,geckoview-reviewers,agi,imanol
* Majorly simplity CanvasRenderer
* Replace GLScreenBuffer with trivial GLSwapChain
* Use descriptor structs so that future SharedSurface changes aren't so painful
  to propagate
* Mortgage/strip out more OffscreenCanvas code for now

Differential Revision: https://phabricator.services.mozilla.com/D75055
2020-06-11 06:37:35 +00:00
Mihai Alexandru Michis
59ad7ed333 Backed out 6 changesets (bug 1632249) for causing bustages in CanvasRenderingContext2D.cpp
CLOSED TREE

Backed out changeset c93972b05d4f (bug 1632249)
Backed out changeset 04f5127c85d5 (bug 1632249)
Backed out changeset b15d91e64a25 (bug 1632249)
Backed out changeset 71ad2ed8e9ba (bug 1632249)
Backed out changeset 6e9a89ead3a5 (bug 1632249)
Backed out changeset dd00e2da3a0f (bug 1632249)
2020-06-11 02:43:35 +03:00
Jeff Gilbert
28d2828abe Bug 1632249 - WebXR compositing fixes. r=imanol
Differential Revision: https://phabricator.services.mozilla.com/D78117
2020-06-10 22:21:04 +00:00
Jeff Gilbert
9b09e54345 Bug 1632249 - Support compositing out-of-process WebGL. r=handyman,lsalzman,nical,geckoview-reviewers,agi,imanol
* Majorly simplity CanvasRenderer
* Replace GLScreenBuffer with trivial GLSwapChain
* Use descriptor structs so that future SharedSurface changes aren't so painful
  to propagate
* Mortgage/strip out more OffscreenCanvas code for now

Differential Revision: https://phabricator.services.mozilla.com/D75055
2020-06-10 22:21:02 +00:00
Daosheng Mu
47c6c14def Bug 1643514 - Avoid requesting VR display when it already completed. r=kip,imanol
Differential Revision: https://phabricator.services.mozilla.com/D78437
2020-06-10 00:57:26 +00:00
Daosheng Mu
d9e2924e6f Bug 1643514 - Clean up VRManager usage. r=kip,jrmuizel
Differential Revision: https://phabricator.services.mozilla.com/D78436
2020-06-10 01:26:52 +00:00
Kearwood Gilbert
f1e15241c4 Bug 1555188 - Enable PuppetVRSession to work when VR process is enabled r=thomasmo
Differential Revision: https://phabricator.services.mozilla.com/D72059
2020-06-08 23:57:27 +00:00
Dorel Luca
7289b66d6f Backed out 4 changesets (bug 1632249) for Build bustages and mda failures. CLOSED TREE
Backed out changeset cdaa8a4e9e36 (bug 1632249)
Backed out changeset 9ff26bcc580c (bug 1632249)
Backed out changeset 16d84439756f (bug 1632249)
Backed out changeset bbfe23c61add (bug 1632249)
2020-06-09 03:19:48 +03:00
Jeff Gilbert
8d174dfafc Bug 1632249 - WebXR compositing fixes. r=imanol
Differential Revision: https://phabricator.services.mozilla.com/D78117
2020-06-08 20:36:14 +00:00
Jeff Gilbert
de6377896c Bug 1632249 - Support compositing out-of-process WebGL. r=handyman,lsalzman,nical,geckoview-reviewers,agi,imanol
* Majorly simplity CanvasRenderer
* Replace GLScreenBuffer with trivial GLSwapChain
* Use descriptor structs so that future SharedSurface changes aren't so painful
  to propagate
* Mortgage/strip out more OffscreenCanvas code for now

Differential Revision: https://phabricator.services.mozilla.com/D75055
2020-06-08 20:34:15 +00:00
Andrew McCreight
dac77169a3 Bug 1639398 - Only create VRManager in processes where it can be used. r=daoshengmu,kip
This avoids about 77kb of content process overhead.

Differential Revision: https://phabricator.services.mozilla.com/D78054
2020-06-04 21:22:33 +00:00
Jean-Yves Avenard
ea9d7ebf6f Bug 1640009 - Hold a reference to VRManager singleton for the duration of the parent shutdown. r=sotaro
Differential Revision: https://phabricator.services.mozilla.com/D77205
2020-05-28 07:32:57 +00:00
thomasmo
76400f97fe Bug 1637410 - Update OpenVR to 1.11.11 r=kip,daoshengmu
This change updates mozilla-central's copy of the files for the OpenVR lib built into xul.dll from
  https://github.com/ValveSoftware/openvr
from version 1.0.17 to 1.11.11.

Differential Revision: https://phabricator.services.mozilla.com/D74965
2020-05-27 21:16:57 +00:00
Aaron Klotz
51e92c23de Bug 1637452: Part 14 - Fix JNI includes in gfx; r=gfx-reviewers,jrmuizel
In this bug we're moving away from monolithic JNI headers to class-specific
headers so that we don't have to rebuild the world every time we make a change
to a JNI interface.

Differential Revision: https://phabricator.services.mozilla.com/D75377
2020-05-15 17:05:59 +00:00
Imanol Fernandez
cee36f038b Bug 1636456 - Implement WebXR idle deadline detection r=kip,daoshengmu,smaug,rbarker
Gecko Idle detection relies heavily on RefreshDriver. GC/CC scheduling, including when to run GC or CC slices, and the length of the slices, is mostly based on idle time. As WebXR isn't using normal RefreshDriver, the content process thinks it's idle and GC and CC get basically up to 50 ms slices.

Not having WebXR idle detection is causing stutter frames during immersive presentation. This patch implements idle deadline hint and sets the correct GC slices budgets during WebXR presentation.

Differential Revision: https://phabricator.services.mozilla.com/D74426
2020-05-13 22:10:27 +00:00
Imanol Fernandez
5f933b0485 Bug 1637380 - Update WebXR input sources before dispatching RAF r=daoshengmu,kip
WebVR and WebXR gamepad pose data is updated after the RAF and not before. This adds a extra frame of latency for the input because JavaScript will not use the latest value.

Differential Revision: https://phabricator.services.mozilla.com/D74924
2020-05-13 20:39:50 +00:00
Daosheng Mu
5bcf3637b6 Bug 1635872 - Add telemetry to measure usage of WebVR and WebXR. r=kip
Differential Revision: https://phabricator.services.mozilla.com/D74178
2020-05-13 18:17:41 +00:00
Jean-Yves Avenard
912e294406 Bug 1634253 - P6. Remove MessageLoop use from gfx. r=kats,mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D73825
2020-05-08 20:20:44 +00:00
Chris Fronk
af8a02cc9d Bug 1512991 - Add JsonWriteFunc::Write to take string length. r=botond
Differential Revision: https://phabricator.services.mozilla.com/D72560
2020-05-08 16:24:31 +00:00
Narcis Beleuzu
58a833221c Backed out 9 changesets (bug 1634253) for bc failures on browser_bug295977_autoscroll_overflow.js . CLOSED TREE
Backed out changeset d41b75c1f7ec (bug 1634253)
Backed out changeset 5f8a1ee17b81 (bug 1634253)
Backed out changeset 43eda078b405 (bug 1634253)
Backed out changeset e98212a74709 (bug 1634253)
Backed out changeset 855e222ceb14 (bug 1634253)
Backed out changeset 9f01acdf4367 (bug 1634253)
Backed out changeset ea62cb1ec472 (bug 1634253)
Backed out changeset fa3e7588e7d6 (bug 1634253)
Backed out changeset 139e7035e736 (bug 1634253)
2020-05-08 23:09:31 +03:00
thomasmo
59be1c47cd Bug 1635608 - Update OpenVR source code to use Unix line endings r=daoshengmu
This change simply changes line endings to make diffing easier with updates from OpenVR, which have Unix line endings.
Further, .clang-format-ignore, does not seem to work for wildcard to match a directory and subdirectory, so all files are listed individually.

Differential Revision: https://phabricator.services.mozilla.com/D74100
2020-05-07 20:20:39 +00:00
Jean-Yves Avenard
f304da03ac Bug 1634253 - P6. Remove MessageLoop use from gfx. r=kats,mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D73825
2020-05-07 08:04:53 +00:00
Dorel Luca
9340fa2b2d Backed out 11 changesets (bug 1635001, bug 1634253) for Browser-chrome failures in browser_bug295977_autoscroll_overflow.js
Backed out changeset c3c27cb46db6 (bug 1635001)
Backed out changeset 6cea251e5910 (bug 1635001)
Backed out changeset 3cb0a05be7fc (bug 1635001)
Backed out changeset 1cbb2866a3ad (bug 1634253)
Backed out changeset 53fd00dcf95c (bug 1634253)
Backed out changeset e3acd9db7065 (bug 1634253)
Backed out changeset 5c0b7aa99406 (bug 1634253)
Backed out changeset dc7e17f772be (bug 1634253)
Backed out changeset 6e47af64396a (bug 1634253)
Backed out changeset 8865de9ae0ef (bug 1634253)
Backed out changeset 6fac93b596c2 (bug 1634253)
2020-05-07 11:00:04 +03:00
Jean-Yves Avenard
96d7622823 Bug 1634253 - P6. Remove MessageLoop use from gfx. r=kats,mattwoodrow
Differential Revision: https://phabricator.services.mozilla.com/D73825
2020-05-07 05:03:42 +00:00
Simon Giesecke
612625f997 Bug 1626570 - Improve handling of copying arrays in gfx/vr/. r=kip
Differential Revision: https://phabricator.services.mozilla.com/D73674
2020-05-06 11:55:46 +00:00
Daosheng Mu
540b9db4a6 Bug 1634808 - Revert Oculus Go controller transform for WebVR. r=kip
Differential Revision: https://phabricator.services.mozilla.com/D73515
2020-05-02 00:13:34 +00:00
Sylvestre Ledru
34acbb653a Bug 1619165 - Reformat recent changes to the Google coding style r=andi
First reformat with clang-format 10

# ignore-this-changeset

Differential Revision: https://phabricator.services.mozilla.com/D68802
2020-04-25 09:40:08 +00:00
Simon Giesecke
2d8c4390b7 Bug 1628715 - Part 15: Replace MOZ_NONNULL_RETURN by returning NotNull<elem_type*>. r=xpcom-reviewers,necko-reviewers,dragana,nika
Differential Revision: https://phabricator.services.mozilla.com/D71300
2020-04-24 13:35:27 +00:00
Daosheng Mu
2b669b7fa8 Bug 1631635 - Implement IsPositionEmulated for XRInputSource. r=kip,imanol
Differential Revision: https://phabricator.services.mozilla.com/D71678
2020-04-21 11:17:34 +00:00
Daosheng Mu
dd93d56fc0 Bug 1630739 - Invert Quest and Focus Plus controller rotation matrix for remapping. r=kip
Differential Revision: https://phabricator.services.mozilla.com/D71215
2020-04-16 21:36:05 +00:00