Commit graph

1035 commits

Author SHA1 Message Date
Martin Robinson
2f4c47bfe7 Start the transition to workspace dependencies
This will ultimately make it simpler to update crate dependencies and
reduce duplicate when specifying requirements. Generally, this change
does not touch dependencies that are only used by a single crate. We
could consider moving them to workspace dependencies in the future.
2023-05-17 11:59:35 +02:00
Martin Robinson
edeb24b30f Fix scrolling on root element
eca0acf459 uncovered a bug in the way that
the scrolling area of `window` was calculated and broke scrolling on the
root element. This change does two things in order to fix that:

1. Does a partial revert of eca0acf459 in
   order to get scrolling from script working again on the window
   object.
2. Has the compositor always generate a frame for scrolls starting from
   script and waits for them. This is speculative fix for flakiness in
   root scrolling tests on CI.
2023-05-05 12:42:02 +02:00
Martin Robinson
7a778b2c29 Fix flakiness in hit testing
We need to make sure that hit testing from script reflects the latest display list we have sent from the compositor.
2023-04-26 13:34:58 +02:00
Martin Robinson
6d4b7e7a22 Move hit testing information out of WebRender
Store hit testing information in a data structure that sits alongside
the display list in the compositor. This will allow the compositor to
store more information per-node. The data structure also takes care of
de-duplicating information between successive display list entries. In
the future, the data structure can be even more aggressive in producing
smaller side hit testing lists, if necessary.
2023-03-15 12:25:29 +01:00
Martin Robinson
423cc34cb0 Bump euclid to 0.22
- Also updates raqote to latest with an upgrade of font-kit to 0.11
  applied on as a patch
- Update lyon_geom to the latest version

Major change:

- All matrices are now stored in row major order. This means that
  parameters to rotation functions no longer should be negated.
- `post_...()` functions are now named `then()`. `pre_transform()` is removed,
  so `then()` is used and the order of operations changed.
2023-01-26 08:59:21 +01:00
Josh Matthews
369a5c0370 Update image/png. 2022-04-01 02:07:17 -04:00
Josh Matthews
471650ba90 Update keyboard-types. 2022-04-01 00:35:22 -04:00
Wu Yu Wei
2cffbd7527 Use IpcBytesReceiver to send Display list data 2022-03-10 20:07:59 +08:00
Yu-Wei Wu
34b3dafab8 Add SerializedImageData to use IpcBytesReceiver 2022-03-10 16:05:32 +08:00
Josh Matthews
6b50d7025c Create initial browser id for compositor on startup. 2021-10-18 09:58:32 -04:00
teymour-aldridge
5b2cd844d7
Bump time to latest v0.1.x version. 2021-06-25 17:19:14 +01:00
Josh Matthews
49ddc5ea3d Only request synchronous repaint when a resize will actually occur. 2021-03-05 20:00:30 -05:00
Simon Sapin
a0d9f97c8e Fix warnings introduced in newer Rust Nightly
This does not (yet) upgrade ./rust-toolchain

The warnings:

* dead_code "field is never read"
* redundant_semicolons "unnecessary trailing semicolon"
* non_fmt_panic "panic message is not a string literal, this is no longer accepted in Rust 2021"
* unstable_name_collisions "a method with this name may be added to the standard library in the future"
* legacy_derive_helpers "derive helper attribute is used before it is introduced" https://github.com/rust-lang/rust/issues/79202
2021-02-25 15:36:03 +01:00
YUAN LYU
e15bc7516c Fix mouse button handling 2020-12-06 00:21:21 -05:00
Josh Matthews
91ca74c9be Update webrender. 2020-08-10 13:30:52 -04:00
Josh Matthews
c1920357b0 Revert "Update webrender."
This reverts commit 2ca1b06e77.
2020-08-04 19:15:52 -04:00
Josh Matthews
2ca1b06e77 Update webrender. 2020-07-31 10:42:01 -04:00
Utsav Oza
5fe54b8003 Fix ordering of mousemove event 2020-07-30 16:34:29 +05:30
Josh Matthews
f030162ec3 Make reload button clear the network cache. 2020-07-27 22:34:07 -04:00
bors-servo
8ce3ff656d
Auto merge of #27295 - asajeffrey:gstreamer-webxr, r=Manishearth
Gstreamer plugin support for streaming from webxr

<!-- Please describe your changes on the following line: -->

Allows us to stream webxr video content.

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: -->
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes do not require tests because we don't reftest the gstreamer plugin

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
2020-07-17 17:36:38 -04:00
Alan Jeffrey
50e168a688 Gstreamer plugin support for streaming from webxr 2020-07-16 14:16:32 -05:00
Paul Rouget
6252d36a14 Unfocus input when virtual keyboard is dismissed 2020-07-13 14:04:06 +02:00
Josh Matthews
6843d51a26 Update to 7/6 rustc. 2020-07-06 10:06:06 -04:00
Paul Rouget
7653c6c9fc update keyboard-types crate 2020-06-29 10:27:54 +02:00
Alan Jeffrey
349619ed2d Support for webxr layer management 2020-06-28 16:37:45 -05:00
Josh Matthews
b39955df67 Update webrender. 2020-06-11 14:07:39 -04:00
Josh Matthews
abc689e034 Remove unecessary webrender document from layout. 2020-06-09 13:05:16 -04:00
Josh Matthews
75efaa95f5 Proxy all WR interactions for layout/font/script/canvas threads to the compositor
thread. There is now a single RenderApi that is used, and all transactions are serialized
through the compositor.
2020-06-09 13:05:16 -04:00
atouchet
ede15557ae Some Cargo.toml cleanups 2020-05-13 22:09:56 -07:00
Josh Matthews
8842250033 Update webrender. 2020-05-11 17:41:56 -04:00
Martin Robinson
b585ce5b1f Use a restyle for animation ticks
This change corrects synchronization issues with animations, by
reworking the animation processing model to do a quick restyle and
incremental layout when ticking animations.

