mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
compositing: Use an OptionalIpcSender
for communication between the
layout and paint tasks.
This commit is contained in:
parent
3be5bbbaa3
commit
1ff7a51f0a
4 changed files with 26 additions and 9 deletions
|
@ -34,6 +34,19 @@ impl<T> OptionalIpcSender<T> where T: Deserialize + Serialize + Send + Any {
|
|||
}
|
||||
}
|
||||
|
||||
impl<T> Clone for OptionalIpcSender<T> where T: Deserialize + Serialize + Send + Any {
|
||||
fn clone(&self) -> OptionalIpcSender<T> {
|
||||
match *self {
|
||||
OptionalIpcSender::OutOfProcess(ref ipc_sender) => {
|
||||
OptionalIpcSender::OutOfProcess((*ipc_sender).clone())
|
||||
}
|
||||
OptionalIpcSender::InProcess(ref sender) => {
|
||||
OptionalIpcSender::InProcess((*sender).clone())
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl<T> Deserialize for OptionalIpcSender<T> where T: Deserialize + Serialize + Send + Any {
|
||||
fn deserialize<D>(deserializer: &mut D)
|
||||
-> Result<OptionalIpcSender<T>,D::Error> where D: Deserializer {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue