mirror of
https://github.com/servo/servo.git
synced 2025-07-23 07:13:52 +01:00
Upgrade to SM 39
This commit is contained in:
parent
a256f39796
commit
675267b782
205 changed files with 6546 additions and 5340 deletions
|
@ -5,7 +5,7 @@
|
|||
// https://www.khronos.org/registry/webgl/specs/latest/1.0/webgl.idl
|
||||
use dom::bindings::codegen::Bindings::WebGLBufferBinding;
|
||||
use dom::bindings::global::GlobalRef;
|
||||
use dom::bindings::js::{Temporary, JSRef};
|
||||
use dom::bindings::js::Root;
|
||||
use dom::bindings::utils::reflect_dom_object;
|
||||
use dom::webglobject::WebGLObject;
|
||||
|
||||
|
@ -23,17 +23,17 @@ impl WebGLBuffer {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn new(global: GlobalRef, id: u32) -> Temporary<WebGLBuffer> {
|
||||
pub fn new(global: GlobalRef, id: u32) -> Root<WebGLBuffer> {
|
||||
reflect_dom_object(box WebGLBuffer::new_inherited(id), global, WebGLBufferBinding::Wrap)
|
||||
}
|
||||
}
|
||||
|
||||
pub trait WebGLBufferHelpers {
|
||||
fn get_id(&self) -> u32;
|
||||
fn get_id(self) -> u32;
|
||||
}
|
||||
|
||||
impl<'a> WebGLBufferHelpers for JSRef<'a, WebGLBuffer> {
|
||||
fn get_id(&self) -> u32 {
|
||||
impl<'a> WebGLBufferHelpers for &'a WebGLBuffer {
|
||||
fn get_id(self) -> u32 {
|
||||
self.id
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue