diff options
author | Josh Matthews <josh@joshmatthews.net> | 2017-04-10 17:47:20 +1000 |
---|---|---|
committer | Josh Matthews <josh@joshmatthews.net> | 2017-05-15 14:12:08 -0400 |
commit | 913491884431b9030db9a8a0a10011fa03aa2db6 (patch) | |
tree | 28e3c549fe542a79cb2c74edd5b28b928a4c1683 /components/layout/query.rs | |
parent | c3b9714ab79a8230162605236f7c2f5e247707a7 (diff) | |
download | servo-913491884431b9030db9a8a0a10011fa03aa2db6.tar.gz servo-913491884431b9030db9a8a0a10011fa03aa2db6.zip |
Send information to script as part of finishing layout.
This avoids the need for multiple layout RPC operations immediately
following return of control to script. This means that layout and
script can continue to operate in parallel at this point, rather
than one potentially waiting on the shared mutex to be unlocked.
Diffstat (limited to 'components/layout/query.rs')
-rw-r--r-- | components/layout/query.rs | 20 |
1 files changed, 0 insertions, 20 deletions
diff --git a/components/layout/query.rs b/components/layout/query.rs index a8d5913e3db..476a68afafe 100644 --- a/components/layout/query.rs +++ b/components/layout/query.rs @@ -17,7 +17,6 @@ use inline::LAST_FRAGMENT_OF_ELEMENT; use ipc_channel::ipc::IpcSender; use msg::constellation_msg::PipelineId; use opaque_node::OpaqueNodeMethods; -use script_layout_interface::PendingImage; use script_layout_interface::rpc::{ContentBoxResponse, ContentBoxesResponse}; use script_layout_interface::rpc::{HitTestResponse, LayoutRPC}; use script_layout_interface::rpc::{MarginStyleResponse, NodeGeometryResponse}; @@ -28,7 +27,6 @@ use script_traits::LayoutMsg as ConstellationMsg; use script_traits::UntrustedNodeAddress; use sequential; use std::cmp::{min, max}; -use std::mem; use std::ops::Deref; use std::sync::{Arc, Mutex}; use style::computed_values; @@ -89,14 +87,8 @@ pub struct LayoutThreadData { /// Index in a text fragment. We need this do determine the insertion point. pub text_index_response: TextIndexResponse, - /// A list of images requests that need to be initiated. - pub pending_images: Vec<PendingImage>, - /// A queued response for the list of nodes at a given point. pub nodes_from_point_response: Vec<UntrustedNodeAddress>, - - /// A list of nodes that have just started a CSS transition. - pub newly_transitioning_nodes: Vec<UntrustedNodeAddress>, } pub struct LayoutRPCImpl(pub Arc<Mutex<LayoutThreadData>>); @@ -201,18 +193,6 @@ impl LayoutRPC for LayoutRPCImpl { let rw_data = rw_data.lock().unwrap(); rw_data.text_index_response.clone() } - - fn pending_images(&self) -> Vec<PendingImage> { - let &LayoutRPCImpl(ref rw_data) = self; - let mut rw_data = rw_data.lock().unwrap(); - mem::replace(&mut rw_data.pending_images, vec![]) - } - - fn newly_transitioning_nodes(&self) -> Vec<UntrustedNodeAddress> { - let &LayoutRPCImpl(ref rw_data) = self; - let mut rw_data = rw_data.lock().unwrap(); - mem::replace(&mut rw_data.newly_transitioning_nodes, vec![]) - } } struct UnioningFragmentBorderBoxIterator { |