Remove the unused IpcSender from ChromeToPaintMsg::Exit.

This commit is contained in:
Ms2ger 2015-11-05 15:44:31 +01:00
parent 61983323ae
commit eb44bdb33a
2 changed files with 10 additions and 4 deletions

View file

@ -279,7 +279,6 @@ impl Pipeline {
ConstellationControlMsg::ExitPipeline(self.id, ConstellationControlMsg::ExitPipeline(self.id,
PipelineExitType::PipelineOnly)).unwrap(); PipelineExitType::PipelineOnly)).unwrap();
let _ = self.chrome_to_paint_chan.send(ChromeToPaintMsg::Exit( let _ = self.chrome_to_paint_chan.send(ChromeToPaintMsg::Exit(
None,
PipelineExitType::PipelineOnly)); PipelineExitType::PipelineOnly));
let LayoutControlChan(ref layout_channel) = self.layout_chan; let LayoutControlChan(ref layout_channel) = self.layout_chan;
let _ = layout_channel.send( let _ = layout_channel.send(

View file

@ -205,7 +205,7 @@ pub enum ChromeToPaintMsg {
PaintPermissionGranted, PaintPermissionGranted,
PaintPermissionRevoked, PaintPermissionRevoked,
CollectReports(ReportsChan), CollectReports(ReportsChan),
Exit(Option<IpcSender<()>>, PipelineExitType), Exit(PipelineExitType),
} }
pub struct PaintTask<C> { pub struct PaintTask<C> {
@ -382,8 +382,7 @@ impl<C> PaintTask<C> where C: PaintListener + Send + 'static {
// FIXME(njn): should eventually measure the paint task. // FIXME(njn): should eventually measure the paint task.
channel.send(Vec::new()) channel.send(Vec::new())
} }
Msg::FromLayout(LayoutToPaintMsg::Exit(ref response_channel, _)) | Msg::FromLayout(LayoutToPaintMsg::Exit(ref response_channel, _)) => {
Msg::FromChrome(ChromeToPaintMsg::Exit(ref response_channel, _)) => {
// Ask the compositor to remove any layers it is holding for this paint task. // Ask the compositor to remove any layers it is holding for this paint task.
// FIXME(mrobinson): This can probably move back to the constellation now. // FIXME(mrobinson): This can probably move back to the constellation now.
self.compositor.notify_paint_task_exiting(self.id); self.compositor.notify_paint_task_exiting(self.id);
@ -392,6 +391,14 @@ impl<C> PaintTask<C> where C: PaintListener + Send + 'static {
response_channel.as_ref().map(|channel| channel.send(())); response_channel.as_ref().map(|channel| channel.send(()));
break; break;
} }
Msg::FromChrome(ChromeToPaintMsg::Exit(_)) => {
// Ask the compositor to remove any layers it is holding for this paint task.
// FIXME(mrobinson): This can probably move back to the constellation now.
self.compositor.notify_paint_task_exiting(self.id);
debug!("PaintTask: Exiting.");
break;
}
} }
} }
} }