compositing: Use an OptionalIpcSender for communication between the

layout and paint tasks.
This commit is contained in:
Patrick Walton 2015-07-27 14:06:03 -07:00
parent 3be5bbbaa3
commit 1ff7a51f0a
4 changed files with 26 additions and 9 deletions

View file

@ -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 {