Update documentation for {CanvasPaintThread, WebGLPaintThread}::new().

This commit is contained in:
Ms2ger 2016-05-19 12:15:02 +02:00
parent dea610986d
commit efd953f768
2 changed files with 4 additions and 6 deletions

View file

@ -117,13 +117,11 @@ impl<'a> CanvasPaintThread<'a> {
}
}
/// Creates a new `CanvasPaintThread` and returns the out-of-process sender and the in-process
/// sender for it.
/// Creates a new `CanvasPaintThread` and returns an `IpcSender` to
/// communicate with it.
pub fn start(size: Size2D<i32>,
webrender_api_sender: Option<webrender_traits::RenderApiSender>)
-> IpcSender<CanvasMsg> {
// TODO(pcwalton): Ask the pipeline to create this for us instead of spawning it directly.
// This will be needed for multiprocess Servo.
let (sender, receiver) = ipc::channel::<CanvasMsg>().unwrap();
spawn_named("CanvasThread".to_owned(), move || {
let mut painter = CanvasPaintThread::new(size, webrender_api_sender);

View file

@ -58,8 +58,8 @@ impl WebGLPaintThread {
}
}
/// Creates a new `WebGLPaintThread` and returns the out-of-process sender and the in-process
/// sender for it.
/// Creates a new `WebGLPaintThread` and returns an `IpcSender` to
/// communicate with it.
pub fn start(size: Size2D<i32>,
attrs: GLContextAttributes,
webrender_api_sender: Option<webrender_traits::RenderApiSender>)