mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +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
|
@ -7,7 +7,7 @@ use dom::bindings::codegen::Bindings::WebGLShaderPrecisionFormatBinding;
|
|||
use dom::bindings::codegen::Bindings::WebGLShaderPrecisionFormatBinding::WebGLShaderPrecisionFormatMethods;
|
||||
use dom::bindings::js::Root;
|
||||
use dom::bindings::reflector::{Reflector, reflect_dom_object};
|
||||
use dom::globalscope::GlobalScope;
|
||||
use dom::window::Window;
|
||||
|
||||
#[dom_struct]
|
||||
pub struct WebGLShaderPrecisionFormat {
|
||||
|
@ -27,13 +27,13 @@ impl WebGLShaderPrecisionFormat {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn new(global: &GlobalScope,
|
||||
pub fn new(window: &Window,
|
||||
range_min: i32,
|
||||
range_max: i32,
|
||||
precision: i32) -> Root<WebGLShaderPrecisionFormat> {
|
||||
reflect_dom_object(
|
||||
box WebGLShaderPrecisionFormat::new_inherited(range_min, range_max, precision),
|
||||
global,
|
||||
window,
|
||||
WebGLShaderPrecisionFormatBinding::Wrap)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue