mirror of
https://github.com/servo/servo.git
synced 2025-09-27 23:30:08 +01:00
Use GenericChannel for script_chan (#38645)
Motivation: Using our GenericChannel abstraction allows us to optimize IPC in single-process mode to just use cross-beam channel. To keep the diff low, and get early feedback, this PR only tackles a single channel, but the intention is to port all ipc channels to the generic channel, which allows us to skip serializing and deserializing messages in single process mode. Based on: - https://github.com/servo/servo/pull/38638 - https://github.com/servo/servo/pull/38636 Testing: Covered by existing tests --------- Signed-off-by: Jonathan Schwender <schwenderjonathan@gmail.com>
This commit is contained in:
parent
73e0f2f7e6
commit
8587536755
12 changed files with 36 additions and 22 deletions
|
@ -13,6 +13,7 @@ use std::sync::{Arc, LazyLock};
|
|||
|
||||
use app_units::Au;
|
||||
use base::Epoch;
|
||||
use base::generic_channel::GenericSender;
|
||||
use base::id::{PipelineId, WebViewId};
|
||||
use bitflags::bitflags;
|
||||
use compositing_traits::CrossProcessCompositorApi;
|
||||
|
@ -25,7 +26,6 @@ use fnv::FnvHashMap;
|
|||
use fonts::{FontContext, FontContextWebFontMethods};
|
||||
use fonts_traits::StylesheetWebFontLoadFinishedCallback;
|
||||
use fxhash::FxHashMap;
|
||||
use ipc_channel::ipc::IpcSender;
|
||||
use layout_api::wrapper_traits::LayoutNode;
|
||||
use layout_api::{
|
||||
IFrameSizes, Layout, LayoutConfig, LayoutDamage, LayoutFactory, OffsetParentResponse,
|
||||
|
@ -135,7 +135,7 @@ pub struct LayoutThread {
|
|||
is_iframe: bool,
|
||||
|
||||
/// The channel on which messages can be sent to the script thread.
|
||||
script_chan: IpcSender<ScriptThreadMessage>,
|
||||
script_chan: GenericSender<ScriptThreadMessage>,
|
||||
|
||||
/// The channel on which messages can be sent to the time profiler.
|
||||
time_profiler_chan: profile_time::ProfilerChan,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue