aboutsummaryrefslogtreecommitdiffstats
path: root/components/constellation/pipeline.rs
Commit message (Collapse)AuthorAgeFilesLines
* Rename `gfx` to `fonts` (#32556)Martin Robinson2024-06-191-1/+1
| | | | | | | | | This crate only takes care of fonts now as graphics related things are split into other crates. In addition, this exposes data structures at the top of the crate, hiding the implementation details and making it simpler to import them. Signed-off-by: Martin Robinson <mrobinson@igalia.com> Co-authored-by: Mukilan Thiyagarajan <mukilan@igalia.com>
* compositor: Move WebRender-ish messages and types to `webrender_traits` (#32315)Mukilan Thiyagarajan2024-05-201-4/+4
| | | | | | | | | | | | | | | | | | | | * Move WebRender related types to `webrender_traits` This refactor moves several WebRender related types from `compositing_traits`, `script_traits` and `net_traits` crates to the `webrender_traits` crate. This change also moves the `Image` type and associated function out of `net_traits` and into the `pixels` crate. Co-authored-by: Martin Robinson <mrobinson@igalia.com> Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com> * Move `script_traits::WebrenderIpcSender` to `webrender_traits::WebRenderScriptApi` --------- Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com> Co-authored-by: Martin Robinson <mrobinson@igalia.com>
* Move non-gfx things out of `gfx_traits` and create a `base` crate (#32296)Martin Robinson2024-05-171-6/+8
| | | | | | | | | | | | | | | | | | | | | | | For a long time, `gfx_traits` has held a lot of things unrelated to graphics and also unrelated to the `gfx` crate (which is mostly about fonts). This is a cleanup which does a few things: 1. Move non `gfx` crate things out of `gfx_traits`. This is important in order to prevent dependency cycles with a different integration between layout, script, and fonts. 2. Rename the `msg` crate to `base`. It didn't really contain anything to do with messages and instead mostly holds ids, which are used across many different crates in Servo. This new crate will hold the *rare* data types that are widely used. Details: - All BackgroundHangMonitor-related things from base to a new `background_hang_monitor_api` crate. - Moved `TraversalDirection` to `script_traits` - Moved `Epoch`-related things from `gfx_traits` to `base`. - Moved `PrintTree` to base. This should be widely useful in Servo. - Moved `WebrenderApi` from `base` to `webrender_traits` and renamed it to `WebRenderFontApi`.
* clippy: Allow `too_many_arguments` for existing functions (#31974)eri2024-04-021-2/+1
| | | | | * Allow `too_many_arguments` for existing functions * fix: Surround ASCII with code block in rustdoc
* Rework “visible” to “throttled” in constellation + script + ↵Delan Azabani2024-03-221-13/+14
| | | | compositor (#31816)
* clippy: Fix warnings in `components/constellation` (#31610)eri2024-03-111-17/+21
| | | | | * clippy: fix warnings in components/constellation * fix: review comments
* script: Do not run layout in a thread (#31346)Martin Robinson2024-02-231-70/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * script: Do not run layout in a thread Instead of spawning a thread for layout that almost always runs synchronously with script, simply run layout in the script thread. This is a resurrection of #28708, taking just the bits that remove the layout thread. It's a complex change and thus is just a first step toward cleaning up the interface between script and layout. Messages are still passed from script to layout via a `process()` method and script proxies some messages to layout from other threads as well. Big changes: 1. Layout is created in the script thread on Document load, thus every live document is guaranteed to have a layout. This isn't completely hidden in the interface, but we can safely `unwrap()` on a Document's layout. 2. Layout configuration is abstracted away into a LayoutConfig struct and the LayoutFactory is a struct passed around by the Constellation. This is to avoid having to monomorphize the entire script thread for each layout. 3. Instead of having the Constellation block on the layout thread to figure out the current epoch and whether there are pending web fonts loading, updates are sent synchronously to the Constellation when rendering to a screenshot. This practically only used by the WPT. A couple tests start to fail, which is probably inevitable since removing the layout thread has introduced timing changes in "exit after load" and screenshot behavior. Co-authored-by: Josh Matthews <josh@joshmatthews.net> * Update test expectations * Fix some issues found during review * Clarify some comments * Address review comments --------- Co-authored-by: Josh Matthews <josh@joshmatthews.net>
* Strict import formatting (grouping and granularity) (#30325)Samson2023-09-111-24/+19
| | | | | * strict imports formatting * Reformat all imports
* remove `extern crate` (#30311)Samson2023-09-081-0/+2
| | | | | | | | | | | * remove extern crate * Update components/script_plugins/lib.rs Co-authored-by: Martin Robinson <mrobinson@igalia.com> --------- Co-authored-by: Martin Robinson <mrobinson@igalia.com>
* [NFC] compositing: extract types into new compositing_traits crate (#30125)Delan Azabani2023-08-181-3/+3
| | | | | | | | | | | * [NFC] compositing: extract types into new compositing_traits crate * [NFC] compositing: move InitialCompositorState back to compositing * [NFC] compositing: rename Msg to CompositorMsg * [NFC] compositing: revert changes to Cargo.toml features section * [NFC] compositing: merge imports
* Remove `EventLoopWaker` from Constellation (#30101)Atbrakhi2023-08-151-7/+1
| | | | | | | | | | | | | * remove event_loop_waker that is always None * remove None event_loop_waker form InitialScriptState * fix formatting * remove None event_loop_waker from ScriptThread * remove None EventLoopWaker from Window * remove None and use of wake_after_send in webgl code
* Try to `use` WebRender types moreMartin Robinson2023-07-101-2/+3
| | | | | The newer versions of WebRender move types around between `webrender` and `webrender_api` and this will reduce the churn during the upgrade.
* Make sender and receiver name more coherentatbrakhi2023-05-081-27/+28
|
* Clean up arguments passed to ScriptThreadMartin Robinson2023-05-011-11/+0
|
* Clean up arguments passed to and stored in LayoutThreadMartin Robinson2023-05-011-9/+0
|
* Clean up debug optionsMartin Robinson2023-05-011-11/+11
|
* Add creation url and Secure ContextsJonathan Kingston2020-11-251-0/+1
|
* devtools: Treat session history traversal like a navigation.Josh Matthews2020-08-101-0/+4
|
* ensure clean shutdown of all threads running JSGregory Terzian2020-06-301-43/+32
|
* Remove unecessary webrender document from layout.Josh Matthews2020-06-091-1/+0
|
* reading unminified scripts from diskskrzyp12020-06-021-0/+1
|
* Remove WebVRAlan Jeffrey2020-04-081-7/+0
|
* Extract user_agent from global optsUtsav Oza2020-04-061-1/+7
|
* allow for a service worker manager per originGregory Terzian2020-04-051-146/+4
|
* Make Background Hang Monitor OptionalKunal Mohan2020-02-231-19/+32
| | | | | | This is done by wrapping all channels of communication and related objects inside Option which are configured using flag inside servo_config.
* Update ipc-channel and crossbeam-channel.Josh Matthews2020-02-201-1/+1
|
* Only start WebGPU thread if an adapter is requestedZakor Gyula2020-01-131-7/+0
|
* Do not wake up embedder on each animation tickPaul Rouget2019-12-161-3/+5
|
* Use non-IPC webrender API over explicit IPC channels.Josh Matthews2019-11-271-3/+8
|
* Initial implementation of WebGPU APIZakor Gyula2019-11-211-0/+7
|
* Centralize definitions of window sizes and DPI in compositor/constellation ↵Josh Matthews2019-11-061-22/+4
| | | | during startup.
* Extract device_pixels_per_px from global optsglowe2019-10-261-1/+7
| | | | | This is also an embedder specific option, so removing it from the global options makes sense.
* introduce a pipeline namespace installerGregory Terzian2019-08-211-4/+16
|
* restructure content process shutdown ack with threaded sender, without layoutGregory Terzian2019-08-171-20/+7
|
* Remove extra webgl message pumping thread.Josh Matthews2019-07-251-1/+11
|
* Update euclid.Emilio Cobos Álvarez2019-07-231-3/+3
| | | | | | | | 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.
* Auto merge of #23368 - gterzian:clean_up_navigation, r=asajeffreybors-servo2019-07-181-5/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Clean-up navigation <!-- Please describe your changes on the following line: --> 1. Navigation as a result of following a hyperlink should be done in a task: https://html.spec.whatwg.org/multipage/links.html#following-hyperlinks:dom-manipulation-task-source 2. The javascript url navigation should also be done in a task: https://html.spec.whatwg.org/multipage/browsing-the-web.html#navigating-across-documents:dom-manipulation-task-source 3. In `window.load_url`, it seems there is no need to send a message to the script-thread(the entirety of `load_url` should instead be done in a task when appropriate), so we can just do that last part "sync" by calling a method on the script, which will send a message to the constellation(for the parallel navigation steps), or queue task(for the JS navigation), as appropriate. 4. Separate the "normal" navigation flow from the handling of "navigate an iframe" message from constellation, since doing everything in one method as was previously done with `handle_navigate`, is confusing. --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: --> - [ ] `./mach build -d` does not report any errors - [ ] `./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. --> <!-- 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/23368) <!-- Reviewable:end -->
| * clean-up navigationGregory Terzian2019-07-181-5/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | security: check target and source origin before executing JS url implement replacement-enabled flag as a HistoryEntryReplacement enum add source origin string on loaddata add LoadOrigin iframe: remove optional load-data auxiliaries: add load-data into info constellation: remove url from Pipeline::new check load origin: link to whatwg issue switch loadorigin toplevel to constellation
* | Final tweaks: use expect and remove unnecessary crate attributesFernando Jiménez Moreno2019-07-041-1/+1
| |
* | Media crateFernando Jiménez Moreno2019-07-041-1/+1
| |
* | Add media (WindowGLContext) module in canvas_traitVíctor Manuel Jáquez Leal2019-07-041-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | Use webxr IPC to get a WebXR device registry to each script threadAlan Jeffrey2019-07-031-0/+6
| |
* | Script: removed a few opts::get()oneturkmen2019-06-261-0/+11
| |
* | Fix some new warningsSimon Sapin2019-06-221-3/+5
| |
* | No multiprocess on win arm64.Josh Matthews2019-06-111-1/+5
|/
* Layout_thread: removed all possible opts::get()oneturkmen2019-06-041-0/+11
|
* Constellation: removed almost all opts::getoneturkmen2019-06-031-1/+1
|
* Measure layout queries blocked by ongoing layoutPhilipp Albrecht2019-04-131-0/+4
|
* Auto merge of #23080 - jdm:sampling-profiler, r=gterzianbors-servo2019-03-261-14/+35
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 -->
| * Support multiprocess in sampling profiler.Josh Matthews2019-03-261-12/+33
| |