Commit graph

526 commits

Author SHA1 Message Date
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
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
Utsav Oza
5fe54b8003 Fix ordering of mousemove event 2020-07-30 16:34:29 +05:30
Alan Jeffrey
50e168a688 Gstreamer plugin support for streaming from webxr 2020-07-16 14:16:32 -05: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
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
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
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
Josh Matthews
c21574623f Track outstanding WR frames and delay reftest screenshot when necessary. 2020-02-21 11:19:14 -05:00
Kunal Mohan
8d4aeef08b
move ConstellationMsg to compositing 2020-01-29 23:34:16 +05:30
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
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
George Roman
225cecf661 Implement pointerDown and pointerUp webdriver actions 2019-08-16 22:08:11 +03: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
Patrick Walton
ae42048540 A few fixes to the compositor for WebRender 2019-07-09 10:50:28 -04:00
Patrick Walton
2f9c9cefdb WebRender units are no longer reexported. 2019-07-09 10:50:27 -04:00
Alan Jeffrey
e9d410d0ab Support WebXR devices with main thread affinity 2019-07-05 14:02:49 -05:00
Josh Matthews
aa41fee181
Ensure GL context is prepared for deinitialization. 2019-07-04 10:07:28 -04:00
Robert Snakard
35bca991ad Implement WheelEvent Interface
Note: The WheelEvent interface supports rotation in all 3 spatial
dimensions. This implementation only supports two due to limitations
in the Glutin compositor.

The wheelevent interface is a dom interface that triggers for any
attached device that can rotate in one or more spatial dimensions.
Traditionally this is the mouse wheel though other devices could be
used as well. E.g. the trackball on a trackball mouse.
2019-06-09 13:25:01 -04:00
oneturkmen
3c0c10454b Make prepare_for_composite return void 2019-06-05 00:35:14 -06:00
bors-servo
6924024f0a
Auto merge of #23497 - jdm:windows-resize, r=asajeffrey
Fix behaviour of window resizing on Windows.

This makes Windows builds usable when the window is resized.

---
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #23489
- [x] These changes do not require tests because we can't run tests on Windows CI yet.

<!-- 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/23497)
<!-- Reviewable:end -->
2019-06-04 15:10:56 -04:00
oneturkmen
1819453ba2 compositing: removed opts-get 2019-06-01 13:54:57 -06:00
Josh Matthews
4c0afcea97 Fix behaviour of window resizing on Windows. 2019-06-01 14:40:07 -04:00
George Roman
be3cb00c77 Implement MouseEvent buttons attribute 2019-05-16 10:59:20 +03:00
Paul Rouget
21ed7653f4 Refactoring of the Glutin port in preparation of the compositor refactoring. 2019-04-29 10:04:51 +02:00
Paul Rouget
7858ede29f Update SetCursor behavior 2019-04-25 09:39:16 +02:00
Paul Rouget
5f5a3393eb call window.gl() once 2019-04-07 09:03:52 +02:00
Paul Rouget
8f2390fdff Add transparent padding around ServoSurface 2019-03-25 19:01:39 +01:00
Paul Rouget
a1a20ee516 WR update: draw background before rendering 2019-03-22 15:41:48 +08:00
Paul Rouget
4dcee2f36c WR update: new viewport semantic 2019-03-22 15:41:48 +08:00