aboutsummaryrefslogtreecommitdiffstats
path: root/components/shared/compositing/Cargo.toml
Commit message (Collapse)AuthorAgeFilesLines
* layout: Report memory usage for fragment and box trees. (#36553)Josh Matthews3 days1-0/+2
| | | | | | | | | | | | Add memory reporter integration for the fragment and box trees that are persisted in the layout thread. Testing: Looked at the numbers for https://servo.org and https://html.spec.whatwg.org/. The former was very small, but the latter was 700mb. --------- Signed-off-by: Josh Matthews <josh@joshmatthews.net>
* compositing: Add memory reporter for WebRender. (#36557)Josh Matthews6 days1-0/+1
| | | | | | | | | | This adds a memory reporter for WebRender's memory usage. I seeded it with a couple entries that looked reasonable based on https://searchfox.org/mozilla-central/rev/2c71f1e9b5947612abdc16b64008162c58c1b9d3/gfx/thebes/gfxPlatform.cpp#722-738. Testing: Verified that new numbers appear in about:memory for servo.org. The new images category is surprisingly large (40mb). Signed-off-by: Josh Matthews <josh@joshmatthews.net>
* compositing: Send `CompositorDisplayListInfo` as bytes to compositor (#36484)Martin Robinson9 days1-0/+1
| | | | | | | | | | | | | `CompositorDisplayListInfo` is a large data structure that scales with the size of the display list. Serializing it onto the Compositor's IPC channel can cause deadlocks. This change serializes it with bincode and sends it alongside the rest of the serialized display list information on the IPC `bytes_channel`. This should prevent deadlocks when the compositor API is unified. Testing: This is covered by existing WPT tests. Signed-off-by: Martin Robinson <mrobinson@igalia.com> Signed-off-by: Martin Robinson <mrobinson@igalia.com>
* `compositing`: Combine `webrender_traits` and `compositing_traits` (#36372)Martin Robinson2025-04-061-2/+13
| | | | | | | | | | | | | | | These two traits both exposed different parts of the compositing API, but now that the compositor doesn't depend directly on `script` any longer and the `script_traits` crate has been split into the `constellation_traits` crate, this can be finally be cleaned up without causing circular dependencies. In addition, some unit tests for the `IOPCompositor`'s scroll node tree are also moved into `compositing_traits` as well. Testing: This just combines two crates, so no new tests are necessary. Fixes: #35984. Signed-off-by: Martin Robinson <mrobinson@igalia.com> Signed-off-by: Martin Robinson <mrobinson@igalia.com>
* Create a `constellation_traits` crate (#36088)Martin Robinson2025-03-221-2/+0
| | | | | | | | | | | | | | This change creates a `constellation_traits` crate. Previously messages to the `Constellation` were in the `compositing_traits` crate, which came about organically. This change moves these to a new crate which also contains data types that are used in both compositing/libservo and script (ie types that cross the process boundary). The idea is similar to `embedding_traits`, but this is meant for types not exposed to the API. This change allows deduplicating `UntrustedNodeAddress`, which previously had two versions to avoid circular dependencies. Signed-off-by: Martin Robinson <mrobinson@igalia.com>
* Cleanup Stylo dependencies (#36046)Oriol Brufau2025-03-191-1/+1
| | | | | | | | | Now that Stylo considers `servo` as the default feature, Servo doesn't need to specify `features = ["servo"]`. Also use the same crate names as Stylo, rather than renaming them with `package`. Signed-off-by: Oriol Brufau <obrufau@igalia.com>
* Use `strum` to iterate through enum variants and get their names (#35933)Martin Robinson2025-03-131-0/+1
| | | | | | | | `strum` allows us to avoid manually listing enum variant names and also to get their names as static strings. We cannot use this for all cases due to https://github.com/Peternator7/strum/issues/152, but we can still use it to remove a lot of code. Signed-off-by: Martin Robinson <mrobinson@igalia.com>
* Remove some unused dependencies (#34355)Jonathan Schwender2024-11-251-1/+0
| | | | | | | | | | | | | | | * Remove unused deps This doesn't seem to remove any deps from the workspace. Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com> * ohos: Remove gaol dependency Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com> --------- Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
* Add `rust-version` to all `Cargo.toml` files (#33483)Martin Robinson2024-09-171-0/+1
| | | | | | | This is another step preparing for building Servo without `mach`. Fixes #33430. Signed-off-by: Martin Robinson <mrobinson@igalia.com>
* 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>
* Use workspace definitions for all crates and update to the 2021 edition (#32544)Martin Robinson2024-06-181-5/+5
|
* compositor: Move WebRender-ish messages and types to `webrender_traits` (#32315)Mukilan Thiyagarajan2024-05-201-2/+2
| | | | | | | | | | | | | | | | | | | | * 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-1/+1
| | | | | | | | | | | | | | | | | | | | | | | 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`.
* gfx: Rename `WebrenderSurfman` to `RenderingContext` and move to `gfx` (#31184)Martin Robinson2024-01-271-1/+0
| | | | | | | | | | | This is a small cleanup that moves and renames this class. The rename is simply because we are exposing a lot about the details of Servo's rendering in the API and it makes sense to start thinking about abstracting that away a bit. This also moves the struct to `gfx`, which does have an effect on Servo's dependency graph. This adds a new dependency on gfx to `compositing`, but `compositing` had a transitive dependency on gfx before through `canvas`.
* deps: Remove unused crate dependencies (#31185)Martin Robinson2024-01-261-1/+0
| | | These were identified with `cargo-marchete`.
* Move `*_traits` and other shared types to `shared`Martin Robinson2023-11-031-0/+29
This is the start of the organization of types that are in their own crates in order to break dependency cycles between other crates. The idea here is that putting these packages into their own directory is the first step toward cleaning them up. They have grown organically and it is difficult to explain to new folks where to put new shared types. Many of these crates contain more than traits or don't contain traits at all. Notably, `script_traits` isn't touched because it is vendored from Gecko. Eventually this will move to `third_party`.