mirror of
https://github.com/servo/servo.git
synced 2025-08-07 06:25:32 +01:00
compositor: Make PipelineDetails
and pending paint metrics per-WebView (#35701)
This is one of the first big steps toward making the compositor work per-WebView. It moves the collection of pipelines into the per-WebView data structure in the compositor as well as the pending paint metrics. This means that more messages need to carry information about the WebView they apply to. Note that there are still a few places that we need to map from `PipelineId` to `WebViewId`, so this also includes a shared mapping which tracks this. The mapping can be removed once event handling is fully per-WebView. Signed-off-by: Martin Robinson <mrobinson@igalia.com> Co-authored-by: Delan Azabani <dazabani@igalia.com>
This commit is contained in:
parent
0d0bcdeb4d
commit
f3e6e4f04e
13 changed files with 537 additions and 373 deletions
|
@ -386,8 +386,11 @@ impl Pipeline {
|
|||
// It's OK for the constellation to block on the compositor,
|
||||
// since the compositor never blocks on the constellation.
|
||||
if let Ok((sender, receiver)) = ipc::channel() {
|
||||
self.compositor_proxy
|
||||
.send(CompositorMsg::PipelineExited(self.id, sender));
|
||||
self.compositor_proxy.send(CompositorMsg::PipelineExited(
|
||||
self.top_level_browsing_context_id,
|
||||
self.id,
|
||||
sender,
|
||||
));
|
||||
if let Err(e) = receiver.recv() {
|
||||
warn!("Sending exit message failed ({:?}).", e);
|
||||
}
|
||||
|
@ -455,7 +458,8 @@ impl Pipeline {
|
|||
/// running timers at a heavily limited rate.
|
||||
pub fn set_throttled(&self, throttled: bool) {
|
||||
let script_msg = ScriptThreadMessage::SetThrottled(self.id, throttled);
|
||||
let compositor_msg = CompositorMsg::SetThrottled(self.id, throttled);
|
||||
let compositor_msg =
|
||||
CompositorMsg::SetThrottled(self.top_level_browsing_context_id, self.id, throttled);
|
||||
let err = self.event_loop.send(script_msg);
|
||||
if let Err(e) = err {
|
||||
warn!("Sending SetThrottled to script failed ({}).", e);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue