mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Make GlobalScope.get_cx a static method.
This commit is contained in:
parent
4998c65c42
commit
f79e1e327d
39 changed files with 132 additions and 127 deletions
|
@ -3,7 +3,6 @@
|
|||
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
||||
|
||||
use crate::dom::bindings::codegen::Bindings::XRViewBinding::{XREye, XRViewMethods};
|
||||
use crate::dom::bindings::reflector::DomObject;
|
||||
use crate::dom::bindings::reflector::{reflect_dom_object, Reflector};
|
||||
use crate::dom::bindings::root::{Dom, DomRoot};
|
||||
use crate::dom::bindings::utils::create_typed_array;
|
||||
|
@ -90,7 +89,7 @@ impl XRViewMethods for XRView {
|
|||
/// https://immersive-web.github.io/webxr/#dom-xrview-projectionmatrix
|
||||
fn ProjectionMatrix(&self, _cx: JSContext) -> NonNull<JSObject> {
|
||||
if self.proj.get().is_null() {
|
||||
let cx = self.global().get_cx();
|
||||
let cx = GlobalScope::get_cx();
|
||||
// row_major since euclid uses row vectors
|
||||
let proj = self.view.projection.to_array();
|
||||
create_typed_array(cx, &proj, &self.proj);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue