Commit graph

969 commits

Author SHA1 Message Date
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
bors-servo
a2b76b0169
Auto merge of #23707 - servo:jdm-patch-31, r=paulrouget
Ensure GL context is prepared for deinitialization.

I tested shutdown on Windows numerous times before and after this change, and I have not seen any further panics in debug builds in builds with the GL context made active before deinitializing WebRender.

---
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #23706 and fix #23614.
- [x] These changes do not require tests because no tests on windows ;_;

<!-- 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/23707)
<!-- Reviewable:end -->
2019-07-05 04:13:05 -04:00
Josh Matthews
aa41fee181
Ensure GL context is prepared for deinitialization. 2019-07-04 10:07:28 -04:00
Víctor Manuel Jáquez Leal
9f4f9dc750 Add media (WindowGLContext) module in canvas_trait
This module adds a structure (WindowGLContext) which holds the
OpenGL parameters that are going to be used by servo-media player
to render video frames using OpenGL.

In order to fill this structure, three new methods were added to
WindowMethods trait. In this patch only the Glutin-based
implementation provides a simple boilerplate.

The WindowGLContext is created in the entry point of libservo, when
the application window is created, and later passed to the
constellation, the pipeline and to the window element in dom, thus
htmlmediaelement has a mean to obtain these parameters via its
window.
2019-07-04 10:24:01 +02:00
Alan Jeffrey
135ad4a2f4 Use webxr git repo for all webxr dependencies in Cargo.tomls 2019-07-02 18:24:29 -05:00
Alan Jeffrey
91d1b52b38 Initialize a wevxr device registry from Servo 2019-07-02 18:23:56 -05:00
Simon Sapin
1d38bc0419 Fix some new warnings 2019-06-22 14:59:09 +02:00
Alan Jeffrey
0b48ff496f Add Servo3D immersive demo for magicleap 2019-06-13 15:04:05 -05: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
Kamal Umudlu
a8995fbf1a Bug: #22853 - Make Window::set_fullscreen pass a non-None value when entering fullscreen is fixed and SetFullscreenState in exit_fullscreen changed to False
Added patch for bug:22853

Added implementation to exit from fullscreen mode by pressing ESC button

Added patch that supports to exit from fullscreen mode by pressing ESC

Deleted patch files

Added all requested changes on project

Removed the loop over self.pending_changes in switch_fullscreen_mode function

Bug #22853 - Make Window::set_fullscreen pass a non-None value when entering fullscreen is fixed and SetFullscreenState in exit_fullscreen changed to False

Added missing bracket in constellation.rs file to fix build issue

Bug: #22853 --> Make Window::set_fullscreen pass a non-None value when entering fullscreen is fixed and SetFullscreenState in exit_fullscreen changed to False
2019-04-01 18:29:02 -04:00
Gregory Terzian
0780298b80 bound sampler buffer 2019-03-31 20:14:46 +08:00
bors-servo
2e0191b839
Auto merge of #23080 - jdm:sampling-profiler, r=gterzian
Add a sampling profiler

This uses the code already built for the background hang monitor and adds the ability to repeatedly sample all monitored threads. This sampling allows us to generate profiles that we can translate into the format used by https://perf-html.io/, allowing us to benefit from modern Gecko performance tooling.

You can run Servo with `PROFILE_OUTPUT=foo.json` and `SAMPLING_RATE=50` (for example), otherwise these values will default to `samples.json` and 10ms, respectively. To activate the profiler, press cmd+p, and to stop profiling, press cmd+p again. This will the captured samples to be symbolicated, which will take a very long time, and eventually there will be a new JSON profile in the output location.

To create a profile for use by Gecko's tools, run `python etc/profilicate.py path/to/profile.json >gecko_profile.json`, and load `gecko_profile.json` in the https://perf-html.io/ to see something like [this](https://profiler.firefox.com/public/8137e2b11fbb92afb80090bc534fd83015c87ee6/calltree/?globalTrackOrder=0-1&thread=1&v=3);

---
- [x] `./mach build -d` does not report any errors
- [x] `./mach test-tidy` does not report any errors
- [x] These changes fix #13103
- [x] These changes do not require tests because way too many pieces to automate

<!-- 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/23080)
<!-- Reviewable:end -->
2019-03-26 16:36:19 -04:00
Josh Matthews
90f67c11e5 Add a sampling profiler and a script to generate profiles for use with Gecko tooling. 2019-03-26 16:35:08 -04: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
Paul Rouget
ecc11826d2 WR update: dependencies update 2019-03-21 09:34:42 +08:00
Alan Jeffrey
cc2d203151 Use a test VRDisplay that renders to a GL window 2019-03-05 12:54:12 -06:00
Niko Pen
0b8deed28a Move RenderNotifier from compositing to servo 2019-02-28 19:53:54 +05:30
Alan Jeffrey
a062c40567 Allow the embedder to register their own VRServices 2019-02-14 08:36:03 -06:00
Paul Rouget
c055b74e13 Support for ExternalVR implementation 2019-02-07 06:15:11 +01:00
Emilio Cobos Álvarez
90c0ec0cf7 Fix servo build and rustfmt recent changes.
We need to introduce another Cursor enum that is specific to embedder_traits and
that layout converts to to avoid dependency hell.
2019-01-20 16:31:01 +01:00
Josh Matthews
85c1c5ad13 Delete texture when taking a screenshot, not a buffer. 2019-01-17 17:52:36 -05:00
Gregory Terzian
483bf245df constellation: restructure navigation, remove sync comm 2018-12-23 13:33:30 +08:00
Josh Matthews
231a37be24 Initial window sizes are mandatory. 2018-12-14 13:12:46 -05:00
Manish Goregaokar
5413328be2 Update webrender 2018-11-27 17:33:13 -08:00
Anthony Ramine
2c0acf6b9b Move PixelFormat to the pixels crate 2018-11-20 10:14:52 +01:00
Anthony Ramine
faee0b2b0c Rename gleam feature to gl in compositing 2018-11-20 10:14:51 +01:00
Jan Andre Ikenmeyer
1d6fe65401
Update MPL license to https (part 4) 2018-11-19 14:47:27 +01:00
Bastien Orivel
9a7eeb349a Update crossbeam-channel to 0.3 2018-11-18 19:33:19 +01:00
Bastien Orivel
db34ea668a Update image related dependencies 2018-11-18 16:42:42 +01:00
Pyfisch
2143657e03 Use keyboard-types::webdriver::send_keys
This improves the quality of KeyboardEvents
sent by WebDriver. Now key, code, location and
modifiers are set according to spec.
CompositionEvents are discarded as servo
does not handle them at all.
2018-11-11 21:57:45 +01:00
Simon Sapin
9f977c5287 Remove useless use crate_name; imports.
A `crate_name::foo` path always works in 2018
2018-11-08 09:29:52 +01:00