While this change adds overhead to animation ticks, the idea is that
this will be the fallback when synchronous behavior is required to
fulfill specification requirements. In the optimistic case, many
animations could be updated and applied off-the-main-thread and then
resynchronized when style information is queried by script.

Fixes #13865.
2020-05-05 15:13:35 +02:00
Alan Jeffrey
8bb1732258 Update surfman to 0.2 and remove glutin 2020-04-17 23:44:53 -05:00
Alan Jeffrey
c611e46381 Remove WebVR 2020-04-08 20:23:41 -05:00
Utsav Oza
2c306227e9 Extract user_agent from global opts 2020-04-06 21:29:58 +05:30
Manish Goregaokar
1ba606b919 Pass context menu callbacks down to the openxr device 2020-03-31 13:42:03 -07:00
bors-servo
b4d7ec1c99
Auto merge of #25855 - jdm:surface-inversion, r=Manishearth,asajeffrey
Remove GL->d3d blit in HoloLens immersive mode

Depends on:
* https://github.com/servo/surfman/pull/151
* https://github.com/asajeffrey/surfman-chains/pull/7
* https://github.com/servo/webxr/pull/133

These changes add two extra APIs for embedders to use when registering a WebXR device - one to allow running any closure as a task in the webgl thread, and one to register an arbitrary surface provider for a particular webxr session. When an openxr session is started, it can then obtain the webgl thread's d3d device from that thread's surfman device and ensure that openxr uses it.

Surface providers are traits that have their methods invoked by the webgl thread as part of the the normal swapchain operations. This allows the openxr surface provider to return surfaces that wrap the underlying openxr textures, which are valid in the webgl thread and can be used as the target of an opaque framebuffer.

---
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #25735
- [x] These changes do not require tests because there are no windows immersive mode tests
2020-03-09 19:58:21 -04:00
Josh Matthews
fbcf2bbc3e Integrate swapchain surface provider changes into webgl and webxr implementations. 2020-03-09 17:50:54 -04:00
bors-servo
ad1a4adac5
Auto merge of #25914 - paulrouget:lessRAF, r=jdm
Stop embedder calls and fake rAF when window not visible

This addresses 2 issues:

- a rAF loop might still be ongoing when the window is invisible if script decided that the rAF were going too fast (spurious rAF)
- a hidden window does not run the rAF loop, but the embedder would still be in animating mode

---
<!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: -->
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [ ] These changes fix #___ (GitHub issue number if applicable)

<!-- Either: -->
- [ ] There are tests for these changes OR
- [ ] These changes do not require tests because ___

<!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.-->

<!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
2020-03-09 11:38:47 -04:00
Anthony Ramine
5a4f8cf93f Update SpiderMonkey 2020-03-06 11:13:28 +01:00
Paul Rouget
21c408e0d5 Stop embedder calls and fake rAF when window not visible 2020-03-06 06:20:11 +01:00
Anthony Ramine
9996e48500 Remove syn 0.15 from our crate graph (fixes #24421)
This required bumps of:

* gleam
* image
* rust-webvr
* webrender
* webxr
2020-03-05 13:01:13 +01:00
bors-servo
be4ecb9233
Auto merge of #25822 - jdm:delay-reftest-async-render, r=emilio
Delay reftest screenshot while WR frame is rendering

This PR addresses the theory that #24726 occurs when WR is performing an async frame render and the reftest screenshot decides it's time to synchronously read the framebuffer. If there have not been any completed frames rendered yet, that would yield the page background colour.

The changes in this PR introduce an additional layer of synchronization - the compositor stores an AtomicBool value that indicates whether we know that a WR frame has started rendering, which is set to true when an IPC request from layout that submits a new display list is received. This bool is set to false when WR notifies us that a frame has been rendered. The screenshot code refuses to take a screenshot if the bool is true, causing us to delay taking a screenshot until there is no frame pending.
2020-02-21 11:54:44 -05:00
Josh Matthews
c21574623f Track outstanding WR frames and delay reftest screenshot when necessary. 2020-02-21 11:19:14 -05:00
bors-servo
c78f0d7449
Auto merge of #25806 - jdm:ipc-up, r=Manishearth
Update ipc-channel and crossbeam-channel

Depends on https://github.com/servo/webxr/pull/130 and https://github.com/servo/media/pull/333.
2020-02-20 18:47:12 -05:00
Josh Matthews
3fd3c23e17 Update ipc-channel and crossbeam-channel. 2020-02-20 11:15:13 -05:00
Paul Rouget
6ddde1a3e1 Stop animations when window is hidden (API + UWP) 2020-02-19 14:10:49 +01:00
Kunal Mohan
8d4aeef08b
move ConstellationMsg to compositing 2020-01-29 23:34:16 +05:30
Paul Rouget
016d9a62ab Do not wake up embedder on each animation tick 2019-12-16 16:50:36 +01:00
Josh Matthews
564c16d754 Use non-IPC webrender API over explicit IPC channels. 2019-11-27 20:47:53 -05:00
Fernando Jiménez Moreno
b048d7faf7 Fix media session action handling 2019-11-20 13:34:29 +01:00