Merge PrivilegedPipelineContent::{start_all, start_paint_thread}.

They now do the same thing.
This commit is contained in:
Ms2ger 2016-05-25 10:46:11 +02:00
parent 4113eb6f72
commit e7f75ca298
2 changed files with 4 additions and 10 deletions

View file

@ -423,7 +423,7 @@ impl<Message, LTF, STF> Constellation<Message, LTF, STF>
initial_window_size: Option<TypedSize2D<PagePx, f32>>, initial_window_size: Option<TypedSize2D<PagePx, f32>>,
script_channel: Option<IpcSender<ConstellationControlMsg>>, script_channel: Option<IpcSender<ConstellationControlMsg>>,
load_data: LoadData) { load_data: LoadData) {
let spawning_paint_only = script_channel.is_some(); let spawning_content = script_channel.is_none();
let (pipeline, unprivileged_pipeline_content, privileged_pipeline_content) = let (pipeline, unprivileged_pipeline_content, privileged_pipeline_content) =
Pipeline::create::<LTF, STF>(InitialPipelineState { Pipeline::create::<LTF, STF>(InitialPipelineState {
id: pipeline_id, id: pipeline_id,
@ -448,11 +448,9 @@ impl<Message, LTF, STF> Constellation<Message, LTF, STF>
webrender_api_sender: self.webrender_api_sender.clone(), webrender_api_sender: self.webrender_api_sender.clone(),
}); });
if spawning_paint_only { privileged_pipeline_content.start();
privileged_pipeline_content.start_paint_thread();
} else {
privileged_pipeline_content.start_all();
if spawning_content {
// Spawn the child process. // Spawn the child process.
// //
// Yes, that's all there is to it! // Yes, that's all there is to it!

View file

@ -471,11 +471,7 @@ pub struct PrivilegedPipelineContent {
} }
impl PrivilegedPipelineContent { impl PrivilegedPipelineContent {
pub fn start_all(self) { pub fn start(self) {
self.start_paint_thread();
}
pub fn start_paint_thread(self) {
PaintThread::create(self.id, PaintThread::create(self.id,
self.load_data.url, self.load_data.url,
self.chrome_to_paint_chan, self.chrome_to_paint_chan,