mirror of
https://github.com/servo/servo.git
synced 2025-06-08 16:43:28 +00:00
webgl: Make bind* calls more spec-compliant
This commit is contained in:
parent
b1765c6882
commit
42bd43a696
8 changed files with 72 additions and 37 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;
|
||||
|
||||
|
@ -44,9 +44,9 @@ impl WebGLBuffer {
|
|||
}
|
||||
|
||||
pub trait WebGLBufferHelpers {
|
||||
fn id(&self) -> u32;
|
||||
fn bind(&self, target: u32);
|
||||
fn delete(&self);
|
||||
fn id(self) -> u32;
|
||||
fn bind(self, target: u32);
|
||||
fn delete(self);
|
||||
}
|
||||
|
||||
impl<'a> WebGLBufferHelpers for &'a WebGLBuffer {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue