Commit graph

1012 commits

Author SHA1 Message Date
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
Fernando Jiménez Moreno
6233f78de4 MediaSessionAction message from embedder to script thread 2019-11-20 13:32:10 +01:00
Alan Jeffrey
124de75089 Avoid recompiling script every time surfman changes 2019-11-18 09:40:58 -06:00
Paul Rouget
42ee1a86f6 Properly set event.buttons value on mousemove 2019-11-11 16:00:44 +01:00
Josh Matthews
91dfa354b1 Ensure layout/script always have a correct viewport size when a new pipeline is created. 2019-11-06 16:13:55 -05:00
Josh Matthews
7c365b0324 Centralize definitions of window sizes and DPI in compositor/constellation during startup. 2019-11-06 16:13:55 -05:00
Patrick Walton
a358bca766 Use surfman for managing GL surfaces
Co-authored-by: Alan Jeffrey <ajeffrey@mozilla.com>
Co-authored-by: Zakor Gyula <gyula.zakor@h-lab.eu>
Co-authored-by: Josh Matthews <josh@joshmatthews.net>
2019-11-01 08:47:11 -05:00
Josh Matthews
81a67aed9e Double key image cache by requesting origin, and store CORS status with cached images. 2019-10-04 09:22:21 -04:00
bors-servo
9a4f90bf0c
Auto merge of #24058 - Eijebong:ipc-channel, r=jdm
Update ipc-channel and related dependencies

<!-- Reviewable:start -->
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/24058)
<!-- Reviewable:end -->
2019-08-27 18:40:40 -04:00
Bastien Orivel
92161ecfbc Update ipc-channel and related dependencies 2019-08-27 23:44:04 +02:00
George Roman
f064883e07 Implement pointerMove webdriver action 2019-08-22 10:11:13 +03:00
George Roman
d3696baf27 Implement TakeElementScreenshot WebDriver command 2019-08-20 00:52:46 +03:00
bors-servo
3658a8cc59
Auto merge of #23988 - georgeroman:implement_pointer_up_and_down_actions, r=jdm
Implement pointerDown and pointerUp webdriver actions

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

---
<!-- 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

<!-- 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. -->

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/23988)
<!-- Reviewable:end -->
2019-08-18 12:17:24 -04:00
bors-servo
4094a26183
Auto merge of #23979 - Eijebong:deps-deps-deps, r=jdm
Update webrender, image, png and raqote

This will avoid duping png because of the raqote backend

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/23979)
<!-- Reviewable:end -->
2019-08-16 21:08:58 -04:00
George Roman
225cecf661 Implement pointerDown and pointerUp webdriver actions 2019-08-16 22:08:11 +03:00
Bastien Orivel
138ef57534 Update webrender, image, png and raqote
This will avoid duping png because of the raqote backend
2019-08-16 00:34:22 +02:00
Bastien Orivel
f7411db717 Update toml to 0.5 and cbindgen to 0.9 2019-08-13 13:26:13 +02:00
Emilio Cobos Álvarez
3d57c22e9c Update euclid.
There are a few canvas2d-related dependencies that haven't updated, but they
only use euclid internally so that's not blocking landing the rest of the
changes.

Given the size of this patch, I think it's useful to get this landed as-is.
2019-07-23 23:09:55 +02:00
bors-servo
c57e9bb938
Auto merge of #23770 - matharumanpreet00:update_cursor_on_scroll, r=paulrouget
track and update cursor while scrolling

<!-- Please describe your changes on the following line: -->
This PR follows PR #23313 to fix the issue #12604 by adding a field `cursor_pos: DevicePoint` to `IOCompositor` and adding a `update_cursor()` method. This is based on the improvements suggested by @paulrouget in this [feedback](https://github.com/servo/servo/pull/23313#issuecomment-489017975) comment.

This is my first time contributing to open source, i would love any feedback.

---
<!-- 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 fix #12604 (GitHub issue number if applicable)

<!-- Either: -->
- [ ] There are tests for these changes OR
- [X] These changes do not require tests because they aren't testable, as discussed in the comments on #12604

<!-- 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. -->

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/23770)
<!-- Reviewable:end -->
2019-07-15 02:42:49 -04:00
Manpreet Singh Matharu
83ebb85dbd use update_cursor() in dispatch_mouse_window_move_event_class() method 2019-07-13 11:33:14 -04:00
Manpreet Singh Matharu
a44f795845 track and update cursor while scrolling 2019-07-12 15:52:26 -04:00
Josh Matthews
f1b10393c2 rustfmt 2019-07-09 10:52:43 -04:00
Patrick Walton
e57e2121b2 Get the servo crate building with the new WebRender 2019-07-09 10:51:55 -04:00
Patrick Walton
7915a7099f Fix WebRender churn in compositing 2019-07-09 10:50:28 -04:00