Auto merge of #27418 - Manishearth:secondary-view-pref, r=asajeffrey

Move secondary view support into a pref

Needs https://github.com/servo/webxr/pull/188

Adds a `dom.webxr.first_person_observer_view` pref that toggles FPO views.
This commit is contained in:
bors-servo 2020-07-28 01:11:59 -04:00 committed by GitHub
commit 870812d895
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 7 additions and 3 deletions

View file

@ -282,6 +282,7 @@ mod gen {
enabled: bool,
#[serde(default)]
test: bool,
first_person_observer_view: bool,
glwindow: {
#[serde(default)]
enabled: bool,

View file

@ -26,6 +26,7 @@ use ipc_channel::ipc::{self as ipc_crate, IpcReceiver};
use ipc_channel::router::ROUTER;
use msg::constellation_msg::PipelineId;
use profile_traits::ipc;
use servo_config::pref;
use std::cell::Cell;
use std::rc::Rc;
use webxr_api::{Error as XRError, Frame, Session, SessionInit, SessionMode};
@ -215,6 +216,7 @@ impl XRSystemMethods for XRSystem {
let init = SessionInit {
required_features,
optional_features,
first_person_observer_view: pref!(dom.webxr.first_person_observer_view),
};
let mut trusted = Some(TrustedPromise::new(promise.clone()));