diff options
author | Ngo Iok Ui (Wu Yu Wei) <yuweiwu@pm.me> | 2025-01-03 12:01:30 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-01-03 03:01:30 +0000 |
commit | da2074e5d639926fb5462f404243f6bb053d1b3f (patch) | |
tree | 882a06ca3045985ccdf9208e161db8f8e4d81b55 /ports/servoshell/desktop/headless_window.rs | |
parent | b252f238d1c66470a2a0d759f3df3a40504fd0e2 (diff) | |
download | servo-da2074e5d639926fb5462f404243f6bb053d1b3f.tar.gz servo-da2074e5d639926fb5462f404243f6bb053d1b3f.zip |
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>
Diffstat (limited to 'ports/servoshell/desktop/headless_window.rs')
-rw-r--r-- | ports/servoshell/desktop/headless_window.rs | 23 |
1 files changed, 2 insertions, 21 deletions
diff --git a/ports/servoshell/desktop/headless_window.rs b/ports/servoshell/desktop/headless_window.rs index fc4412197b6..cb9aecb909d 100644 --- a/ports/servoshell/desktop/headless_window.rs +++ b/ports/servoshell/desktop/headless_window.rs @@ -9,14 +9,13 @@ use std::rc::Rc; use std::sync::RwLock; use euclid::num::Zero; -use euclid::{Box2D, Length, Point2D, Rotation3D, Scale, Size2D, UnknownUnit, Vector3D}; +use euclid::{Box2D, Length, Point2D, Scale, Size2D}; use servo::compositing::windowing::{ AnimationState, EmbedderCoordinates, EmbedderEvent, WindowMethods, }; use servo::config::opts; use servo::servo_geometry::DeviceIndependentPixel; use servo::webrender_api::units::{DeviceIntSize, DevicePixel}; -use surfman::{Context, Device}; use crate::desktop::window_trait::WindowPortsMethods; @@ -124,7 +123,7 @@ impl WindowPortsMethods for Window { fn new_glwindow( &self, _events_loop: &winit::event_loop::ActiveEventLoop, - ) -> Box<dyn webxr::glwindow::GlWindow> { + ) -> Rc<dyn webxr::glwindow::GlWindow> { unimplemented!() } @@ -158,21 +157,3 @@ impl WindowMethods for Window { self.animation_state.set(state); } } - -impl webxr::glwindow::GlWindow for Window { - fn get_render_target( - &self, - _device: &mut Device, - _context: &mut Context, - ) -> webxr::glwindow::GlWindowRenderTarget { - unimplemented!() - } - - fn get_rotation(&self) -> Rotation3D<f32, UnknownUnit, UnknownUnit> { - Rotation3D::identity() - } - - fn get_translation(&self) -> Vector3D<f32, UnknownUnit> { - Vector3D::zero() - } -} |