mirror of
https://github.com/servo/servo.git
synced 2025-08-06 22:15:33 +01:00
Auto merge of #22953 - asajeffrey:webvr-glwindow, r=paulrouget
Use a test VRDisplay that renders to a GL window <!-- Please describe your changes on the following line: --> Add a `dom.webvr.test` pref that registers a new VR display, which registers to a GL window. The matching webvr PR is https://github.com/servo/rust-webvr/pull/66. --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: --> - [X] `./mach build -d` does not report any errors - [X] `./mach test-tidy` does not report any errors - [X] These changes fix #22795 - [X] These changes do not require tests because we need a followup PR to support reftests which use the VR display <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. --> <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/22953) <!-- Reviewable:end -->
This commit is contained in:
commit
55347aa39f
12 changed files with 95 additions and 13 deletions
|
@ -21,7 +21,7 @@ use servo::script_traits::{TouchEventType, TouchId};
|
|||
use servo::servo_config::opts;
|
||||
use servo::servo_config::prefs::{PrefValue, PREFS};
|
||||
use servo::servo_url::ServoUrl;
|
||||
use servo::webvr::{VRExternalShmemPtr, VRServiceManager};
|
||||
use servo::webvr::{VRExternalShmemPtr, VRMainThreadHeartbeat, VRServiceManager};
|
||||
use servo::{self, gl, webrender_api, BrowserId, Servo};
|
||||
use std::cell::{Cell, RefCell};
|
||||
use std::mem;
|
||||
|
@ -576,7 +576,11 @@ impl WindowMethods for ServoCallbacks {
|
|||
}
|
||||
}
|
||||
|
||||
fn register_vr_services(&self, services: &mut VRServiceManager) {
|
||||
fn register_vr_services(
|
||||
&self,
|
||||
services: &mut VRServiceManager,
|
||||
_: &mut Vec<Box<VRMainThreadHeartbeat>>,
|
||||
) {
|
||||
if let Some(ptr) = self.vr_pointer {
|
||||
services.register_vrexternal(VRExternalShmemPtr::new(ptr));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue