mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
Move media backend initialization to process startup.
This commit is contained in:
parent
17204544d9
commit
eebd831ea5
8 changed files with 12 additions and 11 deletions
|
@ -103,6 +103,8 @@ use profile_traits::time;
|
|||
use script_traits::{ConstellationMsg, SWManagerSenders, ScriptToConstellationChan};
|
||||
use servo_config::opts;
|
||||
use servo_config::{pref, prefs};
|
||||
use servo_media::ServoMedia;
|
||||
use servo_media_auto::Backend;
|
||||
use std::borrow::Cow;
|
||||
use std::cmp::max;
|
||||
use std::path::PathBuf;
|
||||
|
@ -182,6 +184,10 @@ where
|
|||
// Global configuration options, parsed from the command line.
|
||||
let opts = opts::get();
|
||||
|
||||
if !opts.multiprocess {
|
||||
ServoMedia::init::<Backend>();
|
||||
}
|
||||
|
||||
// Make sure the gl context is made current.
|
||||
window.prepare_for_composite();
|
||||
|
||||
|
@ -751,6 +757,8 @@ pub fn run_content_process(token: String) {
|
|||
script::init();
|
||||
script::init_service_workers(sw_senders);
|
||||
|
||||
ServoMedia::init::<Backend>();
|
||||
|
||||
unprivileged_content.start_all::<script_layout_interface::message::Msg,
|
||||
layout_thread::LayoutThread,
|
||||
script::script_thread::ScriptThread>(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue