- Run `cargo fmt` on `webxr` and `webxr-api`
- Fix clippy warnings in the existing `webxr` code
- Integrate the new crates into the workspace
- Expose `webxr` via the libservo API rather than requiring embedders to
depend on it explicitly.
Signed-off-by: Martin Robinson <mrobinson@igalia.com>
Many types used directly in the `libservo` API are in the
`script_traits` crate, which was created to break circular dependencies.
Move all API exposed types to `embedder_traits` which now contains types
exposed via the `libservo` embedding API. Also expose these at the root
of the `libservo` `servo` crate so that the API won't break when they
move around in the future.
The idea with `embedder_traits` in the future is that it contains types
that are available throughout servo because they are used in the
embedding API and thus should have minimal dependencies on other Servo
crates (a bit like `base`).
Signed-off-by: Martin Robinson <mrobinson@igalia.com>
Flatten and simplify Servo's preferences code. In addition, have both
preferences and options passed in as arguments to `Servo::new()` and
make sure not to use the globally set preferences in `servoshell` (as
much as possible now).
Instead of a complex procedural macro to generate preferences, just
expose a very simple derive macro that adds string based getters and
setters.
- All command-line parsing is moved to servoshell.
- There is no longer the concept of a missing preference.
- Preferences no longer have to be part of the resources bundle because
they now have reasonable default values.
- servoshell specific preferences are no longer part of the preferences
exposed by the Servo API.
Signed-off-by: Martin Robinson <mrobinson@igalia.com>
- The default value for SwapInterval is 1,
so setting it to 1 changes nothing
- We don't clear the screen immediately anymore, which was the only
useage of the egl bindings
this saves us from duplicated EGL bindings.
Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
* servoshell: fix --no-default-features
The Embeddertraits only contain `register_webxr` if the
webxr feature is enabled, hence we also need to guard
the trait implementation.
Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
* ohos/android: Make webxr optional in servoshell
Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
---------
Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
This removes unused code in order to reduce the number of compiler
warnings on the Android build. Some of this code might be used in the
future and it can be restored from git commit history.
Signed-off-by: Martin Robinson <mrobinson@igalia.com>
Bundle resource files into the .hap, so they are available
as files in the application sandbox, instead of included
into the shared library.
This should slightly reduce the binary size in debug and
release mode.
Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
Signed-off-by: Jonathan Schwender <jonathan.schwender@huawei.com>
* Make tracing available on all platforms
Signed-off-by: Delan Azabani <dazabani@igalia.com>
* Gate perfetto support behind its own feature
Signed-off-by: Delan Azabani <dazabani@igalia.com>
---------
Signed-off-by: Delan Azabani <dazabani@igalia.com>
There is no need to add `serde-json` as a
build-dependency (which causes serde to be built
twice when cross-compiling - once for host and once
for the target)
Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>