mirror of
https://github.com/servo/servo.git
synced 2025-08-07 06:25:32 +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
|
@ -177,7 +177,7 @@ impl HTMLCanvasElement {
|
|||
GLContextAttributes::default()
|
||||
};
|
||||
|
||||
let maybe_ctx = WebGLRenderingContext::new(window.upcast(), self, size, attrs);
|
||||
let maybe_ctx = WebGLRenderingContext::new(&window, self, size, attrs);
|
||||
|
||||
*self.context.borrow_mut() = maybe_ctx.map( |ctx| CanvasContext::WebGL(JS::from_ref(&*ctx)));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue