Commit graph

137 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
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
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
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
Paul Rouget
21ed7653f4 Refactoring of the Glutin port in preparation of the compositor refactoring. 2019-04-29 10:04:51 +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
4dcee2f36c WR update: new viewport semantic 2019-03-22 15:41:48 +08:00
Alan Jeffrey
cc2d203151 Use a test VRDisplay that renders to a GL window 2019-03-05 12:54:12 -06:00
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
Gregory Terzian
483bf245df constellation: restructure navigation, remove sync comm 2018-12-23 13:33:30 +08:00
Manish Goregaokar
5413328be2 Update webrender 2018-11-27 17:33:13 -08: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
Simon Sapin
2012be4a8b cargo fix --edition-idioms 2018-11-08 09:28:00 +01:00
Pyfisch
9e92eb205a Reorder imports 2018-11-06 22:35:07 +01:00
Paul Rouget
d6b41ba67d remove useless arguments from prepare_for_composite 2018-10-30 07:51:38 +01:00
Pyfisch
0ccaa7e1a9 Use keyboard-types crate
Have embedders send DOM keys to servo and use a strongly typed KeyboardEvent
from the W3C UI Events spec. All keyboard handling now uses the new types.

Introduce a ShortcutMatcher to recognize key bindings. Shortcuts are now
recognized in a uniform way.

Updated the winit port.
Updated webdriver integration.

part of #20331
2018-10-07 22:39:00 +02:00
Paul Rouget
ec6cc56299 Let the clipboard crate handle the lack of clipboard support 2018-09-12 11:24:55 +02:00
Gregory Terzian
e784f5a9f7 Refactor embedder NewBrowser flow 2018-08-11 01:13:11 +02:00
Gregory Terzian
d438240772 move msg to embedder_traits, use in script, handle send error in embedder 2018-05-23 21:45:57 +08:00
Dzmitry Malyshau
7fa295d8e6 Make gleam optional for compositor, switch various names from glutin to winit 2018-04-18 22:40:47 -04:00
Paul Rouget
5e33dcd29d forward EmbedderMsg to embedder 2018-03-22 07:56:51 +01:00
Paul Rouget
10abe03948 Reduce the number of calls to the embedder by grouping the screen and window coordinates into one structure 2018-03-22 07:56:50 +01:00
bors-servo
fc90e613d8
Auto merge of #20071 - paulrouget:typedsize, r=glennw
Use typed coordinates more

Requires https://github.com/servo/servo/pull/19895

We use Size2D and Point2D across compositing, constellation and script, loosing the type of pixels we use (DevicePixel, DeviceIndepententPixel or CSSPixel) along the way, which might lead to bugs like `window.outerHeight` not taking into account the page zoom (using DeviceIndepententPixel instead of CSSPixel).

This should make the situation a bit better.

---
<!-- 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
- [x] These changes do not require tests because we can't zoom in a test

<!-- 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/20071)
<!-- Reviewable:end -->
2018-03-16 17:18:24 -04:00
OJ Kwon
7b0beedf3d
feat(windowevent): expose CaptureWebRender event 2018-03-16 10:19:23 -07:00
Paul Rouget
fef0506269 remove WindowMethods::size() 2018-03-16 14:58:17 +08:00
Paul Rouget
e25dd45139 alias some euclid types 2018-03-16 14:34:29 +08:00
Paul Rouget
ac4614d6ce Use typed coordinates.
We use Size2D and Point2D across compositing, constellation and script,
losing the type of pixels we use (DevicePixel, DeviceIndepententPixel
or CSSPixel) along the way, which might lead to bugs like
window.outerHeight not taking into account the page zoom (using
DeviceIndepententPixel instead of CSSPixel).
2018-03-16 14:34:29 +08:00
Paul Rouget
ee25413c0f report panic to embedder 2018-02-13 09:40:08 +01:00
Paul Rouget
e7c754fb64 remove forcetouch support 2018-02-11 08:02:39 +01:00
Igor Gutorov
4ee9eb8563 style: Move cursor property out of mako 2018-01-20 19:06:29 +02:00
Simon Sapin
e17697fb0e Update euclid, azure, skia, offscreen_gl_context, plane-split, webrender 2017-12-08 14:32:28 +01:00
Shing Lyu
c120234f0e Enable screen.availHeight/availWidth/Height/Width 2017-11-13 21:32:10 +01:00
Paul Rouget
8a219e8a81 do not pass new size to Resize event 2017-11-07 10:27:24 +01:00
Clément DAVID
c5fe235112 order derivable traits lists
Ignoring :
 - **generated**.rs
 - python/tidy/servo_tidy_tests/rust_tidy.rs
2017-08-23 21:38:44 +02:00
bors-servo
5b4c9c7c77 Auto merge of #18181 - paulrouget:close_browser, r=cbrewster
Make it possible to close a browsing context from the embedder

<!-- 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
- [x] These changes fix #18006 (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. -->

<!-- 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/18181)
<!-- Reviewable:end -->
2017-08-23 03:55:27 -05:00