build: bump servo to c11e0e8 (#248)

This commit is contained in:
Jason Tsai
2024-11-25 13:45:47 +08:00
committed by GitHub
parent 448eb2fdbf
commit d5ce114efb
5 changed files with 419 additions and 270 deletions

508
Cargo.lock generated

File diff suppressed because it is too large Load Diff

View File

@@ -69,34 +69,34 @@ sparkle = "0.1.26"
thiserror = "1.0"
winit = { version = "0.30", features = ["rwh_06"] }
# Servo repo crates
base = { git = "https://github.com/servo/servo.git", rev = "f71f38b" }
bluetooth = { git = "https://github.com/servo/servo.git", rev = "f71f38b" }
bluetooth_traits = { git = "https://github.com/servo/servo.git", rev = "f71f38b" }
canvas = { git = "https://github.com/servo/servo.git", rev = "f71f38b" }
compositing_traits = { git = "https://github.com/servo/servo.git", rev = "f71f38b" }
constellation = { git = "https://github.com/servo/servo.git", rev = "f71f38b" }
devtools = { git = "https://github.com/servo/servo.git", rev = "f71f38b" }
embedder_traits = { git = "https://github.com/servo/servo.git", rev = "f71f38b" }
fonts = { git = "https://github.com/servo/servo.git", rev = "f71f38b" }
layout_thread_2020 = { git = "https://github.com/servo/servo.git", rev = "f71f38b" }
media = { git = "https://github.com/servo/servo.git", rev = "f71f38b" }
net = { git = "https://github.com/servo/servo.git", rev = "f71f38b" }
net_traits = { git = "https://github.com/servo/servo.git", rev = "f71f38b" }
profile = { git = "https://github.com/servo/servo.git", rev = "f71f38b" }
profile_traits = { git = "https://github.com/servo/servo.git", rev = "f71f38b" }
script = { git = "https://github.com/servo/servo.git", rev = "f71f38b" }
script_traits = { git = "https://github.com/servo/servo.git", rev = "f71f38b" }
servo_config = { git = "https://github.com/servo/servo.git", rev = "f71f38b" }
servo_geometry = { git = "https://github.com/servo/servo.git", rev = "f71f38b" }
servo_url = { git = "https://github.com/servo/servo.git", rev = "f71f38b" }
webdriver_server = { git = "https://github.com/servo/servo.git", rev = "f71f38b" }
webrender_traits = { git = "https://github.com/servo/servo.git", rev = "f71f38b" }
webgpu = { git = "https://github.com/servo/servo.git", rev = "f71f38b" }
base = { git = "https://github.com/servo/servo.git", rev = "c11e0e8" }
bluetooth = { git = "https://github.com/servo/servo.git", rev = "c11e0e8" }
bluetooth_traits = { git = "https://github.com/servo/servo.git", rev = "c11e0e8" }
canvas = { git = "https://github.com/servo/servo.git", rev = "c11e0e8" }
compositing_traits = { git = "https://github.com/servo/servo.git", rev = "c11e0e8" }
constellation = { git = "https://github.com/servo/servo.git", rev = "c11e0e8" }
devtools = { git = "https://github.com/servo/servo.git", rev = "c11e0e8" }
embedder_traits = { git = "https://github.com/servo/servo.git", rev = "c11e0e8" }
fonts = { git = "https://github.com/servo/servo.git", rev = "c11e0e8" }
layout_thread_2020 = { git = "https://github.com/servo/servo.git", rev = "c11e0e8" }
media = { git = "https://github.com/servo/servo.git", rev = "c11e0e8" }
net = { git = "https://github.com/servo/servo.git", rev = "c11e0e8" }
net_traits = { git = "https://github.com/servo/servo.git", rev = "c11e0e8" }
profile = { git = "https://github.com/servo/servo.git", rev = "c11e0e8" }
profile_traits = { git = "https://github.com/servo/servo.git", rev = "c11e0e8" }
script = { git = "https://github.com/servo/servo.git", rev = "c11e0e8" }
script_traits = { git = "https://github.com/servo/servo.git", rev = "c11e0e8" }
servo_config = { git = "https://github.com/servo/servo.git", rev = "c11e0e8" }
servo_geometry = { git = "https://github.com/servo/servo.git", rev = "c11e0e8" }
servo_url = { git = "https://github.com/servo/servo.git", rev = "c11e0e8" }
webdriver_server = { git = "https://github.com/servo/servo.git", rev = "c11e0e8" }
webrender_traits = { git = "https://github.com/servo/servo.git", rev = "c11e0e8" }
webgpu = { git = "https://github.com/servo/servo.git", rev = "c11e0e8" }
# Servo org crates
servo-media = { git = "https://github.com/servo/media" }
servo-media-dummy = { git = "https://github.com/servo/media" }
style = { git = "https://github.com/servo/stylo", branch = "2024-10-04", features = ["servo"] }
style_traits = { git = "https://github.com/servo/stylo", branch = "2024-10-04", features = ["servo"] }
style = { git = "https://github.com/servo/stylo", branch = "2024-11-01", features = ["servo"] }
style_traits = { git = "https://github.com/servo/stylo", branch = "2024-11-01", features = ["servo"] }
webrender = { git = "https://github.com/servo/webrender", branch = "0.65", features = ["capture"] }
webrender_api = { git = "https://github.com/servo/webrender", branch = "0.65" }
# Packager feature

View File

@@ -48,8 +48,8 @@ modules:
path: .
- type: file
# Update the link whenever mozjs-sys is updated
url: https://github.com/servo/mozjs/releases/download/mozjs-sys-v0.128.3-4/libmozjs-x86_64-unknown-linux-gnu.tar.gz
sha256: 1907839f5f69a633f49eb92aba794375890eab283258964053d6227b82996187
url: https://github.com/servo/mozjs/releases/download/mozjs-sys-v0.128.3-5/libmozjs-x86_64-unknown-linux-gnu.tar.gz
sha256: c196c1078dbe8c3953a5368c2c99f20043e0b626706adb24a452ffbda6196bfb
only-arches:
- x86_64

View File

@@ -7,7 +7,7 @@
"dom.canvas_capture.enabled": false,
"dom.canvas_text.enabled": true,
"dom.compositionevent.enabled": false,
"dom.crypto.subtle.enabled": false,
"dom.crypto.subtle.enabled": true,
"dom.customelements.enabled": true,
"dom.document.dblclick_dist": 1,
"dom.document.dblclick_timeout": 300,
@@ -108,6 +108,7 @@
"layout.columns.enabled": false,
"layout.css.transition-behavior.enabled": true,
"layout.flexbox.enabled": true,
"layout.grid.enabled": false,
"layout.legacy_layout": false,
"layout.tables.enabled": false,
"layout.threads": 3,

View File

@@ -182,12 +182,12 @@ pub struct IOCompositor {
/// The GL bindings for webrender
webrender_gl: Rc<dyn gl::Gl>,
/// Map of the pending paint metrics per Layout.
/// The Layout for each specific pipeline expects the compositor to
/// paint frames with specific given IDs (epoch). Once the compositor paints
/// these frames, it records the paint time for each of them and sends the
/// metric to the corresponding Layout.
pending_paint_metrics: HashMap<PipelineId, Epoch>,
/// A per-pipeline queue of display lists that have not yet been rendered by WebRender. Layout
/// expects WebRender to paint each given epoch. Once the compositor paints a frame with that
/// epoch's display list, it will be removed from the queue and the paint time will be recorded
/// as a metric. In case new display lists come faster than painting a metric might never be
/// recorded.
pending_paint_metrics: HashMap<PipelineId, Vec<Epoch>>,
/// Current mouse cursor.
cursor: Cursor,
@@ -565,7 +565,10 @@ impl IOCompositor {
}
CompositorMsg::PendingPaintMetric(pipeline_id, epoch) => {
self.pending_paint_metrics.insert(pipeline_id, epoch);
self.pending_paint_metrics
.entry(pipeline_id)
.or_default()
.push(epoch);
}
CompositorMsg::CrossProcess(cross_process_message) => {
@@ -858,10 +861,6 @@ impl IOCompositor {
// Subtract from the number of pending frames, but do not do any compositing.
self.pending_frames -= 1;
}
CompositorMsg::PendingPaintMetric(pipeline_id, epoch) => {
self.pending_paint_metrics.insert(pipeline_id, epoch);
}
_ => {
debug!("Ignoring message ({:?} while shutting down", msg);
}
@@ -1955,49 +1954,7 @@ impl IOCompositor {
},
);
// If there are pending paint metrics, we check if any of the painted epochs is one of the
// ones that the paint metrics recorder is expecting. In that case, we get the current
// time, inform layout about it and remove the pending metric from the list.
if !self.pending_paint_metrics.is_empty() {
let mut to_remove = Vec::new();
// For each pending paint metrics pipeline id
for (id, pending_epoch) in &self.pending_paint_metrics {
// we get the last painted frame id from webrender
if let Some(WebRenderEpoch(epoch)) = self
.webrender
.current_epoch(self.webrender_document, id.into())
{
// and check if it is the one layout is expecting,
let epoch = Epoch(epoch);
if *pending_epoch != epoch {
warn!(
"{}: paint metrics: pending {:?} should be {:?}",
id, pending_epoch, epoch
);
continue;
}
// in which case, we remove it from the list of pending metrics,
to_remove.push(*id);
if let Some(pipeline) = self.pipeline(*id) {
// and inform layout with the measured paint time.
if let Err(e) =
pipeline
.script_chan
.send(ConstellationControlMsg::SetEpochPaintTime(
*id,
epoch,
CrossProcessInstant::now(),
))
{
warn!("Sending RequestLayoutPaintMetric message to layout failed ({e:?}).");
}
}
}
}
for id in to_remove.iter() {
self.pending_paint_metrics.remove(id);
}
}
self.send_pending_paint_metrics_messages_after_composite();
self.composition_request = CompositionRequest::NoCompositingNecessary;
self.ready_to_present = true;
@@ -2162,6 +2119,65 @@ impl IOCompositor {
self.webrender_api
.send_transaction(self.webrender_document, transaction);
}
/// Send all pending paint metrics messages after a composite operation, which may advance
/// the epoch for pipelines in the WebRender scene.
///
/// If there are pending paint metrics, we check if any of the painted epochs is one
/// of the ones that the paint metrics recorder is expecting. In that case, we get the
/// current time, inform the constellation about it and remove the pending metric from
/// the list.
fn send_pending_paint_metrics_messages_after_composite(&mut self) {
if self.pending_paint_metrics.is_empty() {
return;
}
let paint_time = CrossProcessInstant::now();
let mut pipelines_to_remove = Vec::new();
let pending_paint_metrics = &mut self.pending_paint_metrics;
// For each pending paint metrics pipeline id, determine the current
// epoch and update paint timing if necessary.
for (pipeline_id, pending_epochs) in pending_paint_metrics.iter_mut() {
let Some(WebRenderEpoch(current_epoch)) = self
.webrender
.current_epoch(self.webrender_document, pipeline_id.into())
else {
continue;
};
// If the pipeline is unknown, stop trying to send paint metrics for it.
let Some(pipeline) = self
.pipeline_details
.get(pipeline_id)
.and_then(|pipeline_details| pipeline_details.pipeline.as_ref())
else {
pipelines_to_remove.push(*pipeline_id);
continue;
};
let current_epoch = Epoch(current_epoch);
let Some(index) = pending_epochs
.iter()
.position(|epoch| *epoch == current_epoch)
else {
continue;
};
// Remove all epochs that were pending before the current epochs. They were not and will not,
// be painted.
pending_epochs.drain(0..index);
if let Err(error) =
pipeline
.script_chan
.send(ConstellationControlMsg::SetEpochPaintTime(
*pipeline_id,
current_epoch,
paint_time,
))
{
warn!("Sending RequestLayoutPaintMetric message to layout failed ({error:?}).");
}
}
for pipeline_id in pipelines_to_remove.iter() {
self.pending_paint_metrics.remove(pipeline_id);
}
}
}
#[derive(Debug, PartialEq)]