aboutsummaryrefslogtreecommitdiffstats
path: root/components/script_traits
diff options
context:
space:
mode:
authorWu Yu Wei <wusyong9104@gmail.com>2022-03-10 17:51:53 +0800
committerWu Yu Wei <wusyong9104@gmail.com>2022-03-10 20:07:59 +0800
commit2cffbd75279b72feeb067a680a248b155d224e2c (patch)
tree8ba29b986e8c3ff2d8e05f010ce11db7467679bc /components/script_traits
parent34b3dafab8067c68d4776565949fa80ea6f0da86 (diff)
downloadservo-2cffbd75279b72feeb067a680a248b155d224e2c.tar.gz
servo-2cffbd75279b72feeb067a680a248b155d224e2c.zip
Use IpcBytesReceiver to send Display list data
Diffstat (limited to 'components/script_traits')
-rw-r--r--components/script_traits/lib.rs9
1 files changed, 7 insertions, 2 deletions
diff --git a/components/script_traits/lib.rs b/components/script_traits/lib.rs
index 0fc56a9f2e3..af336a41374 100644
--- a/components/script_traits/lib.rs
+++ b/components/script_traits/lib.rs
@@ -1123,7 +1123,7 @@ pub enum WebrenderMsg {
LayoutSize,
webrender_api::PipelineId,
LayoutSize,
- Vec<u8>,
+ ipc::IpcBytesReceiver,
BuiltDisplayListDescriptor,
),
/// Perform a hit test operation. The result will be returned via
@@ -1181,16 +1181,21 @@ impl WebrenderIpcSender {
(pipeline, size2, list): (webrender_api::PipelineId, LayoutSize, BuiltDisplayList),
) {
let (data, descriptor) = list.into_data();
+ let (sender, receiver) = ipc::bytes_channel().unwrap();
if let Err(e) = self.0.send(WebrenderMsg::SendDisplayList(
webrender_api::Epoch(epoch.0),
size,
pipeline,
size2,
- data,
+ receiver,
descriptor,
)) {
warn!("Error sending display list: {}", e);
}
+
+ if let Err(e) = sender.send(&data) {
+ warn!("Error sending display data: {}", e);
+ }
}
/// Perform a hit test operation. Blocks until the operation is complete and