Commit graph

55 commits

Author SHA1 Message Date
Jonathan Schwender
cd394af018
Bump duplicated nix to 0.29 (#32764)
Signed-off-by: Jonathan Schwender <jonathan.schwender@huawei.com>
2024-07-13 07:48:01 +00:00
Martin Robinson
4a7f3bac7c
Use workspace definitions for all crates and update to the 2021 edition (#32544) 2024-06-18 09:22:08 +00:00
Martin Robinson
e902d63732
deps: Switch from winapi to windows_sys in Servo code (#32516)
This is part of the switch from `winapi` to `windows-sys`. `windows-sys` is
maintained by Microsoft, so is more "official." More and more crates are
switching to it.
2024-06-17 08:27:50 +00:00
Martin Robinson
7982f0dc27
build: Fix build warnings on Windows (#32500)
Disable some code for Windows, which is causing build warnings. When it
cannot be easily disabled (mainly for the incomplete BHM and sandbox
feature), allow dead code.
2024-06-15 14:31:36 +00:00
Martin Robinson
3398fc017b
Move non-gfx things out of gfx_traits and create a base crate (#32296)
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`.
2024-05-17 12:28:58 +00:00
Magnus Larsen
9acf2182cd
servoshell: Upgrade egui and many other dependencies (#31278)
* servoshell: Upgrade `egui` and many other dependencies

This upgrades:
 - `core-graphics`
 - `core-text`
 - `egui` and friends
 - `font-kit`
 - `glow` and friends
 - `harfbuzz-sys`
 - `jni`
 - `nix`
 - `raqote`
 - `raw-window-handle`
 - `winit`

* Downgrade jni until we can properly upgrade

* Update some test results

It's unclear why these are now passing, but they are.

---------

Co-authored-by: Martin Robinson <mrobinson@igalia.com>
2024-05-02 16:21:07 +00:00
Ngo Iok Ui (Wu Yu Wei)
b1debf2068
fix: missing thread name when spawning (#31656)
* Add missing thread name when spawning

* Update namings
2024-03-14 10:40:58 +00:00
Mucha Naibei
4efebf1e62
Fix clippy warnings in components/third_party (#31623) 2024-03-12 17:17:23 +00:00
eri
3a5ca785d3
clippy: fix warnings in various modules in components (#31568)
* clippy: fix warnings in various modules in components

* fix: unit tests

* fix: build on android

* fix: all samplers use new_boxed
2024-03-08 14:28:04 +00:00
Rajesh Malviya
9d42602fe7
BHM: Support aarch64 for Mac sampler (#31298)
Replaced unmaintained `mach` crate with `mach2`, and added support for getting arm registers.
2024-02-09 13:55:28 +00:00
Mukilan Thiyagarajan
d7de206dbd
Preliminary Android build support (#31086)
* Android build

* Fixes
* More fixes
  - Still failing in the linking step
* More work on getting linking working

Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>

* android: use mozjs with ndk r25c. loads servo.org

more android build fixes.

* fix ./mach run for android and make it follow logs

Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>

* add experimental logic for compositor pause/resume

Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>

* pass DPI from android to simpleservo

Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>

* ci: add android workflow

Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>

* switch to ANDROID_SDK_ROOT and ANDROID_NDK_ROOT vars

Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>

* upgrade gradle to 4.10.1

Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>

* upgrade to gradle 5.1.1

Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>

* upgrade to gradle 8 and agp 8

Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>

* make compositing work again with external present

Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>

* android: improve mach support for non-NixOS and CI

Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>

* fix sampler compilation bug introduced in #30490

Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>

* ci: add android build to main workflow

Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>

* gradle: set MinSdk = targetSdk = 30

NDK requires we compile against the minSdk API level
which is 30 in our case.

Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>

* add instructions for android in README.md

Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>

* apk: move servosurface to servoview

Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>

* apk: uncomment the mediasession callbacks on MainActivity

Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>

* apk: fix crash on MainAtivity.onDestroy

Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>

* apk: drop VR, arm 5 and unused code

This commit drops:
* support for google, oculusvr
* support for arm5 architecture

and also removes
* fakeld scripts
* unused java code

Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>

* cleanup shell.nix

Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>

* android: add FIXMEs for gstreamer code

Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>

* apk: remove commented code and debug logs

Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>

* cleanup ServoView.java

Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>

* mach: comment call to download gstreamer deps for android

Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>

* disable bluetooth for jniapi as blurdroid is broken

Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>

* fixup! README.md

* fixup! remove change in Cargo.toml

* fixup! move shell variables together

* fixup! cleanup jniapi/Cargo.toml comments

* delete commented gstreamer related android code

Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>

* remove unused config variable in servbuild

Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>

* android: more cleanup

Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>

* force no_static_freetype only for android

* use actions to manage sdk, ndk and java

Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>

* rename embedder event names to be more clear.

Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>

* link to startup crash issue

Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>

* fix lint issues

Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>

* upgrade env_logger to 0.10 with duplicate exception

libservo and android_logger can use env_logger 0.10
but quickcheck is still stuck on 0.8 and has not seen
any activity in the last 2 years. This commit adds
a duplicate exception until the quickcheck dependency
can be upgraded (or replaced)

Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>

* android: fix comments

Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>

* disable jemalloc on android

Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>

* fixup! replace linux with android in cfg

---------

Signed-off-by: Mukilan Thiyagarajan <mukilan@igalia.com>
Co-authored-by: Martin Robinson <mrobinson@igalia.com>
2024-01-22 13:00:15 +00:00
Martin Robinson
bd052f536e
bhm: Fix a warning in the Linux sampler (#30924)
Use curly braces instead of an explicit drop to control the end of a
borrow.
2023-12-28 11:20:47 +00:00
Martin Robinson
df157dcc03
dependencies: Update to latest version of unwind-sys (#30923)
This allows us to remove the dependency on the git version of
`unwind-sys` necessary for allowing compilation on Fedora 39.
2023-12-23 15:56:09 +00:00
Martin Robinson
d007d265bd
Fix the unwind-sys build on latest Fedora (#30906)
The libunwind library version installed includes an rc number. The
latest released version of the `unwind-sys` crate doesn't handle this
properly, so rely on the latest commit in the upstream repository.
2023-12-21 14:37:00 +00:00
Martin Robinson
f4d3af296c Move *_traits and other shared types to shared
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`.
2023-11-03 15:38:18 +00:00
Ngo Iok Ui (Wu Yu Wei)
a31e2ea576
Fix macOS's sameple isn't used in background_hang_monitor (#30490) 2023-10-04 06:59:45 +00:00
Fabrice Desré
c78533c1a8
Update version of nix, and ron (#30330)
* Bump ron to 0.8.1 to pickup more recent base64

* Remove dependency on nix 0.14

* Update libloading in simpleservo
2023-09-15 02:06:14 +00:00
Samson
aad2dccc9c
Strict import formatting (grouping and granularity) (#30325)
* strict imports formatting

* Reformat all imports
2023-09-11 19:16:54 +00:00
Samson
711dbbd4af
remove extern crate (#30311)
* 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>
2023-09-08 12:11:31 +00:00
Martin Robinson
2f4c47bfe7 Start the transition to workspace dependencies
This will ultimately make it simpler to update crate dependencies and
reduce duplicate when specifying requirements. Generally, this change
does not touch dependencies that are only used by a single crate. We
could consider moving them to workspace dependencies in the future.
2023-05-17 11:59:35 +02:00
yvt
602c02edd2 fix(bhm): deliver exit signal reliably (for real)
> However, as it turns out, `crossbeam-channel`'s channels don't drop
> remaining messages until all associated senders *and* receivers are
> dropped. This means the exit signal won't be delivered as long as
> there's at least one `HangMonitorRegister` or
> `BackgroundHangMonitorChan` maintaining a copy of the sender. To work
> around this and guarantee a rapid delivery of the exit signal, the
> sender is wrapped in `Arc`, and only the worker thread maintains a
> strong reference, thus ensuring both the sender and receiver are
> dropped as soon as the worker thread exits.
2021-06-21 00:07:26 +09:00
yvt
18c79cafac fix(bhm): deliver exit signal reliably when component registration and signal submission coincide
> There's a race condition between the reception of
> `BackgroundHangMonitorControlMsg::Exit` and `MonitoredComponentMsg::
> Register`. When the worker receives `Exit`, it stops receiving
> messages, and any remaining messages (including the
> `MonitoredComponentMsg::Register` we sent) in the channel are dropped.
> Wrapping `exit_signal` with this RAII wrapper ensures the exit signal
> is delivered even in such cases.

This should (hopefully) eliminate the intermittent hang-ups in the test
case `test_hang_monitoring_exit_signal` for good.
2021-06-20 13:09:26 +09:00
yvt
2eec1e69ea refactor(bhm): reduce item visibility 2021-06-20 00:04:20 +09:00
Josh Matthews
1a1590fd53
Disable intermittent unit tests on macos. 2021-05-26 19:32:30 -04:00
Josh Matthews
9e1f6ee332
Ignore warnings. 2021-03-14 22:24:48 -04:00
Josh Matthews
2e35fc5cb9
Disable hanging hang monitor tests on windows 2021-03-12 16:49:36 -05:00
Gregory Terzian
256167eff2 improve reliability of hang monitor tests 2020-07-07 12:45:14 +08:00
Gregory Terzian
44ebca72da ensure clean shutdown of all threads running JS 2020-06-30 13:22:38 +08:00
Simon Sapin
dbdc44215b Use UnsafeCell instead of static mut in background_hang_monitor/sampler_linux.rs 2020-06-05 00:11:37 +02:00
atouchet
ede15557ae Some Cargo.toml cleanups 2020-05-13 22:09:56 -07:00
Josh Matthews
3fd3c23e17 Update ipc-channel and crossbeam-channel. 2020-02-20 11:15:13 -05:00
Patrick Walton
a358bca766 Use surfman for managing GL surfaces
Co-authored-by: Alan Jeffrey <ajeffrey@mozilla.com>
Co-authored-by: Zakor Gyula <gyula.zakor@h-lab.eu>
Co-authored-by: Josh Matthews <josh@joshmatthews.net>
2019-11-01 08:47:11 -05:00
Shotaro Yamada
b228d2700e Remove unused dependencies 2019-10-01 21:15:53 +09:00
Bastien Orivel
c8aae12ff4 Update and dedupe nix 2019-09-06 18:37:37 +02:00
Bastien Orivel
b6cddbebaa Deduplicate parking_lot and friends by updating it to 0.9 2019-09-05 10:47:39 +02:00
Bastien Orivel
92161ecfbc Update ipc-channel and related dependencies 2019-08-27 23:44:04 +02:00
Simon Sapin
b6bd2d7302 Remove uses of mem::uninitialized 2019-07-17 10:48:54 +02:00
Simon Sapin
1d38bc0419 Fix some new warnings 2019-06-22 14:59:09 +02:00
Josh Matthews
eab01e7877
Remove sampling profiler unit test. 2019-06-14 09:42:55 -04:00
Josh Matthews
b8aac8b152 Hide windows sampler on arm64. 2019-06-11 15:53:34 -04:00
Paul Rouget
1758207393 Glutin update: dependencies update 2019-05-25 07:15:30 -04:00
Josh Matthews
60688da71a Revert "Glutin update: dependencies update"
This reverts commit 30fb18e711.
2019-05-22 14:18:38 -04:00
Paul Rouget
30fb18e711 Glutin update: dependencies update 2019-05-22 09:55:38 +02:00
bors-servo
31c02614be
Auto merge of #23139 - gterzian:bounded_profiler_with_buffer_feedback, r=jdm
Bound sampler buffer, add length feedback message, fix intermittence in test

<!-- 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: -->
- [ ] `./mach build -d` does not report any errors
- [ ] `./mach test-tidy` does not report any errors
- [ ] These changes fix #23109 (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/23139)
<!-- Reviewable:end -->
2019-03-31 10:27:13 -04:00
Gregory Terzian
0780298b80 bound sampler buffer 2019-03-31 20:14:46 +08:00
Josh Matthews
6c1bf6a591 Add linking hack to work around older libunwind package versions. 2019-03-29 23:05:45 -04:00
Josh Matthews
7a6fb65bd9 Use libunwind to walk the stack of the paused thread. 2019-03-29 23:05:44 -04:00
Gregory Terzian
7bc29205ef add linux sampler 2019-03-29 23:05:44 -04:00
Josh Matthews
aee2974c33 Add unit test for sampling profiler. 2019-03-26 16:35:52 -04:00
Josh Matthews
8b7244f0d1 Support multiprocess in sampling profiler. 2019-03-26 16:35:10 -04:00