mirror of
https://github.com/servo/servo.git
synced 2025-08-09 07:25:35 +01:00
Expose WebGL-related interfaces only in Window
This commit is contained in:
parent
6210bede8b
commit
8af2327e95
26 changed files with 82 additions and 67 deletions
|
@ -6,7 +6,7 @@
|
|||
use dom::bindings::codegen::Bindings::WebGLUniformLocationBinding;
|
||||
use dom::bindings::js::Root;
|
||||
use dom::bindings::reflector::{Reflector, reflect_dom_object};
|
||||
use dom::globalscope::GlobalScope;
|
||||
use dom::window::Window;
|
||||
use webrender_traits::WebGLProgramId;
|
||||
|
||||
#[dom_struct]
|
||||
|
@ -27,12 +27,12 @@ impl WebGLUniformLocation {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn new(global: &GlobalScope,
|
||||
pub fn new(window: &Window,
|
||||
id: i32,
|
||||
program_id: WebGLProgramId)
|
||||
-> Root<WebGLUniformLocation> {
|
||||
reflect_dom_object(box WebGLUniformLocation::new_inherited(id, program_id),
|
||||
global,
|
||||
window,
|
||||
WebGLUniformLocationBinding::Wrap)
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue