mirror of
https://github.com/servo/servo.git
synced 2025-09-30 00:29:14 +01:00
webxr: create glwindow with Rc window and without rendering context (#34813)
* Create webxr glwindow with Rc window Signed-off-by: Wu Yu Wei <yuweiwu@pm.me> * Remove obselte gurad type Signed-off-by: Wu Yu Wei <yuweiwu@pm.me> * Update GlWindow trait method Signed-off-by: Wu Yuwei <yuweiwu@pm.me> * Update how webxr discorvery is created Now glwindow will create a hidden window. It's better to not use it unless we really want to use this port. Signed-off-by: Wu Yu Wei <yuweiwu@pm.me> * Link back to upstream webxr repo Signed-off-by: Wu Yu Wei <yuweiwu@pm.me> --------- Signed-off-by: Wu Yu Wei <yuweiwu@pm.me> Signed-off-by: Wu Yuwei <yuweiwu@pm.me>
This commit is contained in:
parent
b252f238d1
commit
da2074e5d6
7 changed files with 26 additions and 97 deletions
|
@ -5,6 +5,8 @@
|
|||
//! Definition of Window.
|
||||
//! Implemented by headless and headed windows.
|
||||
|
||||
use std::rc::Rc;
|
||||
|
||||
use euclid::{Length, Scale};
|
||||
use servo::compositing::windowing::{EmbedderEvent, WindowMethods};
|
||||
use servo::config::opts;
|
||||
|
@ -41,7 +43,7 @@ pub trait WindowPortsMethods: WindowMethods {
|
|||
fn new_glwindow(
|
||||
&self,
|
||||
event_loop: &winit::event_loop::ActiveEventLoop,
|
||||
) -> Box<dyn webxr::glwindow::GlWindow>;
|
||||
) -> Rc<dyn webxr::glwindow::GlWindow>;
|
||||
fn winit_window(&self) -> Option<&winit::window::Window>;
|
||||
fn toolbar_height(&self) -> Length<f32, DeviceIndependentPixel>;
|
||||
fn set_toolbar_height(&self, height: Length<f32, DeviceIndependentPixel>);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue