Remove Constellation::{canvas_paint_threads, webgl_paint_threads}.

This commit is contained in:
Ms2ger 2016-03-21 17:58:27 +01:00
parent 63a00f4dbf
commit fb1b0d1a09

View file

@ -170,12 +170,6 @@ pub struct Constellation<LTF, STF> {
/// Bits of state used to interact with the webdriver implementation
webdriver: WebDriverData,
/// A list of in-process senders to `CanvasPaintThread`s.
canvas_paint_threads: Vec<Sender<CanvasMsg>>,
/// A list of in-process senders to `WebGLPaintThread`s.
webgl_paint_threads: Vec<Sender<CanvasMsg>>,
scheduler_chan: IpcSender<TimerEventRequest>,
/// A list of child content processes.
@ -349,8 +343,6 @@ impl<LTF: LayoutThreadFactory, STF: ScriptThreadFactory> Constellation<LTF, STF>
None
},
webdriver: WebDriverData::new(),
canvas_paint_threads: Vec::new(),
webgl_paint_threads: Vec::new(),
scheduler_chan: TimerScheduler::start(),
child_processes: Vec::new(),
document_states: HashMap::new(),
@ -1208,9 +1200,7 @@ impl<LTF: LayoutThreadFactory, STF: ScriptThreadFactory> Constellation<LTF, STF>
size: &Size2D<i32>,
response_sender: IpcSender<IpcSender<CanvasMsg>>) {
let webrender_api = self.webrender_api_sender.clone();
let (out_of_process_sender, in_process_sender) = CanvasPaintThread::start(*size,
webrender_api);
self.canvas_paint_threads.push(in_process_sender);
let (out_of_process_sender, _) = CanvasPaintThread::start(*size, webrender_api);
response_sender.send(out_of_process_sender).unwrap()
}
@ -1221,8 +1211,7 @@ impl<LTF: LayoutThreadFactory, STF: ScriptThreadFactory> Constellation<LTF, STF>
response_sender: IpcSender<Result<IpcSender<CanvasMsg>, String>>) {
let webrender_api = self.webrender_api_sender.clone();
let response = match WebGLPaintThread::start(*size, attributes, webrender_api) {
Ok((out_of_process_sender, in_process_sender)) => {
self.webgl_paint_threads.push(in_process_sender);
Ok((out_of_process_sender, _)) => {
Ok(out_of_process_sender)
},
Err(msg) => Err(msg),