servo: Merge #5926 - Fix WebGL objects inheritance (from emilio:webgl-object-inheritance); r=jdm
Uses WebGLObject inheritance as specified by the WebGL 1.0 spec. Source-Repo: https://github.com/servo/servo Source-Revision: 72ca16ed555cac4aa3019411c7157251107efccc
This commit is contained in:
@@ -6,18 +6,19 @@
|
||||
use dom::bindings::codegen::Bindings::WebGLProgramBinding;
|
||||
use dom::bindings::global::GlobalRef;
|
||||
use dom::bindings::js::{Temporary, JSRef};
|
||||
use dom::bindings::utils::{Reflector, reflect_dom_object};
|
||||
use dom::bindings::utils::reflect_dom_object;
|
||||
use dom::webglobject::WebGLObject;
|
||||
|
||||
#[dom_struct]
|
||||
pub struct WebGLProgram {
|
||||
reflector_: Reflector,
|
||||
webgl_object: WebGLObject,
|
||||
id: u32,
|
||||
}
|
||||
|
||||
impl WebGLProgram {
|
||||
fn new_inherited(id: u32) -> WebGLProgram {
|
||||
WebGLProgram {
|
||||
reflector_: Reflector::new(),
|
||||
webgl_object: WebGLObject::new_inherited(),
|
||||
id: id,
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user